You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Macros Py_ALLOW_RECURSION and Py_END_ALLOW_RECURSION together with field recursion_critical of the PyInterpreterState structure were added in 5b22213 but were never documented. It seems that the reason of adding them was to work around the fact that PyDict_GetItem() can silence any exception including recursion error. But PyDict_GetItem() no longer used in that code and the macros are also no longer used (see bpo-41909).
GvR proposed to remove these macros. I think that recursion_critical can be removed too.
I failed to find users of these macros outside the CPython code base, so it sounds safe to remove it, especially if it's documented in What's New in Python 3.10.
If someone reports the removal as a regression and describes a legit use case, we can reconsider to revert the removal. Until that, I'm fine with removing them.
--
I ran grep on Cython and numpy code base: I cannot find "Py_ALLOW_RECURSION", "Py_END_ALLOW_RECURSION" or "recursion_critical".
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: