From c818b15fa59039de67022c29085d439fa5d3ef95 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Thu, 13 Aug 2020 13:18:49 -0400 Subject: bpo-41520: Fix second codeop regression (GH-21848) * bpo-41520: Fix second codeop repression Fix the repression introduced by the initial regression fix. --- Lib/codeop.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Lib/codeop.py') diff --git a/Lib/codeop.py b/Lib/codeop.py index 547629262d0..4c10470aee7 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) -- cgit v1.2.3