Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protect @ as safe character when cleaning URLs #6440

Merged
merged 1 commit into from
Apr 25, 2019

Conversation

nicolasbock
Copy link
Contributor

Remote URLs that contain a link to a git repository and a tag
reference will have the @ character converted into %40. This is
incorrect.

Fixes: #6437

Signed-off-by: Nicolas Bock [email protected]

@nicolasbock
Copy link
Contributor Author

nicolasbock commented Apr 24, 2019

I am not sure about the added test. When I locally run tox without the safe argument, the test still passes. The @ character doesn't seem to be quoted as the OP found in #6437 .

@cjerdonek
Copy link
Member

It might be because you're missing a path portion. Try something more like-- "git+ssh://example.com/[email protected]#egg=my-package-1.0.201810251140"

@nicolasbock
Copy link
Contributor Author

I think you are right @cjerdonek . Please have a look at the updated change set.

Copy link
Member

@cjerdonek cjerdonek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Some comments.

news/6440.bugfix Outdated Show resolved Hide resolved
src/pip/_internal/index.py Show resolved Hide resolved
tests/unit/test_index.py Outdated Show resolved Hide resolved
tests/unit/test_index.py Outdated Show resolved Hide resolved
@cjerdonek cjerdonek added C: finder PackageFinder and index related code C: vcs pip's interaction with version control systems like git, svn and bzr type: bugfix labels Apr 25, 2019
@nicolasbock
Copy link
Contributor Author

Thanks @cjerdonek for the helpful comments! I pushed an updated version of this change set.

Remote URLs that contain a link to a git repository and a tag
reference will have the `@` character converted into `%40`. This is
incorrect.

Fixes: pypa#6437

Signed-off-by: Nicolas Bock <[email protected]>
Copy link
Member

@cjerdonek cjerdonek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Thanks for your quick attention to this, @nicolasbock.

@cjerdonek cjerdonek merged commit 60d3f11 into pypa:master Apr 25, 2019
@lock
Copy link

lock bot commented May 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: finder PackageFinder and index related code C: vcs pip's interaction with version control systems like git, svn and bzr
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pip install from internal pypi server containing git links fails with pypi 19.1
2 participants