diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py index 439040deb56..aa63093a3f0 100644 --- a/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py @@ -57,7 +57,7 @@ from sysconfig import _fix_pcbuild warnings.warn( - 'the distutils.sysconfig module is deprecated, use sysconfig instead', + 'The distutils.sysconfig module is deprecated, use sysconfig instead', DeprecationWarning, stacklevel=2 ) diff --git a/setup.py b/setup.py index df434d48768..4f4b42d1d9d 100644 --- a/setup.py +++ b/setup.py @@ -33,8 +33,16 @@ with warnings.catch_warnings(): # bpo-41282 (PEP 632) deprecated distutils but setup.py still uses it - warnings.filterwarnings("ignore", "The distutils package is deprecated", - DeprecationWarning) + warnings.filterwarnings( + "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.command.build_ext import build_ext