Message 412264 - Python tracker (original) (raw)

Would it be possible to revert the change until Cython and numpy are ready for it?

bpo-45711: Remove type and traceback from exc_info (GH-30122)

This change broke numpy which uses C code generated by Cython for coroutines in numpy/random/_mt19937.c (file generated from numpy/random/_mt19937.pyx).

Example of Cython code which no fails with a compiler error since exc_info->exc_type has been removed:

/* GetTopmostException */ #if CYTHON_USE_EXC_INFO_STACK static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate) { _PyErr_StackItem *exc_info = tstate->exc_info; while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && exc_info->previous_item != NULL) { exc_info = exc_info->previous_item; } return exc_info; } #endif

I propose this plan:

It should increase the number of packages when Python 3.11 will be released.

In Cython, the issue is tracked as: https://github.com/cython/cython/issues/4500