File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1016,6 +1016,10 @@ because the :ref:`call protocol <call>` takes care of recursion handling.
10161016 case, a :exc: `RecursionError ` is set and a nonzero value is returned.
10171017 Otherwise, zero is returned.
10181018
1019+ The check is based on the remaining C stack space of the current thread,
1020+ not on a count of calls, so it is unaffected by
1021+ :c:func: `Py_SetRecursionLimit ` and :func: `sys.setrecursionlimit `.
1022+
10191023 *where * should be a UTF-8 encoded string such as ``" in instance check" `` to
10201024 be concatenated to the :exc: `RecursionError ` message caused by the recursion
10211025 depth limit.
@@ -1026,6 +1030,10 @@ because the :ref:`call protocol <call>` takes care of recursion handling.
10261030 .. versionchanged :: 3.9
10271031 This function is now also available in the :ref: `limited API <limited-c-api >`.
10281032
1033+ .. versionchanged :: 3.14
1034+ The check is based on the remaining C stack space. Previously, a
1035+ separate counter of C-level calls was used.
1036+
10291037.. c :function :: void Py_LeaveRecursiveCall (void)
10301038
10311039 Ends a :c:func:`Py_EnterRecursiveCall`. Must be called once for each
You can’t perform that action at this time.
0 commit comments