]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-43244: Add pycore_compile.h header file (GH-25000)
authorVictor Stinner <vstinner@python.org>
Tue, 23 Mar 2021 23:51:50 +0000 (00:51 +0100)
committerGitHub <noreply@github.com>
Tue, 23 Mar 2021 23:51:50 +0000 (00:51 +0100)
commita81fca6ec8e0f748f8eafa12fb12cf9e12df465c
tree955b952d9953f5ba3ed487512ac9f67267ddd4f4
parentf0a6fde8827d5d4f7a1c741ab1a8b206b66ffd57
bpo-43244: Add pycore_compile.h header file (GH-25000)

Remove the compiler functions using "struct _mod" type, because the
public AST C API was removed:

* PyAST_Compile()
* PyAST_CompileEx()
* PyAST_CompileObject()
* PyFuture_FromAST()
* PyFuture_FromASTObject()

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

Rename functions:

* PyAST_CompileObject() => _PyAST_Compile()
* PyFuture_FromASTObject() => _PyFuture_FromAST()

Moreover, _PyFuture_FromAST() is no longer exported (replace
PyAPI_FUNC() with extern). _PyAST_Compile() remains exported for
test_peg_generator.

Remove also compatibility functions:

* PyAST_Compile()
* PyAST_CompileEx()
* PyFuture_FromAST()
15 files changed:
Doc/whatsnew/3.10.rst
Include/cpython/compile.h
Include/internal/pycore_compile.h [new file with mode: 0644]
Makefile.pre.in
Misc/NEWS.d/next/C API/2021-03-23-20-53-41.bpo-43244.VK3sLH.rst [new file with mode: 0644]
Objects/typeobject.c
PCbuild/pythoncore.vcxproj
PCbuild/pythoncore.vcxproj.filters
Python/ast_opt.c
Python/bltinmodule.c
Python/compile.c
Python/future.c
Python/pythonrun.c
Python/symtable.c
Tools/peg_generator/peg_extension/peg_extension.c