-
Notifications
You must be signed in to change notification settings - Fork 2.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
Version matching bug (or feature)? #4729
Version matching bug (or feature)? #4729
Comments
I would say this is a bug. And that the following lines in core should be removed. I also suspect these lines (or similar) should be added to elif _this.is_local() and (not _other.is_local() or _this.local != _other.local):
return False This was introduced explicitly in the following PRs.
That said, I suspect the correct behaviour is to always ensure local tag is respected when compared, ie. that tag must exist even for public version identifiers are within allowed ranges. Eg: |
Prior to this change, local label comparison was inconsistent with PEP 440. This change ensures that the local version label is checked for equivalence using a strict string equality comparison. Resolves: python-poetry/poetry#4729
Prior to this change, local label comparison was inconsistent with PEP 440. This change ensures that the local version label is checked for equivalence using a strict string equality comparison. Resolves: python-poetry/poetry#4729
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Issue
The "weak equality" logic in
poetry.core.semver.version.allows
appears to treat non-local to local and local to non-local version comparison symmetrically. For example,My expectation, apparently also supported by PEP 440, would be that the latter should evaluate to
False
.https://www.python.org/dev/peps/pep-0440/#version-matching
What do you think? Is this a bug or a feature?
Or, perhaps, my interpretation of PEP 440 is wrong, and this is a compliant implementation...
The text was updated successfully, but these errors were encountered: