]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Switch to the new upload url for PyPI
authorDonald Stufft <donald@stufft.io>
Wed, 6 Jul 2016 20:18:39 +0000 (16:18 -0400)
committerDonald Stufft <donald@stufft.io>
Wed, 6 Jul 2016 20:18:39 +0000 (16:18 -0400)
Lib/distutils/config.py
Lib/distutils/tests/test_config.py
Lib/distutils/tests/test_upload.py

index 382aca8fc12e610ab5c58dad76c8e19ee96aaadb..2d5770c61889c8a0715d5464cced5d6b0217b5f7 100644 (file)
@@ -21,7 +21,7 @@ password:%s
 class PyPIRCCommand(Command):
     """Base command that knows how to handle the .pypirc file
     """
-    DEFAULT_REPOSITORY = 'https://pypi.python.org/pypi'
+    DEFAULT_REPOSITORY = 'https://upload.pypi.io/legacy/'
     DEFAULT_REALM = 'pypi'
     repository = None
     realm = None
index 4de825a81edffa52de3895b9f24614b89d461723..c37381550d29859319a9a60b0c6dfc33e2fac853 100644 (file)
@@ -87,7 +87,7 @@ class PyPIRCCommandTestCase(support.TempdirManager,
 
         config = list(sorted(config.items()))
         waited = [('password', 'secret'), ('realm', 'pypi'),
-                  ('repository', 'https://pypi.python.org/pypi'),
+                  ('repository', 'https://upload.pypi.io/legacy/'),
                   ('server', 'server1'), ('username', 'me')]
         self.assertEqual(config, waited)
 
@@ -96,7 +96,7 @@ class PyPIRCCommandTestCase(support.TempdirManager,
         config = cmd._read_pypirc()
         config = list(sorted(config.items()))
         waited = [('password', 'secret'), ('realm', 'pypi'),
-                  ('repository', 'https://pypi.python.org/pypi'),
+                  ('repository', 'https://upload.pypi.io/legacy/'),
                   ('server', 'server-login'), ('username', 'tarek')]
         self.assertEqual(config, waited)
 
index dccaf77e3e1806304ad9c4afc3f073eb4667c2ee..bf4d558bf7d9cb935738584fecc5813ff65256f2 100644 (file)
@@ -90,7 +90,7 @@ class uploadTestCase(PyPIRCCommandTestCase):
         cmd.finalize_options()
         for attr, waited in (('username', 'me'), ('password', 'secret'),
                              ('realm', 'pypi'),
-                             ('repository', 'https://pypi.python.org/pypi')):
+                             ('repository', 'https://upload.pypi.io/legacy/')):
             self.assertEqual(getattr(cmd, attr), waited)
 
     def test_saved_password(self):
@@ -131,7 +131,7 @@ class uploadTestCase(PyPIRCCommandTestCase):
         content_type = headers['Content-type']
         self.assertTrue(content_type.startswith('multipart/form-data'))
         self.assertEqual(self.last_open.req.get_method(), 'POST')
-        expected_url = 'https://pypi.python.org/pypi'
+        expected_url = 'https://upload.pypi.io/legacy/'
         self.assertEqual(self.last_open.req.get_full_url(), expected_url)
         self.assertTrue(b'xxx' in self.last_open.req.data)