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

Remove import exception in Python3.12 #24

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

paaguti
Copy link

@paaguti paaguti commented Jan 8, 2025

Python 3.12 doesn't support png_resources anymore. We need to circumvent this by using import lib_metadata instead.

For python3.12 you need import lib_metadata
Import import lib_metadata when png_resources is not available
@Avasam
Copy link

Avasam commented Feb 3, 2025

Python 3.12 doesn't support pkg_resources anymore

Python 3.12 doesn't ship distutils in the stdlib anymore. setuptools still has distutils and pkg_resources.
On Python 3.8+ importlib.metadata should also be preferred over the backport importlib_metadata. I created a similar PR (#25) with a slightly different approach as I also want to stop relying on setuptools at runtime. Up to the maintainers which approach they prefer.

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