bpo-41936. Remove macros Py_ALLOW_RECURSION/Py_END_ALLOW_RECURSION by serhiy-storchaka · Pull Request #22552 · python/cpython (original) (raw)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, I never noticed that these macros even existed, and I never noticed the PyInterpreterState.recursion_critical member.

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 (which is the case in this PR).

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.

https://bugs.python.org/issue41936#msg378002