![](https://secure.gravatar.com/avatar/be200d614c47b5a4dbb6be867080e835.jpg?s=120&d=mm&r=g)
On 22Feb2019 0907, Victor Stinner wrote:
Hi,
I modified Include/ header files to have a way more explicit separation between the different levels of Python C API:
Include/*.h is the "portable Python API" supposed to be efficient on CPython and PyPy, and ideally support a maximum number of Python versions
Include/cpython/*.h is the "portable CPython API" which should only be available on CPython (but PyPy had to emulate it for best compatibility with CPython) and so should be avoided if possible.
Include/internal/*.h is the "CPython internal API" which should not be used outside CPython code base. In practice, Cython wants to use it to emit the most efficient code. Debuggers and profiles also want to use it to able to *inspect* a Python process without executing code (don't modify the process). You need to access all structures, especially internal ones, for that.
"Portable" here means "should work on multiple Python versions" like support Python 3.6, 3.7 and 3.8.
The overall project is still heavily in Work-in-Progress state. It's moving slowly and steadily at least!
And it's much appreciated!
I think it's pretty clear that the API rings I proposed in the other thread match the API groupings you have here, and I explain my reason for using "rings" in the other reply.
I'm trying to align with how you've been working on these changes, rather than to change it. It's a bit like writing the design after you've done the work, but since we don't have a design yet I think it's worth doing ;)
Thanks, Steve