Skip to content

[RFR] replace pkg_resources dependency by other dependencies - #128

Draft
thomaspaulb wants to merge 2 commits into
acsone:masterfrom
thomaspaulb:remove-dependency-pkg-resources
Draft

thomaspaulb wants to merge 2 commits into
acsone:masterfrom
thomaspaulb:remove-dependency-pkg-resources

Conversation

@thomaspaulb

Copy link
Copy Markdown

Attempt at #127

Wanted to give this an honest shot, but I'm not sure I'm going to be able to finish this

@sbidoul sbidoul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sounds good. Probably needs to work on the tox config to test with setuptools<82.

Nor urgency though as the existing workarounds work well.

from importlib.resources import files
except ImportError:
# Fallback for Python < 3.9
from importlib_resources import files

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I prefer to do this with if sys.version_info < (3, 9). Easier to spot if and when we drop support for older pythons.

import subprocess

from pkg_resources import parse_version
import packaging

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
import packaging
from packaging.version import parse_version

?

This branch has not been deployed

No deployments
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