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

Fix compatible version specifier incorrectly strip trailing '0' #493

Merged
merged 7 commits into from
Jan 15, 2022
Merged

Fix compatible version specifier incorrectly strip trailing '0' #493

merged 7 commits into from
Jan 15, 2022

Conversation

kasium
Copy link
Contributor

@kasium kasium commented Dec 13, 2021

When comparing two specifier with the compatible operator, tailing zeros are incorrectly stripped.

Closes #421

packaging/specifiers.py Outdated Show resolved Hide resolved
packaging/utils.py Outdated Show resolved Hide resolved
Co-authored-by: Pradyun Gedam <[email protected]>
@uranusjr
Copy link
Member

Not sure if we need a test case for the specific problem raised originally in pypa/pip#9613—make sure 1.19.5 is not contained in SpecifierSet("~=1.18.0") & Specifier("~=1.18").

@kasium
Copy link
Contributor Author

kasium commented Dec 14, 2021

Not sure if we need a test case for the specific problem raised originally in pypa/pip#9613—make sure 1.19.5 is not contained in SpecifierSet("~=1.18.0") & Specifier("~=1.18").

let's add one

@kasium
Copy link
Contributor Author

kasium commented Dec 22, 2021

Hi all, can this now be merged?

packaging/utils.py Outdated Show resolved Hide resolved
@brettcannon
Copy link
Member

It is the holidays so I don't know who's available to do a thorough review (I just quickly glanced at the code). At worst we can look at merging it in the new year.

Co-authored-by: Brett Cannon <[email protected]>
@kasium
Copy link
Contributor Author

kasium commented Dec 22, 2021

Thanks, sound fine to me

@brettcannon brettcannon self-requested a review January 11, 2022 22:26
@brettcannon
Copy link
Member

Code LGTM, but this isn't my area of expertise. I'll give @pradyunsg a week to review, otherwise I will just lean on the review from @uranusjr . Feel free to @ me on this PR, @kasium in a week to get this merged.

@pradyunsg pradyunsg merged commit e99b37e into pypa:main Jan 15, 2022
@pradyunsg
Copy link
Member

Thanks @kasium for the PR, and thanks @brettcannon for the mention! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compatible version specifier merge incorrectly strip trailing "0" components
4 participants