]> granicus.if.org Git - python/commitdiff
Switch to the new upload url for PyPI
authorDonald Stufft <donald@stufft.io>
Wed, 6 Jul 2016 21:39:23 +0000 (17:39 -0400)
committerDonald Stufft <donald@stufft.io>
Wed, 6 Jul 2016 21:39:23 +0000 (17:39 -0400)
Lib/distutils/config.py
Lib/distutils/tests/test_config.py
Lib/distutils/tests/test_upload.py

index 7dbcc46bf400504c64a3fee2842cf6fd62032bd7..acf98e2741caa94b996b4fd8b75a7eee80dc5dfe 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 17db98f796006eb0e6e1a81040a44bd0874af397..d3dcedc975da2ef61ce502182a802a47f1e5bbfb 100644 (file)
@@ -89,7 +89,7 @@ class PyPIRCCommandTestCase(support.TempdirManager,
         config = config.items()
         config.sort()
         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)
 
@@ -99,7 +99,7 @@ class PyPIRCCommandTestCase(support.TempdirManager,
         config = config.items()
         config.sort()
         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 9290f9cda59b7a46c2d0e8cf701726ccd60952ac..2ed72198e25ab8a110a401817a25f52599c104b7 100644 (file)
@@ -82,7 +82,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):
@@ -123,7 +123,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(),
-                         'https://pypi.python.org/pypi')
+                         'https://upload.pypi.io/legacy/')
         self.assertIn('xxx', self.last_open.req.data)
         auth = self.last_open.req.headers['Authorization']
         self.assertNotIn('\n', auth)