bpo-41282: distutils: Fix stacklevel for DeprecationWarning (GH-24657)

DeprecationWarning is emit for `import distutils`, not for `distutils` itself.
This commit is contained in:
Inada Naoki 2021-03-02 11:49:10 +09:00 committed by GitHub
parent a347bc0b35
commit 5bfa945605
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -16,4 +16,4 @@ __version__ = sys.version[:sys.version.index(' ')]
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)

View File

@ -0,0 +1,2 @@
Fixed stacklevel of ``DeprecationWarning`` emitted from ``import
distutils``.