[New-bugs-announce] [issue20120] Percent-signs (%) in .pypirc should not be interpolated

Thomas Levine report at bugs.python.org
Sat Jan 4 09:54:35 CET 2014


New submission from Thomas Levine:

This works fine in Python 2.7, but it fails in Python 3.3.

[tlevine at wildebeest mailfest-scoreboard]$ python3 --version
Python 3.3.3
[tlevine at wildebeest mailfest-scoreboard]$ python3 setup.py register sdist
running register
Traceback (most recent call last):
  File "setup.py", line 11, in <module>
    scripts=['scoreboard']
  File "/usr/lib/python3.3/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.3/distutils/dist.py", line 929, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.3/distutils/dist.py", line 948, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.3/distutils/command/register.py", line 45, in run
    self._set_config()
  File "/usr/lib/python3.3/distutils/command/register.py", line 71, in _set_config
    config = self._read_pypirc()
  File "/usr/lib/python3.3/distutils/config.py", line 83, in _read_pypirc
    current[key] = config.get(server, key)
  File "/usr/lib/python3.3/configparser.py", line 790, in get
    d)
  File "/usr/lib/python3.3/configparser.py", line 391, in before_get
    self._interpolate_some(parser, option, L, value, section, defaults, 1)
  File "/usr/lib/python3.3/configparser.py", line 440, in _interpolate_some
    "found: %r" % (rest,))
configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%rest-of-my-password'



Here are the relevant files.



[tlevine at wildebeest mailfest-scoreboard]$ cat ~/.pypirc 
[distutils]
index-servers =
    pypi

[pypi]
username:tlevine
password:yh^%#rest-of-my-password
[tlevine at wildebeest mailfest-scoreboard]$ cat setup.py 
#!/usr/bin/env python3

from distutils.core import setup

setup(name='mailfest-scoreboard',
      version='0.0.1',
      description='Score mailfest participants',
      author='Thomas Levine',
      author_email='_ at thomaslevine.com',
      url='https://github.com/tlevine/mailfest-scoreboard',
      scripts=['scoreboard']
     )

----------
components: Distutils
messages: 207275
nosy: tlevine
priority: normal
severity: normal
status: open
title: Percent-signs (%) in .pypirc should not be interpolated
type: behavior
versions: Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20120>
_______________________________________


More information about the New-bugs-announce mailing list