Skip to content

Conversation

zooba
Copy link
Member

@zooba zooba commented Jan 27, 2021

@zooba zooba merged commit 62949f6 into python:master Jan 29, 2021
@zooba zooba deleted the bpo-41282 branch January 29, 2021 21:49
@methane
Copy link
Member

methane commented Feb 26, 2021

I see this warning is emit for distutils/__init__.py.

/Users/inada-n/work/python/cpython/Lib/distutils/__init__.py:16: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives

How about adding stacklevel to emit warning for modules importing distutils?

patch:

--- a/Lib/distutils/__init__.py
+++ b/Lib/distutils/__init__.py
@@ -16,4 +16,4 @@
 warnings.warn("The distutils package is deprecated and slated for "
               "removal in Python 3.12. Use setuptools or check "
               "PEP 632 for potential alternatives",
-              DeprecationWarning)
+              DeprecationWarning, 2)

warning:

/Users/inada-n/work/python/cpython/./setup.py:33: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives

PR: #24657

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

Successfully merging this pull request may close these issues.

5 participants