Skip to content

Commit ad04a85

Browse files
committed
Switch to the new upload url for PyPI
1 parent 9105870 commit ad04a85

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Lib/distutils/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
class PyPIRCCommand(Command):
2222
"""Base command that knows how to handle the .pypirc file
2323
"""
24-
DEFAULT_REPOSITORY = 'https://pypi.python.org/pypi'
24+
DEFAULT_REPOSITORY = 'https://upload.pypi.io/legacy/'
2525
DEFAULT_REALM = 'pypi'
2626
repository = None
2727
realm = None

Lib/distutils/tests/test_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def test_server_registration(self):
8787

8888
config = list(sorted(config.items()))
8989
waited = [('password', 'secret'), ('realm', 'pypi'),
90-
('repository', 'https://pypi.python.org/pypi'),
90+
('repository', 'https://upload.pypi.io/legacy/'),
9191
('server', 'server1'), ('username', 'me')]
9292
self.assertEqual(config, waited)
9393

@@ -96,7 +96,7 @@ def test_server_registration(self):
9696
config = cmd._read_pypirc()
9797
config = list(sorted(config.items()))
9898
waited = [('password', 'secret'), ('realm', 'pypi'),
99-
('repository', 'https://pypi.python.org/pypi'),
99+
('repository', 'https://upload.pypi.io/legacy/'),
100100
('server', 'server-login'), ('username', 'tarek')]
101101
self.assertEqual(config, waited)
102102

Lib/distutils/tests/test_upload.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def test_finalize_options(self):
9090
cmd.finalize_options()
9191
for attr, waited in (('username', 'me'), ('password', 'secret'),
9292
('realm', 'pypi'),
93-
('repository', 'https://pypi.python.org/pypi')):
93+
('repository', 'https://upload.pypi.io/legacy/')):
9494
self.assertEqual(getattr(cmd, attr), waited)
9595

9696
def test_saved_password(self):
@@ -131,7 +131,7 @@ def test_upload(self):
131131
content_type = headers['Content-type']
132132
self.assertTrue(content_type.startswith('multipart/form-data'))
133133
self.assertEqual(self.last_open.req.get_method(), 'POST')
134-
expected_url = 'https://pypi.python.org/pypi'
134+
expected_url = 'https://upload.pypi.io/legacy/'
135135
self.assertEqual(self.last_open.req.get_full_url(), expected_url)
136136
self.assertTrue(b'xxx' in self.last_open.req.data)
137137

0 commit comments

Comments
 (0)