8000 [Bug]: DeprecationWarning for pkg_resources.declare_namespace usage in mpl_toolkit · Issue #25244 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
[Bug]: DeprecationWarning for pkg_resources.declare_namespace usage in mpl_toolkit #25244
Closed
@rjgildea

Description

@rjgildea

Bug summary

As of setuptools v67.3.0 the use of pkg_resources.declare_namespace in lib/mpl_toolkits/__init__.py raises a DeprecationWarning.

Code for reproduction

$ mamba create -n test python=3.10 matplotlib-base -y
$ mamba activate test
$ export PYTHONDEVMODE=1
$ python -c "import pkg_resources"

Actual outcome

/path/to/test/lib/python3.10/site-packages/pkg_resources/__init__.py:2804: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  declare_namespace(pkg)

Expected outcome

No output

Additional information

See also:
https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
https://packaging.python.org/en/latest/guides/packaging-namespace-packages/
https://peps.python.org/pep-0420/

Operating system

No response

Matplotlib Version

3.7.0

Matplotlib Backend

TkAgg

Python version

Python 3.10.9

Jupyter version

No response

Installation

conda

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesGood first issueOpen a pull request against these issues if there are no active ones!

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0