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

Don't apply irrelevant constraints when validating site-packages #5231

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

charliermarsh
Copy link
Member

Summary

The current code was checking every constraint against every requirement, regardless of whether they were applicable. In general, this isn't a big deal, because this method is only used as a fast-path to skip resolution -- so we just had way more false-negatives than we should've when constraints were applied. But it's clearly wrong :)

Test Plan

  • uv venv
  • uv pip install flask
  • uv pip install --verbose flask -c constraints.txt (with numpy<1.0)

Prior to this change, Flask was reported as not satisfied.

@charliermarsh charliermarsh requested a review from zanieb July 19, 2024 20:40
@charliermarsh charliermarsh marked this pull request as ready for review July 19, 2024 20:40
@charliermarsh charliermarsh added the bug Something isn't working label Jul 19, 2024
@charliermarsh
Copy link
Member Author

Hard to test because the output logging really isn't any different.

@charliermarsh charliermarsh enabled auto-merge (squash) July 19, 2024 20:47
@charliermarsh charliermarsh merged commit a253913 into main Jul 19, 2024
54 checks passed
@charliermarsh charliermarsh deleted the charlie/constraints branch July 19, 2024 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants