From 61d0bd1864faf876f94bd841c57f334c33d270f6 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Fri, 8 Sep 2023 13:09:25 +0100 Subject: [PATCH 1/2] 684: Add bridging note about Python/C-API --- Doc/whatsnew/3.12.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index 6b4ec99b43dea6..e1aa25aedf7eef 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -294,7 +294,8 @@ PEP 684: A Per-Interpreter GIL Sub-interpreters may now be created with a unique GIL per interpreter. This allows Python programs to take full advantage of multiple CPU -cores. +cores. This is currently only available through the C-API, +though a Python API is :pep:`anticipated for 3.13 <554>`. Use the new :c:func:`Py_NewInterpreterFromConfig` function to create an interpreter with its own GIL:: @@ -313,8 +314,6 @@ create an interpreter with its own GIL:: For further examples how to use the C-API for sub-interpreters with a per-interpreter GIL, see :source:`Modules/_xxsubinterpretersmodule.c`. -A Python API is anticipated for 3.13. (See :pep:`554`.) - (Contributed by Eric Snow in :gh:`104210`, etc.) .. _whatsnew312-pep669: From ebe97ad9d92b6b5c788f50e605b2fe050e919975 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Fri, 8 Sep 2023 13:13:26 +0100 Subject: [PATCH 2/2] 684: Add intro --- Doc/whatsnew/3.12.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index e1aa25aedf7eef..c9fc4638a08bcc 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -292,7 +292,8 @@ can be used to customize buffer creation. PEP 684: A Per-Interpreter GIL ------------------------------ -Sub-interpreters may now be created with a unique GIL per interpreter. +:pep:`684` introduces a per-interpreter :term:`GIL `, +so that sub-interpreters may now be created with a unique GIL per interpreter. This allows Python programs to take full advantage of multiple CPU cores. This is currently only available through the C-API, though a Python API is :pep:`anticipated for 3.13 <554>`.