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

Move Requires-Python incompatibilities out of version map #4705

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Jul 1, 2024

Summary

This is required to solve #4669, because the Requires-Python version can now vary across a resolution. For example, within certain forks, we might have a more narrow range, which would allow us to use distributions that would not be allowed for the global resolution.

This should be fine because requires-python is part of the package metadata, so it should be consistent between files within a package version. As such, there shouldn't be any risk that we incorrectly prioritize distributions by omitting this information.

(To be more specific, the risk is something like: we prioritize some wheel over a source distribution within a package-version, so we don't track the source distribution at all. Then, later, when we choose a candidate, we see that the wheel doesn't meet the Requires-Python requirement, even though the source distribution would've met it. If files within a distribution could have varied support, this would be a real risk.)

@charliermarsh charliermarsh added the internal A refactor or improvement that is not user-facing label Jul 1, 2024
Copy link
Member

@zanieb zanieb left a comment

Choose a reason for hiding this comment

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

Interesting 👍

@zanieb
Copy link
Member

zanieb commented Jul 1, 2024

Originally moved here in #1298

@charliermarsh
Copy link
Member Author

I think having it in the version map is actually nice, but it's no longer possible unfortunately.

@charliermarsh charliermarsh merged commit 89b3324 into main Jul 2, 2024
47 checks passed
@charliermarsh charliermarsh deleted the charlie/python-enforcement branch July 2, 2024 12:15
charliermarsh added a commit that referenced this pull request Jul 8, 2024
## Summary

This is fallout from #4705. We need
to respect `requires-python` in the prefetch code to avoid building
unsupported distributions.

Closes #4898.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal A refactor or improvement that is not user-facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants