Skip to content

pip 19.2 install raises "Failed to parse" if username contains '@' #6776

@cletomartin

Description

@cletomartin

Environment

  • pip version: 19.2
  • Python version: 3.7.4
  • OS: RHEL

Description

It seems like pip 19.2 cannot handle the case of having an email as username in index-url:

$ pip install test
Looking in indexes: https://user_at_example.com:****@url-to-pypi-server
Collecting test
...

But using user@example.com I get:

pip install test
Looking in indexes: https://user%40example.com:****@url-to-pypi-server
Collecting test
ERROR: Could not install packages due to an EnvironmentError: Failed to parse: https://user@example.com:pass@url-to-pypi-server

Expected behavior

User names with symbols like @ should be supported too. It works for 19.1.1.

How to Reproduce

Just use @ as part of the user name.

Output

Provided in the examples above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-lockedOutdated issues that have been locked by automationresolution: duplicateDuplicate of an existing issue/PR

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions