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

Correctly normalize package names. Fixes #2956 and #3002 #3008

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pipenv/patched/notpip/_internal/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ def egg_info_matches(
return full_match[full_match.index('-'):]
name = match.group(0).lower()
# To match the "safe" name that pkg_resources creates:
name = name.replace('_', '-')
name = name.replace('_', '-').replace('.', '-')
Copy link
Member

Choose a reason for hiding this comment

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

^_^ I am actually tempted to do this, but I have a preference for not patching pip whenever possible.

I'm likely going to hold off on accepting this for the next release to see about getting feedback from the pip maintainers when I have a bit more clarity on all of the places we are currently working around this problem, which I think is pretty numerous by now...

Copy link
Author

Choose a reason for hiding this comment

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

It's up to you if you accept it, and I understand if you do not, but this is currently breaking our (am I am sure others) workflow entirely. I can't see a workaround apart from downgrading

Copy link
Member

Choose a reason for hiding this comment

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

@orf, apart from the issues mentioned and the fixes for those specifically (which are in master), can you describe what is continuing to cause you problems? I.e. with the current master branch, how do I see a problem?

Copy link
Author

Choose a reason for hiding this comment

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

I will get back to you here tomorrow morning, after I try installing the specific pipfile I have with the current master

Copy link
Member

Choose a reason for hiding this comment

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

ah, I see the issue in question. This should be resolved by #3007

Copy link
Author

Choose a reason for hiding this comment

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

Awesome! Thanks for your continued work on pipenv, and I'm sorry for the volume of issues!

I will confirm tomorrow that this is fixing it, or though I cannot see any code that would after my brief lookm

# project name and version must be separated by a dash
look_for = search_name.lower() + "-"
if name.startswith(look_for):
Expand Down