bpo-41282: Consistent message and filter warning in setup.py (GH-25571) · python/cpython@a460ab3 (original) (raw)
2 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -57,7 +57,7 @@ | ||
57 | 57 | from sysconfig import _fix_pcbuild |
58 | 58 | |
59 | 59 | warnings.warn( |
60 | -'the distutils.sysconfig module is deprecated, use sysconfig instead', | |
60 | +'The distutils.sysconfig module is deprecated, use sysconfig instead', | |
61 | 61 | DeprecationWarning, |
62 | 62 | stacklevel=2 |
63 | 63 | ) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -33,8 +33,16 @@ | ||
33 | 33 | |
34 | 34 | with warnings.catch_warnings(): |
35 | 35 | # bpo-41282 (PEP 632) deprecated distutils but setup.py still uses it |
36 | -warnings.filterwarnings("ignore", "The distutils package is deprecated", | |
37 | -DeprecationWarning) | |
36 | +warnings.filterwarnings( | |
37 | +"ignore", | |
38 | +"The distutils package is deprecated", | |
39 | +DeprecationWarning | |
40 | + ) | |
41 | +warnings.filterwarnings( | |
42 | +"ignore", | |
43 | +"The distutils.sysconfig module is deprecated, use sysconfig instead", | |
44 | +DeprecationWarning | |
45 | + ) | |
38 | 46 | |
39 | 47 | from distutils import log |
40 | 48 | from distutils.command.build_ext import build_ext |