Skip to content
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

Incorrect __contains__ resolution in VersionRange #137

Closed
keshav-space opened this issue Jul 24, 2024 · 0 comments · Fixed by #108
Closed

Incorrect __contains__ resolution in VersionRange #137

keshav-space opened this issue Jul 24, 2024 · 0 comments · Fixed by #108
Assignees
Labels
1-next bug Something isn't working

Comments

@keshav-space
Copy link
Member

The __contains__ method in VersionRange does not correctly resolve whether the version is within the range, for the edge case given below.

>>> from univers.version_range import VersionRange
>>> from univers.versions import PypiVersion
>>> vr = VersionRange.from_string("vers:pypi/<=1.3.0|3.0.0")
>>> PypiVersion("1.0.0") in vr
False
@keshav-space keshav-space added the bug Something isn't working label Jul 24, 2024
keshav-space added a commit to keshav-space/univers that referenced this issue Jul 24, 2024
- Pairwise constraint evaluation misses the case when filtered
 constraints contains only one item
- Fixes aboutcode-org#137

Signed-off-by: Keshav Priyadarshi <[email protected]>
@keshav-space keshav-space self-assigned this Jul 31, 2024
@pombredanne pombredanne added 1-next bug Something isn't working and removed bug Something isn't working labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-next bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants