Kaydet (Commit) 62003247 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

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

üst d105196c
...@@ -21,7 +21,7 @@ password:%s ...@@ -21,7 +21,7 @@ password:%s
class PyPIRCCommand(Command): class PyPIRCCommand(Command):
"""Base command that knows how to handle the .pypirc file """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' DEFAULT_REALM = 'pypi'
repository = None repository = None
realm = None realm = None
......
...@@ -89,7 +89,7 @@ class PyPIRCCommandTestCase(support.TempdirManager, ...@@ -89,7 +89,7 @@ class PyPIRCCommandTestCase(support.TempdirManager,
config = config.items() config = config.items()
config.sort() config.sort()
waited = [('password', 'secret'), ('realm', 'pypi'), waited = [('password', 'secret'), ('realm', 'pypi'),
('repository', 'http://pypi.python.org/pypi'), ('repository', 'https://pypi.python.org/pypi'),
('server', 'server1'), ('username', 'me')] ('server', 'server1'), ('username', 'me')]
self.assertEqual(config, waited) self.assertEqual(config, waited)
...@@ -99,7 +99,7 @@ class PyPIRCCommandTestCase(support.TempdirManager, ...@@ -99,7 +99,7 @@ class PyPIRCCommandTestCase(support.TempdirManager,
config = config.items() config = config.items()
config.sort() config.sort()
waited = [('password', 'secret'), ('realm', 'pypi'), waited = [('password', 'secret'), ('realm', 'pypi'),
('repository', 'http://pypi.python.org/pypi'), ('repository', 'https://pypi.python.org/pypi'),
('server', 'server-login'), ('username', 'tarek')] ('server', 'server-login'), ('username', 'tarek')]
self.assertEqual(config, waited) self.assertEqual(config, waited)
......
...@@ -78,7 +78,7 @@ class uploadTestCase(PyPIRCCommandTestCase): ...@@ -78,7 +78,7 @@ class uploadTestCase(PyPIRCCommandTestCase):
cmd.finalize_options() cmd.finalize_options()
for attr, waited in (('username', 'me'), ('password', 'secret'), for attr, waited in (('username', 'me'), ('password', 'secret'),
('realm', 'pypi'), ('realm', 'pypi'),
('repository', 'http://pypi.python.org/pypi')): ('repository', 'https://pypi.python.org/pypi')):
self.assertEqual(getattr(cmd, attr), waited) self.assertEqual(getattr(cmd, attr), waited)
def test_saved_password(self): def test_saved_password(self):
...@@ -119,7 +119,7 @@ class uploadTestCase(PyPIRCCommandTestCase): ...@@ -119,7 +119,7 @@ class uploadTestCase(PyPIRCCommandTestCase):
self.assertTrue(headers['Content-type'].startswith('multipart/form-data')) 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_method(), 'POST')
self.assertEqual(self.last_open.req.get_full_url(), 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) self.assertIn('xxx', self.last_open.req.data)
auth = self.last_open.req.headers['Authorization'] auth = self.last_open.req.headers['Authorization']
self.assertNotIn('\n', auth) self.assertNotIn('\n', auth)
......
...@@ -27,6 +27,8 @@ Core and Builtins ...@@ -27,6 +27,8 @@ Core and Builtins
Library 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 - Issue #20048: Fixed ZipExtFile.peek() when it is called on the boundary of
the uncompress buffer and read() goes through more than one readbuffer. 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