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

[BUG] setuptools.command.develop leaks pkg_resources DeprecationWarning #3878

Open
hroncok opened this issue Mar 31, 2023 · 0 comments
Open
Labels
bug Needs Triage Issues that need to be evaluated for severity and status.

Comments

@hroncok
Copy link
Contributor

hroncok commented Mar 31, 2023

setuptools version

67.6.1, 69.0.3

Python version

3.11.2, 3.12.1

OS

Fedora Linux

Additional environment information

This happens with other Python versions as well.

Description

When setuptools.command.develop is imported, pkg_resources DeprecationWarning is omitted, but the user is not importing pkg_resources, setuptools are doing it.

Expected behavior

Setuptools-internal imports of pkg_resources should not emit DeprecationWarnings about pkg_resources . They might convert such DeprecationWarnings to deprecations of the actually user-imported modules if that i the plan.

How to Reproduce

(venv) $ pip install -U setuptools
(venv) $ python -X dev
Python 3.11.2 (main, Feb  8 2023, 00:00:00) [GCC 12.2.1 20221121 (Red Hat 12.2.1-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from setuptools.command.develop import develop
/home/churchyard/tmp/venv/lib64/python3.11/site-packages/pkg_resources/__init__.py:121: DeprecationWarning: pkg_resources is deprecated as an API
  warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)

Output

>>> from setuptools.command.develop import develop
/home/churchyard/tmp/venv/lib64/python3.11/site-packages/pkg_resources/__init__.py:121: DeprecationWarning: pkg_resources is deprecated as an API
  warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Needs Triage Issues that need to be evaluated for severity and status.
Projects
None yet
Development

No branches or pull requests

1 participant