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?
to your account
Orginally reported as pypa/pip#7900.
Currently the specifier equivalence check compares the contained version as a string. packaging.version.parse should be used instead to ensure equivalent version strings are considered equal.
>>> from packaging.specifiers import SpecifierSet
>>> SpecifierSet("==2.8.0") == SpecifierSet("==2.8.0")
>>> SpecifierSet("==2.8.0") == SpecifierSet("==2.8")
The text was updated successfully, but these errors were encountered:
The issue is that the specifiers are not considered equal:
Lines 139 to 149
>>> from packaging.specifiers import Specifier
>>> Specifier('==2.8.0') == Specifier('==2.8')
>>> Specifier('==2.8.0') == Specifier('==2.8.0')
We should canonicalize the version when comparing them, I created #283 to fix this.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.