Always use release-only comparisons for requires-python#4794
Merged
charliermarsh merged 1 commit intomainfrom Jul 4, 2024
Merged
Always use release-only comparisons for requires-python#4794charliermarsh merged 1 commit intomainfrom
requires-python#4794charliermarsh merged 1 commit intomainfrom
Conversation
4cfb8a2 to
7c152c9
Compare
Member
Author
|
Gotta fix the snapshots, which is just about how we display those versions. |
charliermarsh
commented
Jul 4, 2024
| #[inline] | ||
| #[must_use] | ||
| pub fn only_release(&self) -> Self { | ||
| Self::new(self.release().iter().copied()) |
Member
Author
There was a problem hiding this comment.
Is it worth trying to avoid a copy here?
konstin
approved these changes
Jul 4, 2024
| } | ||
| } | ||
|
|
||
| impl PubGrubSpecifier { |
Member
There was a problem hiding this comment.
Can we merge the two impl PubGrubSpecifier blocks?
Member
Author
|
Sounds good. I'll add some more documentation. |
ca57771 to
309d708
Compare
309d708 to
416e17c
Compare
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.
Summary
There are a few ideas at play here:
Requires-Python, so we now do the same. That means, e.g., using3.13.0b0will be accepted by a project withRequires-Python: >= 3.13, which does not adhere to PEP 440 semantics but is somewhat intuitive.python_version >= '3.10' or python_version < '3.10'can be collapsed to the truthy marker.Closes #4714.
Closes #4272.
Closes #4719.