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

pkg_resources is deprecated as an API #851

Open
wferi opened this issue Jun 5, 2023 · 2 comments
Open

pkg_resources is deprecated as an API #851

wferi opened this issue Jun 5, 2023 · 2 comments

Comments

@wferi
Copy link

wferi commented Jun 5, 2023

Bug Report

Description

Loading the module under pytest when DeprecationWarnings are treated as errors leads to the

[...]
  File "/source/.venv/lib/python3.10/site-packages/drf_yasg/__init__.py", line 2, in <module>
    from pkg_resources import DistributionNotFound, get_distribution
  File "/source/.venv/lib/python3.10/site-packages/pkg_resources/__init__.py", line 121, in <module>
    warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)
DeprecationWarning: pkg_resources is deprecated as an API

traceback.

Is this a regression?

No, it depends on the Python version instead: 3.9 does not complain, 3.10 does.

Your Environment

Ubuntu jammy with Python 3.10

@mgenereu
Copy link

I'm seeing it with Python 3.9.

@jsheffie
Copy link

I am also seeing it with debian slim-bookworm and python 3.12

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

No branches or pull requests

3 participants