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

Fix: Replace pkg_resources with importlib.resources #395

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alcrene
Copy link
Contributor

@alcrene alcrene commented Apr 21, 2024

Importing pkg_resources causes errors on recent Python. The functionality we use is now available as import.resources.files since Python 3.9.

For Python 3.7 and 3.8, this commit uses the import_resources backport, and for Python ≤3.6, the old implementation with pkg_resources is kept.

Importing `pkg_resources` causes errors on recent Python.
The functionality we use is available as `import.resources.files`
since Python 3.9;
for Python 3.7 and 3.8, the backport `import_resources` is used;
for Python ≤3.6, the old implementation with `pkg_resources` is used.
@alcrene alcrene changed the title Replace pkg_resources with importlib.resources Fix: Replace pkg_resources with importlib.resources Apr 21, 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.

1 participant