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 packaging.version instead of pkg_resources.parse_version by default #180

Closed
wants to merge 1 commit into from

Conversation

felixonmars
Copy link
Contributor

packaging.version is the new standard and should be preferred now. It
reduces startup time significantly too as pkg_resources is expensive to
import.

parse_version is only kept for compatibility here, perhaps consider
removing it in the future.

packaging.version is the new standard and should be preferred now. It
reduces startup time significantly too as pkg_resources is expensive to
import.

parse_version is only kept for compatibility here, perhaps consider
removing it in the future.
@felixonmars
Copy link
Contributor Author

The test failures are irrelevant.

@lilydjwg
Copy link
Owner

lilydjwg commented May 6, 2021

The issue with packaging.version is that, it's designed to work with Python packages' versions only. Something like R2020 or 1.1.1.k will fall back to LegacyVersion which is going to be removed soon.

We may need to implement a loose version comparison algorithm ourselves.

@yan12125
Copy link
Contributor

yan12125 commented May 6, 2021

Test failures are addressed in #181

@felixonmars
Copy link
Contributor Author

Something like R2020 or 1.1.1.k will fall back to LegacyVersion which is going to be removed soon.

pkg_resources.parse_version uses the same code here, IIRC. (The LegacyVersion warning is also present in current test implementation.)

@lilydjwg lilydjwg closed this in 606b3f6 Jul 18, 2021
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.

None yet

3 participants