]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-96052: codeop: fix handling compiler warnings in incomplete input (GH-96132)
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 16 Sep 2022 14:37:30 +0000 (17:37 +0300)
committerGitHub <noreply@github.com>
Fri, 16 Sep 2022 14:37:30 +0000 (17:37 +0300)
commit426d72e7ddb0af5cf851914ac75127186dd1ff04
tree84b2878c3271d4e0f9637b270b6a6835ae501eef
parente47b96c44f7b48a1e95de24f38f6e3de879b4d61
gh-96052: codeop: fix handling compiler warnings in incomplete input (GH-96132)

Previously codeop.compile_command() emitted compiler warnings (SyntaxWarning or
DeprecationWarning) and raised a SyntaxError for incomplete input containing
a potentially incorrect code. Now it always returns None for incomplete input
without emitting any warnings.
Lib/codeop.py
Lib/test/test_codeop.py
Misc/NEWS.d/next/Library/2022-08-20-10-31-01.gh-issue-96052.a6FhaD.rst [new file with mode: 0644]