[Distutils] Is this a bug?

Nagy László Zsolt gandalf at shopzeus.com
Thu Oct 22 01:40:03 EDT 2015

Today I have tried to register and upload a new package by executing

setup.py register

I was asked if I want to save the creditentials in a .pypirc file and I answered yes.

Next I wanted to run

setup.py upload

and I got this error:

Traceback (most recent call last):
  File "C:\Python\Projects\some_package\setup.py", line 15, in <module>
    classifiers=['Topic :: Security', 'Topic :: Internet :: WWW/HTTP'],
  File "C:\Python35\lib\distutils\core.py", line 148, in setup
  File "C:\Python35\lib\distutils\dist.py", line 955, in run_commands
  File "C:\Python35\lib\distutils\dist.py", line 973, in run_command
  File "C:\Python35\lib\distutils\cmd.py", line 107, in ensure_finalized
  File "C:\Python35\lib\distutils\command\upload.py", line 46, in
    config = self._read_pypirc()
  File "C:\Python35\lib\distutils\config.py", line 83, in _read_pypirc
    current[key] = config.get(server, key)
  File "C:\Python35\lib\configparser.py", line 798, in get
  File "C:\Python35\lib\configparser.py", line 396, in before_get
    self._interpolate_some(parser, option, L, value, section, defaults, 1)
  File "C:\Python35\lib\configparser.py", line 445, in _interpolate_some
    "found: %r" % (rest,))
configparser.InterpolationSyntaxError: '%' must be followed by '%' or
'(', found
: *****************'

Instead of the many stars, of course there is the password. The problem
might be that the password contains a % character, and it was
incorrectly saved by distutils.

Can somebody please confirm that this is a bug in distutils? 



More information about the Distutils-SIG mailing list