Skip to content

bpo-41282: Consistent message and filter warning in setup.py (GH-25571) #25571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/distutils/sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
12 changes: 10 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down