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 importlib.metadata (pygal requires 3.8+) #546

Closed
wants to merge 1 commit into from

Conversation

akx
Copy link
Contributor

@akx akx commented Nov 21, 2023

Fixes #545 (comment)

importlib_metadata from PyPI is only required for Python < 3.8; importlib.metadata is always available on 3.8+, and the minimum python_requires here is 3.8+ (01649cb).

Regressed in d1d02c6

@akx
Copy link
Contributor Author

akx commented Nov 21, 2023

cc @gentooboontoo :)

@gentooboontoo
Copy link
Member

Thanks @akx. Unfortunately importlib.metadata API changed in Python 3.10.

Unless I am wrong, using importlib_metadata allows to use the latest API with Python < 3.10 (see #545 (comment) and compatibility notes). The dependency will be dropped once support for Python 3.9 is discontinued.

@akx
Copy link
Contributor Author

akx commented Nov 21, 2023

@gentooboontoo Shouldn't tests catch that? I'm currently on mobile so I can't see whether CI has run here.

@akx
Copy link
Contributor Author

akx commented Nov 21, 2023

(Back from lunch.) Oh, there is no CI that would run here... I can make a PR to fix that first made a PR to fix that: #549.

@akx
Copy link
Contributor Author

akx commented Nov 21, 2023

Okay, never mind – until targeting Python 3.10+, using importlib-metadata from PyPI is probably an okay idea.

See https://pypi.org/project/backports.entry-points-selectable/.

@akx akx closed this Nov 21, 2023
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.0.1 switched to a deprecated importlib.metadata API that's removed in Python 3.12
2 participants