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, brandtbucher, gvanrossum, iritkatriel, scoder, terry.reedy, vstinner
Date 2022-02-01.14:19:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1643725199.8.0.68793703891.issue45711@roundup.psfhosted.org>
In-reply-to
Content
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:

* (1) Revert this specific change
* (2) Wait until a change is merged in Cython 0.29.x
* (3) Wait until a new Cython 0.29.x version is released
* (4) Wait until numpy is released with regenerated code compatible with this change
* (5) Apply again the change

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
History
Date User Action Args
2022-02-01 14:19:59vstinnersetrecipients: + vstinner, gvanrossum, terry.reedy, scoder, Mark.Shannon, brandtbucher, iritkatriel
2022-02-01 14:19:59vstinnersetmessageid: <1643725199.8.0.68793703891.issue45711@roundup.psfhosted.org>
2022-02-01 14:19:59vstinnerlinkissue45711 messages
2022-02-01 14:19:59vstinnercreate