You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some very specific use cases (ex: debuggers), it can be interesting to access the internal API of CPython. I propose to install the internal API: Include/internal/*.h header files.
I decided to merge my PR because I started to *remove* functions from the public C API to move them to the CPython internal API: _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() are two examples from bpo-35081. So some people might want even more to use the internal API. The main issue with this API is the requirement to use the same compiler with the same compilation options, especially to access atomic variables.
Activity
vstinner commentedon Nov 22, 2018
For some very specific use cases (ex: debuggers), it can be interesting to access the internal API of CPython. I propose to install the internal API: Include/internal/*.h header files.
Attached PR implements this idea.
vstinner commentedon Nov 22, 2018
Example of debuggers: vmprof or faulthandler (now part of the stdlib).
vstinner commentedon Nov 22, 2018
TODO: Update the Windows installer:
#10624 (comment)
vstinner commentedon Nov 23, 2018
New changeset f653fd4 by Victor Stinner in branch 'master':
bpo-35296: make install now installs the internal API (GH-10665)
f653fd4
vstinner commentedon Nov 23, 2018
I decided to merge my PR because I started to *remove* functions from the public C API to move them to the CPython internal API: _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() are two examples from bpo-35081. So some people might want even more to use the internal API. The main issue with this API is the requirement to use the same compiler with the same compilation options, especially to access atomic variables.
vstinner commentedon Dec 4, 2018
I reopen the issue since I'm now also interested to make the change in Python 3.7. I wrote PR 10897.
See discussion on python-dev:
https://mail.python.org/pipermail/python-dev/2018-December/155921.html
vstinner commentedon Dec 4, 2018
New changeset b02774f by Victor Stinner in branch '3.7':
bpo-35296: make install now installs the internal API (GH-10665) (GH-10897)
b02774f
[-]Install Include/internal/ header files[/-][+]Python[/+][-]Python[/-][+]Install Include/internal/ header files[/+]