-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove _Py_CheckRecursionLimit variable #86000
Comments
_Py_CheckRecursionLimit variable is no longer needed and can be removed. In Python 3.9, I added a recursion limit per interpreter. In Python 3.8 and older, it was used by _Py_MakeRecCheck() macro to check for recursion error. Previously, the _Py_CheckRecursionLimit variable was kept for backward compatibility with the stable ABI, but in Python 3.8 and older, Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() could not be used with the limited C API since these macros accessed PyThreadState structure member, whereas the structure is opaque in the limited C API. Attached PR removed the variable. --- (3) bpo-40513: Limit made per interpreter. commit 4e30ed3
--- (2) bpo-38644: The _Py_CheckRecursionLimit variable was used by Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() macros. I converted these macros into function calls in Python 3.9: commit f4b1e3d
In pycore_ceval.h, the function is overriden by a macro which points to an inline function which uses:
--- (1) bpo-31857: Original change adding the FIXME. commit 1896793
This change added the FIXME comment: /* Due to the macros in which it's used, _Py_CheckRecursionLimit is in |
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: