@@ -842,12 +842,12 @@ code, or when embedding the Python interpreter:
842842 single: PyEval_SaveThread()
843843 single: PyEval_RestoreThread()
844844
845- Initialize and acquire the global interpreter lock. It should be called in the
846- main thread before creating a second thread or engaging in any other thread
847- operations such as ``PyEval_ReleaseThread(tstate)``. It is not needed before
848- calling :c:func:`PyEval_SaveThread` or :c:func:`PyEval_RestoreThread`.
845+ Deprecated function which does nothing.
849846
850- This is a no-op when called for a second time.
847+ In Python 3.6 and older, this function created the GIL if it didn't exist.
848+
849+ .. versionchanged:: 3.9
850+ The function now does nothing.
851851
852852 .. versionchanged:: 3.7
853853 This function is now called by :c:func:`Py_Initialize()`, so you don't
@@ -856,6 +856,8 @@ code, or when embedding the Python interpreter:
856856 .. versionchanged:: 3.2
857857 This function cannot be called before :c:func:`Py_Initialize()` anymore.
858858
859+ .. deprecated-removed:: 3.9 3.11
860+
859861 .. index:: module: _thread
860862
861863
@@ -868,6 +870,8 @@ code, or when embedding the Python interpreter:
868870 .. versionchanged:: 3.7
869871 The :term:`GIL` is now initialized by :c:func:`Py_Initialize()`.
870872
873+ .. deprecated-removed:: 3.9 3.11
874+
871875
872876.. c:function:: PyThreadState* PyEval_SaveThread()
873877
0 commit comments