You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As in the title, ==0.1.* doesn't match the version 0.1+upstream.2. I discovered this as a result of specifying a requirement ~=0.1.0, and getting 0.1 instead of 0.1+upstream.2. I can produce a reproducing example if necessary.
The text was updated successfully, but these errors were encountered:
While I'm thinking about this, it would also be nice to be able to have requirements be able to match against upstream versions. >=0.1.0+upstream.2 ignores the bit after the +, and effectively works the same as >=0.1.0.
Double checking PEP 440, I see why that doesn't work:
PEP 440 says:
Local version identifiers are NOT permitted in this version specifier.
I don't recall exactly why we did that, I think it was likely to prevent (or discourage) people from uploading things to PyPI that had a dependency on a particular local version. In fact, the PEP disallows local versions like that in all specifiers except for == (without the .*) and ===. The "ignoring" behavior you're seeing is because we fall back onto a legacy implementation if something isn't a valid PEP 440 specifier which I think probably has that behavior.