]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-131927: Do not emit PEP 765 warnings in ast.parse() (GH-139642) (GH-140786)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 30 Oct 2025 11:25:34 +0000 (12:25 +0100)
committerGitHub <noreply@github.com>
Thu, 30 Oct 2025 11:25:34 +0000 (11:25 +0000)
commita7cfe862ba84886107173826955d248570714fff
treee3a03540c2ba0a590f3c353cabd406f18d1c5eba
parent6bb49ae650e5ecd7c31150ee9d2c4056c5416688
[3.14] gh-131927: Do not emit PEP 765 warnings in ast.parse() (GH-139642) (GH-140786)

ast.parse() no longer emits syntax warnings for
return/break/continue in finally (see PEP-765) -- they are only
emitted during compilation.
(cherry picked from commit ad0a3f733b23e7fc69aff13055c7fac8ab9dcd66)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Include/internal/pycore_compile.h
Lib/test/test_ast/test_ast.py
Lib/test/test_compile.py
Lib/test/test_pyrepl/test_interact.py
Misc/NEWS.d/next/Core_and_Builtins/2025-10-06-10-03-37.gh-issue-139640.gY5oTb2.rst [new file with mode: 0644]
Python/ast_preprocess.c
Python/compile.c