Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e8d07a9

Browse files
committed
Issue #12226: HTTPS is now used by default when connecting to PyPI.
2 parents 6783487 + f60b7df commit e8d07a9

4 files changed

Lines changed: 7 additions & 5 deletions

File tree

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 = 'http://pypi.python.org/pypi'
24+
DEFAULT_REPOSITORY = 'https://pypi.python.org/pypi'
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', 'http://pypi.python.org/pypi'),
90+
('repository', 'https://pypi.python.org/pypi'),
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', 'http://pypi.python.org/pypi'),
99+
('repository', 'https://pypi.python.org/pypi'),
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
@@ -77,7 +77,7 @@ def test_finalize_options(self):
7777
cmd.finalize_options()
7878
for attr, waited in (('username', 'me'), ('password', 'secret'),
7979
('realm', 'pypi'),
80-
('repository', 'http://pypi.python.org/pypi')):
80+
('repository', 'https://pypi.python.org/pypi')):
8181
self.assertEqual(getattr(cmd, attr), waited)
8282

8383
def test_saved_password(self):
@@ -117,7 +117,7 @@ def test_upload(self):
117117
self.assertTrue(headers['Content-type'].startswith('multipart/form-data'))
118118
self.assertEqual(self.last_open.req.get_method(), 'POST')
119119
self.assertEqual(self.last_open.req.get_full_url(),
120-
'http://pypi.python.org/pypi')
120+
'https://pypi.python.org/pypi')
121121
self.assertIn(b'xxx', self.last_open.req.data)
122122

123123
def test_suite():

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ Core and Builtins
2929
Library
3030
-------
3131

32+
- Issue #12226: HTTPS is now used by default when connecting to PyPI.
33+
3234
- Issue #20045: Fix "setup.py register --list-classifiers".
3335

3436
- Issue #18879: When a method is looked up on a temporary file, avoid closing

0 commit comments

Comments
 (0)