mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-34616: Add PyCF_ALLOW_TOP_LEVEL_AWAIT to allow top-level await (GH-13148)
Co-Authored-By: Yury Selivanov <yury@magic.io>
This commit is contained in:
parent
aa32a7e111
commit
565b4f1ac7
7 changed files with 109 additions and 8 deletions
2
Python/Python-ast.c
generated
2
Python/Python-ast.c
generated
|
@ -8776,6 +8776,8 @@ PyInit__ast(void)
|
|||
if (!m) return NULL;
|
||||
d = PyModule_GetDict(m);
|
||||
if (PyDict_SetItemString(d, "AST", (PyObject*)&AST_type) < 0) return NULL;
|
||||
if (PyModule_AddIntMacro(m, PyCF_ALLOW_TOP_LEVEL_AWAIT) < 0)
|
||||
return NULL;
|
||||
if (PyModule_AddIntMacro(m, PyCF_ONLY_AST) < 0)
|
||||
return NULL;
|
||||
if (PyModule_AddIntMacro(m, PyCF_TYPE_COMMENTS) < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue