mirror of https://github.com/python/cpython
bpo-41282: distutils: Fix stacklevel for DeprecationWarning (GH-24657)
DeprecationWarning is emit for `import distutils`, not for `distutils` itself.
This commit is contained in:
parent
a347bc0b35
commit
5bfa945605
|
@ -16,4 +16,4 @@ __version__ = sys.version[:sys.version.index(' ')]
|
||||||
warnings.warn("The distutils package is deprecated and slated for "
|
warnings.warn("The distutils package is deprecated and slated for "
|
||||||
"removal in Python 3.12. Use setuptools or check "
|
"removal in Python 3.12. Use setuptools or check "
|
||||||
"PEP 632 for potential alternatives",
|
"PEP 632 for potential alternatives",
|
||||||
DeprecationWarning)
|
DeprecationWarning, 2)
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
Fixed stacklevel of ``DeprecationWarning`` emitted from ``import
|
||||||
|
distutils``.
|
Loading…
Reference in New Issue