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

DeprecationWarning: pkg_resources is deprecated as an API #593

Closed
ClementPinard opened this issue Apr 26, 2023 · 0 comments · Fixed by #594
Closed

DeprecationWarning: pkg_resources is deprecated as an API #593

ClementPinard opened this issue Apr 26, 2023 · 0 comments · Fixed by #594

Comments

@ClementPinard
Copy link
Contributor

ClementPinard commented Apr 26, 2023

pkg_resources is called from eta.core.utils, but its use is now deprecated, since setuptools > 67.5

See the warning on most recent file here : https://github.com/pypa/setuptools/blame/main/pkg_resources/__init__.py#L121

See commit introducing the warning here : pypa/setuptools@a1aeda3

Did not know why I had tons of warnings when running tests for my own library, and found the culprit in this package. I can go back to setuptools 65 the same way pip did : pypa/pip#11975, but might as well prepare for the future.

Recommendation is to use importlib.resources instead of pkg_resources, see related discussion : simonw/datasette#2057 (nice demonstration of chatgpt pair programming ! 😛 )

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 a pull request may close this issue.

1 participant