This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Mark.Shannon, eric.snow, fabioz, vstinner
Date 2020-03-13.16:08:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I tested to build numpy with an opaque PyThreadState. First issue, Plex gets the current interpreter using PyThreadState.interp:

    /tmp/pip-install-aq60p8w2/Cython/Cython/Plex/Scanners.c:7447:73: erreur: déréférencement d'un pointeur du type incomplet « PyThreadState » {alias « struct _ts »}
     7447 |     PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);

We should add a PyThreadState_GetInterpreter(tstate) getter. faulthandler_py_enable() would use it for example.

Maybe _PyInterpreterState_Get() can be used, but it's a private function. There are also _PyThreadState_UncheckedGet() and _PyGILState_GetInterpreterStateUnsafe() which are worse: don't check for NULL pointers.
Date User Action Args
2020-03-13 16:08:24vstinnersetrecipients: + vstinner, fabioz, Mark.Shannon, eric.snow
2020-03-13 16:08:24vstinnersetmessageid: <>
2020-03-13 16:08:24vstinnerlinkissue39947 messages
2020-03-13 16:08:24vstinnercreate