[Python-checkins] bpo-32155: Revert distutils.config change (#4618)
Victor Stinner
webhook-mailer at python.org
Tue Nov 28 17:19:29 EST 2017
https://github.com/python/cpython/commit/71bd588646b282c9eebc390b31184a5bdb54e712
commit: 71bd588646b282c9eebc390b31184a5bdb54e712
branch: master
author: Victor Stinner <victor.stinner at gmail.com>
committer: GitHub <noreply at github.com>
date: 2017-11-28T23:19:26+01:00
summary:
bpo-32155: Revert distutils.config change (#4618)
Revert distutils changes of the commit
696b501cd11dc429a0f661adeb598bfaf89e4112 and remove the realm
variable.
files:
D Misc/NEWS.d/next/Library/2017-11-28-15-06-07.bpo-32155.hWHGww.rst
M Lib/distutils/config.py
diff --git a/Lib/distutils/config.py b/Lib/distutils/config.py
index e66d103f7d1..2171abd6969 100644
--- a/Lib/distutils/config.py
+++ b/Lib/distutils/config.py
@@ -51,7 +51,6 @@ def _read_pypirc(self):
if os.path.exists(rc):
self.announce('Using PyPI login from %s' % rc)
repository = self.repository or self.DEFAULT_REPOSITORY
- realm = self.realm or self.DEFAULT_REALM
config = RawConfigParser()
config.read(rc)
@@ -77,7 +76,7 @@ def _read_pypirc(self):
# optional params
for key, default in (('repository',
self.DEFAULT_REPOSITORY),
- ('realm', realm),
+ ('realm', self.DEFAULT_REALM),
('password', None)):
if config.has_option(server, key):
current[key] = config.get(server, key)
@@ -106,7 +105,7 @@ def _read_pypirc(self):
'password': config.get(server, 'password'),
'repository': repository,
'server': server,
- 'realm': realm}
+ 'realm': self.DEFAULT_REALM}
return {}
diff --git a/Misc/NEWS.d/next/Library/2017-11-28-15-06-07.bpo-32155.hWHGww.rst b/Misc/NEWS.d/next/Library/2017-11-28-15-06-07.bpo-32155.hWHGww.rst
deleted file mode 100644
index a9509b546aa..00000000000
--- a/Misc/NEWS.d/next/Library/2017-11-28-15-06-07.bpo-32155.hWHGww.rst
+++ /dev/null
@@ -1 +0,0 @@
-Fix distutils.config: use the PyPIRCCommand.realm attribute if it is set.
More information about the Python-checkins
mailing list