-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Canonicalize req name while doing pre-install package search #8054
Canonicalize req name while doing pre-install package search #8054
Conversation
e3b8f54
to
94cdef2
Compare
Hi @uranusjr I have filed this PR according to your suggestion on the ticket. Also to write a unit test for this, is it enough to try and install two packages, one with a |
I think you can just write a test to install one package, but |
Thanks, I have parametrized the tests in the latest commit |
ee6506f
to
10f0941
Compare
CI isn't particularly happy with this change. :) |
Yep, I am having some difficulties writing a custom |
10f0941
to
d7a19f8
Compare
eb1dcd6
to
5acd20b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, barring the clarification requested by @uranusjr.
5acd20b
to
2d0f84e
Compare
Thanks, I think this is ready to be merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The difference between search_distribution
and get_distribution
is a bit too subtle for me, it’d probably be a good idea to change them to something like get_distribution(name)
and get_distribution(name, refresh=True)
or something similar (I’m terribly at naming arguments, feel free to call the flag something else).
The implementation looks good to me though, so I wouldn’t mind this being kept as-is if others find it easy to read, or do a follow-up refactoring instead.
I thought of I agree that we can address this in a follow-up refactoring as well, but I am okay to rename the function as well. I'll wait for @pradyunsg to give his thoughts on this as well, before deciding on either of them. |
Given that I can address the follow-up comment by @uranusjr in a separate PR, may I get this PR merged? |
Hi @pradyunsg May I get this PR merged? |
530418d
to
f675874
Compare
Rebased to remove the extra merge commits. |
Hello! I am an automated bot and I have noticed that this pull request is not currently able to be merged. If you are able to either merge the |
f675874
to
ac624f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor comment, otherwise this LGTM
Thanks for the review @chrahunt . I have addressed the comment, and the CI is green now, so this can be merged :) |
Fixes and closes #5021
Package name should be normalized before we use it to search if it's already installed or not. This will avoid cases like for e.g.
pip install fluent.logger
running install again, ifpip install fluent-logger
was already run, by ensuring thatfluent.logger
is normalized tofluent-logger