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

Use verlib2.Version for comparing versions #591

Merged
merged 1 commit into from
Oct 25, 2023
Merged

Use verlib2.Version for comparing versions #591

merged 1 commit into from
Oct 25, 2023

Conversation

amotl
Copy link
Member

@amotl amotl commented Oct 23, 2023

About

For not duplicating corresponding code any longer, there is the verlib2 package now, which includes the same canonical code from packaging.version as before, see GH-513.

@amotl amotl requested review from seut and matriv October 23, 2023 22:02
@amotl amotl marked this pull request as draft October 23, 2023 23:00
seut
seut previously approved these changes Oct 24, 2023
Copy link
Member

@seut seut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@seut seut dismissed their stale review October 24, 2023 10:30

test failuers

Copy link
Member

@seut seut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great! but it seems not to work as expected as a lot of test fail?

Comment on lines -398 to -403
@property
def version(self) -> tuple:
"""
PATCH: Return version tuple for backward-compatibility.
"""
return self._version.release
Copy link
Member Author

@amotl amotl Oct 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seut: This little polyfill needs to be added to verlib2, to make it compatible with the previous LooseVersion/StrictVersion classes from distutils.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The snippet to gain backwards-compatibility has been added with verlib2 0.2.0. It resolves the issue of failing test cases.

@amotl amotl marked this pull request as ready for review October 24, 2023 19:21
@amotl amotl requested a review from seut October 24, 2023 19:22
@amotl amotl merged commit bc56873 into master Oct 25, 2023
28 checks passed
@amotl amotl deleted the amo/use-verlib2 branch October 25, 2023 16:16
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.

2 participants