]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-43244: Fix test_peg_generator for PyAST_Validate() (GH-24912)
authorVictor Stinner <vstinner@python.org>
Thu, 18 Mar 2021 01:46:06 +0000 (02:46 +0100)
committerGitHub <noreply@github.com>
Thu, 18 Mar 2021 01:46:06 +0000 (02:46 +0100)
commite0bf70d08c4a4a68782702e747e6bf7670667591
tree36994e29ed642e690b7932129ee150c484fd20d9
parent08fb8ac99ab03d767aa0f1cfab3573eddf9df018
bpo-43244: Fix test_peg_generator for PyAST_Validate() (GH-24912)

test_peg_generator now defines _Py_TEST_PEGEN macro when building C
code to not call PyAST_Validate() in Parser/pegen.c. Moreover, it
defines Py_BUILD_CORE_MODULE macro to get access to the internal
C API.

Remove "global_ast_state" from Python-ast.c when it's built by
test_peg_generator: always get the AST state from the current interpreter.
Parser/asdl_c.py
Parser/pegen.c
Python/Python-ast.c
Tools/peg_generator/pegen/build.py