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

Upgrade deprecated pkg_resources #853

Open
wants to merge 1 commit into
base: 1.21.x
Choose a base branch
from

Conversation

AngelOnFira
Copy link

Locally, I'm running tests and getting deprecation warnings for the use of pkg_resources. According to this post:


Use of pkg_resources is deprecated in favor of importlib.resources, importlib.metadata and their backports (importlib_resources, importlib_metadata). Users should refrain from new usage of pkg_resources and should work to port to importlib-based solutions.


This PR makes the changes to follow the deprecation notice.

@AngelOnFira
Copy link
Author

Note; this package uses CoreApi, and it also uses pkg_resources. However, that repo is archived, so I can't upstream a PR there.

@JoelLefkowitz JoelLefkowitz changed the base branch from master to 1.21.x July 21, 2023 13:46
@tahme
Copy link

tahme commented Jul 27, 2023

Note that importlib.metadata is only available for Python >= 3.8 so older versions need to use the backported importlib_metadata package or keep using pkg_resources, like here:
https://github.com/pyscaffold/pyscaffold/pull/318/files#diff-832c6d0841c720713101f1313509d4255dacb74d3cc2c58f05cbe52c53de53ee

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.

None yet

2 participants