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:
Matthias Bussonnier 2019-05-21 13:12:03 -07:00 committed by Yury Selivanov
parent aa32a7e111
commit 565b4f1ac7
7 changed files with 109 additions and 8 deletions

2
Python/Python-ast.c generated
View file

@ -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)