Filterwarning overide previously defined filters ISSUE:57582

This commit is contained in:
Jean-Yves NOLEN 2020-06-09 13:02:04 +02:00 committed by Daniel Wozniak
parent bc566c117d
commit 24d503ab97
3 changed files with 9 additions and 0 deletions

View file

@ -38,6 +38,7 @@ warnings.filterwarnings(
"", # No deprecation message match
DeprecationWarning, # This filter is for DeprecationWarnings
r"^(salt|salt\.(.*))$", # Match module(s) 'salt' and 'salt.<whatever>'
append=True,
)
# While we are supporting Python2.6, hide nested with-statements warnings
@ -45,6 +46,7 @@ warnings.filterwarnings(
"ignore",
"With-statements now directly support multiple context managers",
DeprecationWarning,
append=True,
)
# Filter the backports package UserWarning about being re-imported
@ -52,6 +54,7 @@ warnings.filterwarnings(
"ignore",
"^Module backports was already imported from (.*), but (.*) is being added to sys.path$",
UserWarning,
append=True,
)

View file

@ -28,6 +28,7 @@ warnings.filterwarnings(
"", # No deprecation message matchHAS_PSUTIL
DeprecationWarning, # This filter is for DeprecationWarnings
r"^(salt|salt\.(.*))$", # Match module(s) 'salt' and 'salt.<whatever>'
append=True,
)
# While we are supporting Python2.6, hide nested with-statements warnings
@ -35,6 +36,7 @@ warnings.filterwarnings(
"ignore",
"With-statements now directly support multiple context managers",
DeprecationWarning,
append=True,
)
# Filter the backports package UserWarning about being re-imported
@ -42,6 +44,7 @@ warnings.filterwarnings(
"ignore",
"^Module backports was already imported from (.*), but (.*) is being added to sys.path$",
UserWarning,
append=True,
)

View file

@ -14,6 +14,7 @@ warnings.filterwarnings(
"", # No deprecation message match
DeprecationWarning, # This filter is for DeprecationWarnings
r"^(salt|salt\.(.*))$", # Match module(s) 'salt' and 'salt.<whatever>'
append=True,
)
# While we are supporting Python2.6, hide nested with-statements warnings
@ -21,6 +22,7 @@ warnings.filterwarnings(
"ignore",
"With-statements now directly support multiple context managers",
DeprecationWarning,
append=True,
)
# Filter the backports package UserWarning about being re-imported
@ -28,6 +30,7 @@ warnings.filterwarnings(
"ignore",
"^Module backports was already imported from (.*), but (.*) is being added to sys.path$",
UserWarning,
append=True,
)