bpo-41520: Fix second codeop regression (GH-21848)
* bpo-41520: Fix second codeop repression
Fix the repression introduced by the initial regression fix.
diff --git a/Lib/codeop.py b/Lib/codeop.py
index 5476292..4c10470 100644
--- a/Lib/codeop.py
+++ b/Lib/codeop.py
@@ -85,9 +85,9 @@
pass
# Catch syntax warnings after the first compile
- # to emit SyntaxWarning at most once.
+ # to emit warnings (SyntaxWarning, DeprecationWarning) at most once.
with warnings.catch_warnings():
- warnings.simplefilter("error", SyntaxWarning)
+ warnings.simplefilter("error")
try:
code1 = compiler(source + "\n", filename, symbol)