]> granicus.if.org Git - python/commitdiff
Issue #12226: HTTPS is now used by default when connecting to PyPI.
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 22 Dec 2013 00:35:53 +0000 (01:35 +0100)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 22 Dec 2013 00:35:53 +0000 (01:35 +0100)
Lib/distutils/config.py
Lib/distutils/tests/test_config.py
Lib/distutils/tests/test_upload.py
Misc/NEWS

index 1d327143bea711c3e6e765d3a6dab8f80da89da7..7dbcc46bf400504c64a3fee2842cf6fd62032bd7 100644 (file)
@@ -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
index 7d1db5e4751d377eee4ba19b3c06cfcb283d823d..17db98f796006eb0e6e1a81040a44bd0874af397 100644 (file)
@@ -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)
 
index eed76b3b8717b2b0835a398e0725d25f3ce724d9..8b8262e1f34e96fab5d53fb45137444d65d9875b 100644 (file)
@@ -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)
index aed2112c9faab783dc9c97865db61968a2181e83..4a780020fe311ba4b04c1d185d34ff9aa0e0e09d 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -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.