Skip to content

setuptools 18.3.2 cannot access PyPI if PyPI password has an embedded % #442

@ghost

Description

Originally reported by: malemburg (Bitbucket: malemburg, GitHub: malemburg)


If you have a repository entry in .pypirc with a password using % in the password string, setuptools causes a traceback when trying to install packages with Python 3.4:

#!python

      File "./py3/lib/python3.4/site-packages/setuptools/package_index.py", line 427, in find_packages
        self.scan_url(self.index_url + requirement.unsafe_name+'/')
      File "./py3/lib/python3.4/site-packages/setuptools/package_index.py", line 761, in scan_url
        self.process_url(url, True)
      File "./py3/lib/python3.4/site-packages/setuptools/package_index.py", line 304, in process_url
        f = self.open_url(url, "Download error on %s: %%s -- Some packages may not be found!" % url)
      File "./py3/lib/python3.4/site-packages/setuptools/package_index.py", line 700, in open_url
        return open_with_auth(url, self.opener)
      File "./py3/lib/python3.4/site-packages/setuptools/package_index.py", line 894, in _socket_timeout
        return func(*args, **kwargs)
      File "./py3/lib/python3.4/site-packages/setuptools/package_index.py", line 992, in open_with_auth
        cred = PyPIConfig().find_credential(url)
      File "./py3/lib/python3.4/site-packages/setuptools/package_index.py", line 971, in find_credential
        for repository, cred in self.creds_by_repository.items():
      File "./py3/lib/python3.4/site-packages/setuptools/package_index.py", line 957, in creds_by_repository
        return dict(map(self._get_repo_cred, sections_with_repositories))
      File "./py3/lib/python3.4/site-packages/setuptools/package_index.py", line 963, in _get_repo_cred
        self.get(section, 'password').strip(),
      File "<pyrun>/configparser.py", line 773, in get
      File "<pyrun>/configparser.py", line 374, in before_get
      File "<pyrun>/configparser.py", line 423, in _interpolate_some
    configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%12345'

I tested this with setuptools 15.2 and this does not have the problem.


Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions