summaryrefslogtreecommitdiffstats
path: root/Lib/codeop.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2020-08-13 17:18:49 (GMT)
committerGitHub <noreply@github.com>2020-08-13 17:18:49 (GMT)
commitc818b15fa59039de67022c29085d439fa5d3ef95 (patch)
tree7d5f50d4566164d94ac42da59ab141bed9d03adb /Lib/codeop.py
parent46d10b1237c67ff8347f533eda6a5468d098f7eb (diff)
downloadcpython-c818b15fa59039de67022c29085d439fa5d3ef95.zip
cpython-c818b15fa59039de67022c29085d439fa5d3ef95.tar.gz
cpython-c818b15fa59039de67022c29085d439fa5d3ef95.tar.bz2
bpo-41520: Fix second codeop regression (GH-21848)
* bpo-41520: Fix second codeop repression Fix the repression introduced by the initial regression fix.
Diffstat (limited to 'Lib/codeop.py')
-rw-r--r--Lib/codeop.py4
1 files changed, 2 insertions, 2 deletions
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 @@ def _maybe_compile(compiler, source, filename, symbol):
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)