@@ -1379,6 +1379,9 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
13791379 This function now calls the :c:member:`PyThreadState.on_delete` callback.
13801380 Previously, that happened in :c:func:`PyThreadState_Delete`.
13811381
1382+ .. versionchanged:: 3.13
1383+ The :c:member:`PyThreadState.on_delete` callback was removed.
1384+
13821385
13831386.. c:function:: void PyThreadState_Delete(PyThreadState *tstate)
13841387
@@ -1735,7 +1738,11 @@ function. You can create and destroy them using the following functions:
17351738 .check_multi_interp_extensions = 1,
17361739 .gil = PyInterpreterConfig_OWN_GIL,
17371740 };
1738- PyThreadState *tstate = Py_NewInterpreterFromConfig(&config);
1741+ PyThreadState *tstate = NULL;
1742+ PyStatus status = Py_NewInterpreterFromConfig(&tstate, &config);
1743+ if (PyStatus_Exception(status)) {
1744+ Py_ExitStatusException(status);
1745+ }
17391746
17401747 Note that the config is used only briefly and does not get modified.
17411748 During initialization the config's values are converted into various
@@ -2463,7 +2470,7 @@ code triggered by the finalizer blocks and calls :c:func:`PyEval_SaveThread`.
24632470
24642471 {
24652472 PyCriticalSection2 _py_cs2;
2466- PyCriticalSection_Begin2 (&_py_cs2, (PyObject*)(a), (PyObject*)(b))
2473+ PyCriticalSection2_Begin (&_py_cs2, (PyObject*)(a), (PyObject*)(b))
24672474
24682475 In the default build, this macro expands to ``{``.
24692476
@@ -2475,7 +2482,7 @@ code triggered by the finalizer blocks and calls :c:func:`PyEval_SaveThread`.
24752482
24762483 In the free-threaded build, this macro expands to::
24772484
2478- PyCriticalSection_End2 (&_py_cs2);
2485+ PyCriticalSection2_End (&_py_cs2);
24792486 }
24802487
24812488 In the default build, this macro expands to ``}``.
0 commit comments