-
Notifications
You must be signed in to change notification settings - Fork 257
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
Compatible release clause behaviour differs from PEP440 for versions with prerelease #100
Comments
It seems like that wording in the PEP 440 is indeed at odds with the actual implementation, which explicitly treats prereleases differently: packaging/packaging/specifiers.py Lines 452 to 462 in fc86d7e
Currently prereleases are not ignored, but treated as it's own segment, so you get this instead:
Given that @dstufft was the one to originally implement it like this, perhaps he has an idea about why? |
This bug becomes more outstanding as |
PEP440 gives the example that
~= 1.4.5a4
should be equivalent to>= 1.4.5a4, == 1.4.*
, however:It appears there has been a misinterpretation, treating
~=1.4.5a4
as>= 1.4.5a4, == 1.4.5.*
. Compare this to PEP440: "If a pre-release, post-release or developmental release is named in a compatible release clause as V.N.suffix , then the suffix is ignored when determining the required prefix match".My environment:
The text was updated successfully, but these errors were encountered: