Skip to content

bpo-43244: Remove ast.h, asdl.h, Python-ast.h headers #24933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ PC/clinic/*.h linguist-generated=true
Python/clinic/*.h linguist-generated=true
Python/importlib.h linguist-generated=true
Python/importlib_external.h linguist-generated=true
Include/Python-ast.h linguist-generated=true
Include/internal/pycore_ast.h linguist-generated=true
Python/Python-ast.c linguist-generated=true
Include/opcode.h linguist-generated=true
Python/opcode_targets.h linguist-generated=true
Expand Down
10 changes: 9 additions & 1 deletion Doc/whatsnew/3.10.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1383,5 +1383,13 @@ Removed
it could not be used, because the ``symtable.h`` header file was excluded
from the limited C API.

The Python :mod:`symtable` module remains available and is unchanged.
Use Python :mod:`symtable` module instead.
(Contributed by Victor Stinner in :issue:`43244`.)

* Remove ``ast.h``, ``asdl.h``, and ``Python-ast.h`` header files.
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 :mod:`ast` module instead.
(Contributed by Victor Stinner in :issue:`43244`.)
Loading