Commit 241fbe99 authored by Antoine Pitrou's avatar Antoine Pitrou

Issue #12226: HTTPS is now used by default when connecting to PyPI.

parent 76f27780
......@@ -21,7 +21,7 @@ password:%s
class PyPIRCCommand(Command):
"""Base command that knows how to handle the .pypirc file
"""
DEFAULT_REPOSITORY = 'http://pypi.python.org/pypi'
DEFAULT_REPOSITORY = 'https://pypi.python.org/pypi'
DEFAULT_REALM = 'pypi'
repository = None
realm = None
......
......@@ -89,7 +89,7 @@ class PyPIRCCommandTestCase(support.TempdirManager,
config = config.items()
config.sort()
waited = [('password', 'secret'), ('realm', 'pypi'),
('repository', 'http://pypi.python.org/pypi'),
('repository', 'https://pypi.python.org/pypi'),
('server', 'server1'), ('username', 'me')]
self.assertEqual(config, waited)
......@@ -99,7 +99,7 @@ class PyPIRCCommandTestCase(support.TempdirManager,
config = config.items()
config.sort()
waited = [('password', 'secret'), ('realm', 'pypi'),
('repository', 'http://pypi.python.org/pypi'),
('repository', 'https://pypi.python.org/pypi'),
('server', 'server-login'), ('username', 'tarek')]
self.assertEqual(config, waited)
......
......@@ -78,7 +78,7 @@ class uploadTestCase(PyPIRCCommandTestCase):
cmd.finalize_options()
for attr, waited in (('username', 'me'), ('password', 'secret'),
('realm', 'pypi'),
('repository', 'http://pypi.python.org/pypi')):
('repository', 'https://pypi.python.org/pypi')):
self.assertEqual(getattr(cmd, attr), waited)
def test_saved_password(self):
......@@ -119,7 +119,7 @@ class uploadTestCase(PyPIRCCommandTestCase):
self.assertTrue(headers['Content-type'].startswith('multipart/form-data'))
self.assertEqual(self.last_open.req.get_method(), 'POST')
self.assertEqual(self.last_open.req.get_full_url(),
'http://pypi.python.org/pypi')
'https://pypi.python.org/pypi')
self.assertIn('xxx', self.last_open.req.data)
auth = self.last_open.req.headers['Authorization']
self.assertNotIn('\n', auth)
......
......@@ -27,6 +27,8 @@ Core and Builtins
Library
-------
- Issue #12226: HTTPS is now used by default when connecting to PyPI.
- Issue #20048: Fixed ZipExtFile.peek() when it is called on the boundary of
the uncompress buffer and read() goes through more than one readbuffer.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment