File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1034,6 +1034,10 @@ because the :ref:`call protocol <call>` takes care of recursion handling.
10341034 case, a :exc: `RecursionError ` is set and a nonzero value is returned.
10351035 Otherwise, zero is returned.
10361036
1037+ The check is based on the remaining C stack space of the current thread,
1038+ not on a count of calls, so it is unaffected by
1039+ :c:func: `Py_SetRecursionLimit ` and :func: `sys.setrecursionlimit `.
1040+
10371041 *where * should be a UTF-8 encoded string such as ``" in instance check" `` to
10381042 be concatenated to the :exc: `RecursionError ` message caused by the recursion
10391043 depth limit.
@@ -1044,6 +1048,10 @@ because the :ref:`call protocol <call>` takes care of recursion handling.
10441048 .. versionchanged :: 3.9
10451049 This function is now also available in the :ref: `limited API <limited-c-api >`.
10461050
1051+ .. versionchanged :: 3.14
1052+ The check is based on the remaining C stack space. Previously, a
1053+ separate counter of C-level calls was used.
1054+
10471055.. c :function :: void Py_LeaveRecursiveCall (void)
10481056
10491057 Ends a :c:func:`Py_EnterRecursiveCall`. Must be called once for each
You can’t perform that action at this time.
0 commit comments