-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Requires-Python mis-evaluated #11420
Comments
PEP 440 talks of zero-padding, so the current behavior looks correct to me. |
I think the line you quoted applies only specifically to this form:
i.e. no operator, just one single version. If an operator is found in the value, PEP 440 zero-padding applies. I guess you could argue that it’s slightly confusing if looked from a certain angle (Python 3.10.4 is a Python 3.10 so |
it's surprising that I don't see where PEP440 says that zero-padding applies in only one of those circumstances - indeed the linked section explicitly says (emphasis is mine)
So if PEP440 applies here then isn't Edit, one more thing, re
I think it doesn't, I think it very clearly uses the word "always"! |
did a little more digging, I think pip's behaviour is that DId I understand correctly? Is this behaviour justifiable? |
The release padding means adding extra zeros to make things equal to the same length, since When you write that out, it makes more sense I think, since you're effectively evaluating |
I see that's what PEP440 says, but I think it's in disagreement with PEP345. 'Later wins' is fair enough: but then how to have Perhaps the idea is that PEP440 doesn't have anything to say about the naked form |
Given the error potential / ease of misunderstanding, should there be a mandate for warning of intuitive misuse of the zero padding so people may easily get accidental min pins |
To be honest, PEP 345 is from an era when the specs were less rigorously defined 1, and thus the specification in PEP 345 leaves a lot of edge cases or even normal cases somewhat ill defined. However, PEP 440 came after PEP 345 and it supersedes PEP 345 and explicitly doesn't define a "bare" comparison operator, which means two things:
Given that the Footnotes
|
thanks for the discussion |
Description
A package with
Requires-Python: >=3.7,<=3.10
cannot be installed at python 3.10.4:Expected behavior
My reading of PEP-345 is that this should be fine:
So
<=3.10
should be equivalent to<3.11.0
, not to<=3.10.0
pip version
22.2.2
Python version
3.10.4
OS
Ubuntu
How to Reproduce
Output
Code of Conduct
The text was updated successfully, but these errors were encountered: