]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-43244: Remove parser_interface.h header file (GH-25001)
authorVictor Stinner <vstinner@python.org>
Wed, 24 Mar 2021 00:29:09 +0000 (01:29 +0100)
committerGitHub <noreply@github.com>
Wed, 24 Mar 2021 00:29:09 +0000 (01:29 +0100)
commit57364ce34e0492fbc8b0a6b8c882f384bb489457
treed2679621c672fee40eb7e22ff79a8ea85830c3b3
parenta054f6b2b1d9f75edfb5ec2247bbf60f07491977
bpo-43244: Remove parser_interface.h header file (GH-25001)

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

* PyParser_ASTFromFile()
* PyParser_ASTFromFileObject()
* PyParser_ASTFromFilename()
* PyParser_ASTFromString()
* PyParser_ASTFromStringObject()

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

Add pycore_parser.h internal header file. Rename functions:

* PyParser_ASTFromFileObject() => _PyParser_ASTFromFile()
* PyParser_ASTFromStringObject() => _PyParser_ASTFromString()

These functions are no longer exported (replace PyAPI_FUNC() with
extern).

Remove also _PyPegen_run_parser_from_file() function. Update
test_peg_generator to use _PyPegen_run_parser_from_file_pointer()
instead.
12 files changed:
Doc/whatsnew/3.10.rst
Include/Python.h
Include/cpython/parser_interface.h [deleted file]
Include/internal/pycore_parser.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
Parser/peg_api.c
Parser/pegen.c
Parser/pegen.h
Python/pythonrun.c
Python/symtable.c
Tools/peg_generator/peg_extension/peg_extension.c