-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Description
setuptools version
setuptools==65.0.1
Python version
any
OS
any
Additional environment information
No response
Description
Recent versions of setuptools override Python stdlib's distutils with setuptools._distutils via _distutils_hack. This version does not contain code to issue deprecation warnings. It's a deviation from upstream code. setuptools should keep the deprecation warning to inform users that they should move from distutils to setuptools.
See also #3532
Expected behavior
$ venv/bin/pip install "setuptools==59.6.0"
$ venv/bin/python -Werror -c "import distutils"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib64/python3.10/distutils/__init__.py", line 19, in <module>
warnings.warn(_DEPRECATION_MESSAGE,
DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
How to Reproduce
python3 -m venv venv- Install recent setuptools, e,g.
venv/bin/pip install "setuptools==65.0.1" - Run
venv/bin/python -Werror -c "import distutils"
Output
no output, command does not raise a deprecation warning
n1ngu