Browse Source
bpo-39965: Correctly raise SyntaxError if await is used outside async functions when PyCF_ALLOW_TOP_LEVEL_AWAIT is set (GH-19010)
pull/19013/head
bpo-39965: Correctly raise SyntaxError if await is used outside async functions when PyCF_ALLOW_TOP_LEVEL_AWAIT is set (GH-19010)
pull/19013/head
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 49 additions and 4 deletions
-
38Lib/test/test_builtin.py
-
3Misc/NEWS.d/next/Core and Builtins/2020-03-15-03-52-01.bpo-39965.Od3ZdP.rst
-
12Python/compile.c
@ -0,0 +1,3 @@ |
|||
Correctly raise ``SyntaxError`` if *await* is used inside non-async |
|||
functions and ``PyCF_ALLOW_TOP_LEVEL_AWAIT`` is set (like in the asyncio |
|||
REPL). Patch by Pablo Galindo. |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue