]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-43244: Remove ast.h, asdl.h, Python-ast.h headers (GH-24933)
authorVictor Stinner <vstinner@python.org>
Tue, 23 Mar 2021 19:47:40 +0000 (20:47 +0100)
committerGitHub <noreply@github.com>
Tue, 23 Mar 2021 19:47:40 +0000 (20:47 +0100)
commit94faa0724f8cbae6867c491c8e465e35f4fdbfbb
tree05590930e5ffbdc1e01be0aaf505d74cf3c49136
parentcd27af70d58161c59072e27a10e0e63dcbf0bccb
bpo-43244: Remove ast.h, asdl.h, Python-ast.h headers (GH-24933)

These functions were undocumented and excluded from the limited C
API.

Most names defined by these header files were not prefixed by "Py"
and so could create names conflicts. For example, Python-ast.h
defined a "Yield" macro which was conflict with the "Yield" name used
by the Windows <winbase.h> header.

Use the Python ast module instead.

* Move Include/asdl.h to Include/internal/pycore_asdl.h.
* Move Include/Python-ast.h to Include/internal/pycore_ast.h.
* Remove ast.h header file.
* pycore_symtable.h no longer includes Python-ast.h.
29 files changed:
.gitattributes
Doc/whatsnew/3.10.rst
Include/Python-ast.h [deleted file]
Include/ast.h [deleted file]
Include/cpython/compile.h
Include/internal/pycore_asdl.h [moved from Include/asdl.h with 84% similarity]
Include/internal/pycore_ast.h
Include/internal/pycore_symtable.h
Makefile.pre.in
Misc/NEWS.d/next/C API/2021-03-19-12-56-11.bpo-43244.VuIyOD.rst [new file with mode: 0644]
Modules/symtablemodule.c
PCbuild/pythoncore.vcxproj
PCbuild/pythoncore.vcxproj.filters
PCbuild/regen.vcxproj
Parser/asdl_c.py
Parser/pegen.c
Parser/pegen.h
Parser/string_parser.h
Python/Python-ast.c
Python/asdl.c
Python/ast.c
Python/ast_unparse.c
Python/bltinmodule.c
Python/import.c
Python/pylifecycle.c
Python/pythonrun.c
Python/symtable.c
configure
configure.ac