On Tue, Feb 1, 2022 at 5:37 PM Irit Katriel <iritkatriel@googlemail.com> wrote:
_PyErr_StackItem is not part of the C API, it's an internal struct that cython accesses directly.
numpy currently fails on building Cython __Pyx_PyErr_GetTopmostException() function which access tstate->exc_info->exc_type, so it's about the PyThreadState structure. We can debate if PyThreadState is considered as "public", "private" or "internal". At the end of the day, the thing is that building numpy on Python 3.11 currently fails with a compiler error. The Python C API documentation currently promotes the Cython usage: https://docs.python.org/dev/extending/#recommended-third-party-tools The fact is that Cython uses Python internals is known and there is an on-going effect to move away Cython from Python internals. Victor