Skip to content

Replace pkg_resources with importlib.metadata. #203

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

Merged

Conversation

clalancette
Copy link
Contributor

As of setuptools 68.0.0, the entire pkg_resources library is deprecated. Switch away from pkg_resources.iter_entry_points and instead use importlib.metadata.entry_points(), which provides the same information in a slightly different format.

This should fix #201

As of setuptools 68.0.0, the entire pkg_resources library
is deprecated.  Switch away from pkg_resources.iter_entry_points
and instead use importlib.metadata.entry_points(), which
provides the same information in a slightly different format.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Signed-off-by: Chris Lalancette <clalancette@gmail.com>
@clalancette
Copy link
Contributor Author

Friendly ping on this one. This should get rid of warnings when using this flake8 plugin with newer Python.

@zzzeek
Copy link
Contributor

zzzeek commented Jun 2, 2025

hi flake8-import-order this change is pretty important for continued compatibility, any merge / release on the horizon? I'm about ready to fork for this one

@sigmavirus24 sigmavirus24 force-pushed the clalancette/switch-to-importlib branch from 1a01476 to 29fef68 Compare June 9, 2025 13:28
@sigmavirus24 sigmavirus24 merged commit 64f3647 into PyCQA:main Jun 9, 2025
8 checks passed
@zzzeek
Copy link
Contributor

zzzeek commented Jun 9, 2025

thanks!

@sigmavirus24
Copy link
Member

Still need to verify if I can release this at all tonight but will do my best

@clalancette clalancette deleted the clalancette/switch-to-importlib branch June 9, 2025 15:13
@sigmavirus24
Copy link
Member

0.19.0 is out with this fix

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.

DeprecationWarning: pkg_resources is deprecated as an API on python 3.11
3 participants