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

Drop runtime dependency on setuptools for entrypoint enumeration and version parsing #166

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

eli-schwartz
Copy link
Contributor

  • globally replace pkg_resources.parse_version with non-aliased class

    For a long time now, pkg_resources has depended on a (possibly vendored) copy of the packaging module, and imports Version as parse_version.

    Use the original class directly. Add a direct dependency on packaging to make sure it's visibly required.

    pkg_resources is deprecated and the recommended replacement is to directly use packaging where relevant. The result is faster to load, and more guaranteed to work e.g. in environments where setuptools isn't installed by default.

  • drop dependency on setuptools at runtime to enumerate entrypoints

    pkg_resources is deprecated and the recommended replacement is to use importlib.metadata where relevant. The result is faster to load, and more guaranteed to work e.g. in environments where setuptools isn't installed by default.

For a long time now, pkg_resources has depended on a (possibly vendored)
copy of the packaging module, and imports `Version` as `parse_version`.

Use the original class directly. Add a direct dependency on packaging to
make sure it's visibly required.

pkg_resources is deprecated and the recommended replacement is to
directly use packaging where relevant. The result is faster to load, and
more guaranteed to work e.g. in environments where setuptools isn't
installed by default.
pkg_resources is deprecated and the recommended replacement is to use
importlib.metadata where relevant. The result is faster to load, and
more guaranteed to work e.g. in environments where setuptools isn't
installed by default.
@eli-schwartz
Copy link
Contributor Author

I could not run tests in CI due to #165 but it seems to pass locally via tox.

@felixonmars felixonmars merged commit bcd836e into jd:master Feb 2, 2024
1 check passed
@tobias-urdin tobias-urdin mentioned this pull request Feb 12, 2024
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.

3 participants