Repository navigation
pip compile: change order of check to handle exact argument first - #5111
Merged
Merged
Conversation
Before the checks for when the option and value are together.
charliermarsh
approved these changes
Jul 16, 2024
Member
|
Thanks! I also missed this as reviewer, all good. |
5 tasks done
|
I can feel the anxiety we all have to get this dependabot stuff merged, I coded most of that pr on my cellphone while doing other things. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I messed up the order of checks in #5033, due to which it failed to exclude the case of
-P package, asarg.startswith("-P")check came first and skipped only the first argument.That means that, in the following command:
uv pip compile --output-file pip_compile_uv_header.txt unpinned_uv.in -P attrs==18.1.0The generated header would exclude
-P, but keepattrs==18.1.0.But we want to check for an exact match first and then only check for the case when option and value are together.
This also affected
--find-linksshort option of style-f <uri>.Hopefully, third times going to be a charm. 😳
Summary
Test Plan
I tested locally, and also changed one snapshot test to use
-Pfor variation. I don't think it's worth an extra test, but can do that for sure.