mirror of https://github.com/python/cpython.git
Suppressing all DeprecationWarning messages was a bit of a problem for
the -Qwarnall option, so I've changed this to only filter out the one warning that's a problem in practice.
This commit is contained in:
parent
81fc7783ed
commit
61b850110f
|
@ -2,9 +2,6 @@
|
|||
import sys
|
||||
|
||||
def check_all(modname):
|
||||
import warnings
|
||||
warnings.filterwarnings("ignore", "", DeprecationWarning, modname)
|
||||
|
||||
names = {}
|
||||
try:
|
||||
exec "import %s" % modname in names
|
||||
|
@ -122,6 +119,9 @@ def check_all(modname):
|
|||
check_all("random")
|
||||
check_all("re")
|
||||
check_all("reconvert")
|
||||
import warnings
|
||||
warnings.filterwarnings("ignore", ".* regsub .*", DeprecationWarning, "regsub",
|
||||
append=1)
|
||||
check_all("regsub")
|
||||
check_all("repr")
|
||||
check_all("rexec")
|
||||
|
|
Loading…
Reference in New Issue