mirror of https://github.com/python/cpython.git
bpo-41282: Consistent message and filter warning in setup.py (GH-25571)
Signed-off-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
c8666cfa7c
commit
a460ab3134
|
@ -57,7 +57,7 @@
|
||||||
from sysconfig import _fix_pcbuild
|
from sysconfig import _fix_pcbuild
|
||||||
|
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
'the distutils.sysconfig module is deprecated, use sysconfig instead',
|
'The distutils.sysconfig module is deprecated, use sysconfig instead',
|
||||||
DeprecationWarning,
|
DeprecationWarning,
|
||||||
stacklevel=2
|
stacklevel=2
|
||||||
)
|
)
|
||||||
|
|
12
setup.py
12
setup.py
|
@ -33,8 +33,16 @@
|
||||||
|
|
||||||
with warnings.catch_warnings():
|
with warnings.catch_warnings():
|
||||||
# bpo-41282 (PEP 632) deprecated distutils but setup.py still uses it
|
# bpo-41282 (PEP 632) deprecated distutils but setup.py still uses it
|
||||||
warnings.filterwarnings("ignore", "The distutils package is deprecated",
|
warnings.filterwarnings(
|
||||||
DeprecationWarning)
|
"ignore",
|
||||||
|
"The distutils package is deprecated",
|
||||||
|
DeprecationWarning
|
||||||
|
)
|
||||||
|
warnings.filterwarnings(
|
||||||
|
"ignore",
|
||||||
|
"The distutils.sysconfig module is deprecated, use sysconfig instead",
|
||||||
|
DeprecationWarning
|
||||||
|
)
|
||||||
|
|
||||||
from distutils import log
|
from distutils import log
|
||||||
from distutils.command.build_ext import build_ext
|
from distutils.command.build_ext import build_ext
|
||||||
|
|
Loading…
Reference in New Issue