Repository navigation
Conversation
Linked issuesChecked at commit 963e433 #11262 poetry lock >= 2.5.0: overlapping markers for a package locked in two versions (torch / nvidia-cuda-nvrtc) · 1 of 1 met
|
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. If the extra-marker branches are combined incorrectly, the solver can select or record the wrong dependency version in a lockfile. Reverting fixes future resolutions, but lockfiles already generated with the wrong result need to be regenerated.
When two extras of a dependency pin the same version on one platform, Poetry can also lock a fallback version for that platform. It drops extra conditions instead of checking which extras the dependency uses. Evaluate extras in the package that declares them, and keep a fallback only where none of the requirements apply. Leave the original dependency metadata intact. Fixes python-poetry#11262 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e67fac27-603e-43eb-a3fb-abbecba87656
This branch has not been deployed
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.
When two extras of a dependency pin the same version on one platform, Poetry can also lock a fallback version for that platform. It drops extra conditions instead of checking which extras the dependency uses.
Evaluate extras in the package that declares them, and keep a fallback only where none of the requirements apply. Leave the original dependency metadata intact.
Fixes #11262
GPT-generated; and I confess that I haven't thought about it hard to enough to be able to say that I understand every line of the fix. It looks about right and the tests pass.
I have more or less reached the point where I am willing to trust the AI on such things - if the testcases look good, if the code is cleanly factored; and if I have pressed it hard enough and it still insists that it has done a good job.
Reviewers may or may not feel the same way.