From 13c856668d2ba207232df6e843a1aabf5ec642a5 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Thu, 7 Dec 2023 11:40:00 -0700 Subject: [PATCH 1/2] Add a "What's New" entry. --- Doc/whatsnew/3.12.rst | 9 +++++++++ Doc/whatsnew/3.13.rst | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index a4b3a6d12970b4..283d9cdab43067 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -2236,6 +2236,15 @@ Porting to Python 3.12 guidance then please create a new GitHub issue and CC ``@ericsnowcurrently``. + * The :mod:`threading` module now expects the :mod:`!_thread` module to have + a ``_is_main_interpreter`` attribute. Is is a function with no + arguments that returns ``True`` if the current interpreter is the + main interpreter. + + Any library or application that provides a custom ``_thread`` module + must make sure it provides ``_is_main_interpreter()``. + (See :gh:`112826`.) + Deprecated ---------- diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index bf6a70f2009b8e..a4253cd15ab19b 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -1046,6 +1046,15 @@ Changes in the Python API retrieve a username, instead of :exc:`ImportError` on non-Unix platforms or :exc:`KeyError` on Unix platforms where the password database is empty. + * The :mod:`threading` module now expects the :mod:`!_thread` module to have + a ``_is_main_interpreter`` attribute. Is is a function with no + arguments that returns ``True`` if the current interpreter is the + main interpreter. + + Any library or application that provides a custom ``_thread`` module + must make sure it provides ``_is_main_interpreter()``. + (See :gh:`112826`.) + Build Changes ============= From fcb55dade353aa17b5ab5843a6d3ce9f44d16df4 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Thu, 7 Dec 2023 12:54:43 -0700 Subject: [PATCH 2/2] Match gh-112850. --- Doc/whatsnew/3.12.rst | 18 +++++++++--------- Doc/whatsnew/3.13.rst | 17 +++++++++-------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index 283d9cdab43067..ef1962891a7316 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -1892,6 +1892,15 @@ Changes in the Python API * Mixing tabs and spaces as indentation in the same file is not supported anymore and will raise a :exc:`TabError`. +* The :mod:`threading` module now expects the :mod:`!_thread` module to have + an ``_is_main_interpreter`` attribute. It is a function with no + arguments that returns ``True`` if the current interpreter is the + main interpreter. + + Any library or application that provides a custom ``_thread`` module + should provide ``_is_main_interpreter()``. + (See :gh:`112826`.) + Build Changes ============= @@ -2236,15 +2245,6 @@ Porting to Python 3.12 guidance then please create a new GitHub issue and CC ``@ericsnowcurrently``. - * The :mod:`threading` module now expects the :mod:`!_thread` module to have - a ``_is_main_interpreter`` attribute. Is is a function with no - arguments that returns ``True`` if the current interpreter is the - main interpreter. - - Any library or application that provides a custom ``_thread`` module - must make sure it provides ``_is_main_interpreter()``. - (See :gh:`112826`.) - Deprecated ---------- diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index a4253cd15ab19b..a5bf7e260ce4ae 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -1046,14 +1046,15 @@ Changes in the Python API retrieve a username, instead of :exc:`ImportError` on non-Unix platforms or :exc:`KeyError` on Unix platforms where the password database is empty. - * The :mod:`threading` module now expects the :mod:`!_thread` module to have - a ``_is_main_interpreter`` attribute. Is is a function with no - arguments that returns ``True`` if the current interpreter is the - main interpreter. - - Any library or application that provides a custom ``_thread`` module - must make sure it provides ``_is_main_interpreter()``. - (See :gh:`112826`.) +* The :mod:`threading` module now expects the :mod:`!_thread` module to have + an ``_is_main_interpreter`` attribute. It is a function with no + arguments that returns ``True`` if the current interpreter is the + main interpreter. + + Any library or application that provides a custom ``_thread`` module + must provide ``_is_main_interpreter()``, just like the module's + other "private" attributes. + (See :gh:`112826`.) Build Changes