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

upon dash import: DeprecationWarning: pkg_resources is deprecated as an API #2631

Closed
ghaarsma opened this issue Aug 27, 2023 · 1 comment · Fixed by #2634
Closed

upon dash import: DeprecationWarning: pkg_resources is deprecated as an API #2631

ghaarsma opened this issue Aug 27, 2023 · 1 comment · Fixed by #2634

Comments

@ghaarsma
Copy link

I am getting many deprecation warnings from Setuptools everytime dash is imported:
venv\lib\site-packages\dash\dash.py:22: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html

My dash environment

dash                        2.12.1
dash-bootstrap-components   1.4.2
dash-core-components        2.0.0
dash-html-components        2.0.0
dash-table                  5.0.0

On line 22 from dash.py:

from pkg_resources import get_distribution, parse_version

From setuptools:

Attention

Use of pkg_resources is deprecated in favor of importlib.resources, importlib.metadata and their backports (importlib_resources, importlib_metadata). Some useful APIs are also provided by packaging (e.g. requirements and version parsing). Users should refrain from new usage of pkg_resources and should work to port to importlib-based solutions.

T4rk1n added a commit that referenced this issue Aug 29, 2023
Replace pkg_resources with importlib
@ghaarsma
Copy link
Author

Super. Thanks so much @T4rk1n for the quick turnaround. Looking forward to the next release.

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