Replace parse_version() with parse()#42
Merged
return42 merged 1 commit intoreturn42:masterfrom Feb 9, 2026
Merged
Conversation
Python 3.12 has removed pkg_resources from the standard library (moved to setuptools) [1]. While simplest fix would be to require setuptools, due deprecation is better to move to packaging [2]. Therefore replace parse_version() from pkg_resources with parse() from packaging. [1] https://docs.python.org/3/whatsnew/3.12.html [2] https://pypi.org/project/packaging/ Fixes: return42#41 Signed-off-by: Petr Vorel <pvorel@suse.cz>
Owner
|
Thanks a lot for the fix .. I think its time for a new pypi release .. sadly I don't yet have time for .. can you live without a pypi release for now? (cloning from the repository?) |
Contributor
Author
|
Thanks for a quick merge.
Don't worry. We use it from readthedocs.io (https://linux-test-project.readthedocs.io/), which uses old Ubuntu. And for local development I use workaround |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Python 3.12 has removed pkg_resources from the standard library (moved to setuptools):
https://docs.python.org/3/whatsnew/3.12.html
While the simplest fix would be to require
setuptools, it's probably better to move toparse()from packaging.Fixes: #41