From: Peter Bierma Date: Thu, 18 Sep 2025 12:10:41 +0000 (-0400) Subject: Document `Py_AddPendingCall()` change with subinterpreters in 3.12 (GH-139117) X-Git-Tag: v3.15.0a1~278 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=89ff88be89328964dbc50a474a84c566fe920b46;p=thirdparty%2FPython%2Fcpython.git Document `Py_AddPendingCall()` change with subinterpreters in 3.12 (GH-139117) Prior to 3.9, Py_AddPendingCall() would always run pending calls in the main interpreter, but then each interpreter got their own ceval state, and they were scheduled for any interpreter. In GH-104813, this was undone, so Py_AddPendingCall() would always schedule for the main interpreter. --- diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst index 199b64387266..4b8884f48e8b 100644 --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -1834,6 +1834,10 @@ pointer and a void pointer argument. called from the main interpreter. Each subinterpreter now has its own list of scheduled calls. + .. versionchanged:: 3.12 + This function now always schedules *func* to be run in the main + interpreter. + .. _profiling: Profiling and Tracing