-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Move PyArena C API to the internal C API #87410
Comments
Include/cpython/pyarena.h declares 4 functions which are implemented in Python/pyarena.c. The header file exists to access these functions from the compiler. IMO there was no intent to expose these functions to the public Python C API. Moreover, the PEP-384 explicitly excludes this API from the stable ABI (from the limited C API). I propose to move these functions to the internal C API. Since these functions are no even documented, I don't think that a deprecation period is needed. Note: The PR 24550 moved Include/pyarena.h to Include/cpython/pyarena.h. |
Ok, the whole C API related to parser, compiler, AST, ASDL and PyArena moved to the internal C API. So we will have more freedom to evolve it! |
In short, this issue is a follow-up of bpo-40939. These C API removal are related to the final step of the PEP-617 "New PEG parser for CPython": removal of the PyParser C API.
I searched for removed functions in the top PyPI 4000 projects, there is a single project on 4000: typed_ast. This typed_ast project is special, it copies directly code from CPython. Even after the C API removed, typed_ast can continue to use the internal C API, it only has to define the Py_BUILD_CORE_MODULE macro. |
typed-ast was updated for these changes and to avoid including explicitly pydebug.h (it's included by Python.h: see bpo-35134 change): python/typed_ast#158 |
"Remove Yield macro from pycore_ast.h" I'm happy that this one is gone, it was a common and annoying compiler warning on Windows! |
I marked bpo-35197 as a duplicate of this issue. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: