Documentation
As of 3.14, Py_EnterRecursiveCall and Py_LeaveRecursiveCall no longer use
a call counter (c_recursion_remaining); they compare the current C stack
pointer against tstate->c_stack_soft_limit.
The documentation still describes the check as "if the stack limit is reached"
without clarifying that this is actual C stack consumption, unaffected by
sys.setrecursionlimit(). This was noted by @ZeroIntensity in
#156205 (review)
Linked PRs
Documentation
As of 3.14,
Py_EnterRecursiveCallandPy_LeaveRecursiveCallno longer usea call counter (
c_recursion_remaining); they compare the current C stackpointer against
tstate->c_stack_soft_limit.The documentation still describes the check as "if the stack limit is reached"
without clarifying that this is actual C stack consumption, unaffected by
sys.setrecursionlimit(). This was noted by @ZeroIntensity in#156205 (review)
Linked PRs
Py_EnterRecursiveCalluses the C stack, not a counter (GH-158644) #158653Py_EnterRecursiveCalluses the C stack, not a counter (GH-158644) #158654