From 565b4f1ac7304d1e690c404ca8316f383ba60862 Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Tue, 21 May 2019 13:12:03 -0700 Subject: bpo-34616: Add PyCF_ALLOW_TOP_LEVEL_AWAIT to allow top-level await (GH-13148) Co-Authored-By: Yury Selivanov --- Python/Python-ast.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Python/Python-ast.c') diff --git a/Python/Python-ast.c b/Python/Python-ast.c index cb53a41cdf..5527505844 100644 --- a/Python/Python-ast.c +++ b/Python/Python-ast.c @@ -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) -- cgit v1.2.1