Skip to content

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

Closed
@ghaarsma

Description

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.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions