summaryrefslogtreecommitdiffstats
path: root/Lib/warnings.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/warnings.py')
-rw-r--r--Lib/warnings.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/warnings.py b/Lib/warnings.py
index 8d46cd6..a88e7ba 100644
--- a/Lib/warnings.py
+++ b/Lib/warnings.py
@@ -383,8 +383,8 @@ except ImportError:
# Module initialization
_processoptions(sys.warnoptions)
if not _warnings_defaults:
- simplefilter("ignore", category=PendingDeprecationWarning, append=1)
- simplefilter("ignore", category=ImportWarning, append=1)
+ for cls in (DeprecationWarning, PendingDeprecationWarning, ImportWarning):
+ simplefilter("ignore", category=cls, append=True)
bytes_warning = sys.flags.bytes_warning
if bytes_warning > 1:
bytes_action = "error"