From aec984297a49f4e0758560e73fb9f3652c333be5 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 25 May 2026 18:59:56 +0200 Subject: [PATCH 1/9] Link full 'Reference counts' term --- Doc/whatsnew/3.15.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index daac31fd7f4b17..c8d9a40041cae2 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -1989,8 +1989,8 @@ is now performed. This means when the JIT compiler detects that certain user code results in constants, the code can be simplified by the JIT. (Contributed by Ken Jin and Savannah Ostrowski in :gh:`132732`.) -:term:`Reference count`\ s are avoided whenever it is safe to do so. This generally -reduces the cost of most operations in Python. +:term:`Reference counts ` are avoided whenever it is safe to +do so. This generally reduces the cost of most operations in Python. (Contributed by Ken Jin, Donghee Na, Zheao Li, Hai Zhu, Savannah Ostrowski, Reiden Ong, Noam Cohen, Tomas Roun, PuQing, Cajetan Rodrigues, and Sacul in :gh:`134584`.) From d874c6f2b1ff9054601569bc3ba33d06091162b0 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Wed, 29 Jul 2026 20:46:37 +0300 Subject: [PATCH 2/9] Link PEP 800 to What's New entry --- Doc/whatsnew/3.15.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index c8d9a40041cae2..e1a32b1763fac0 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -85,7 +85,7 @@ Summary -- Release highlights * :pep:`728`: :ref:`TypedDict with typed extra items ` * :pep:`747`: :ref:`Annotating type forms with TypeForm ` -* :pep:`800`: Disjoint bases in the type system +* :pep:`800`: :ref:`Disjoint bases in the type system ` * :pep:`782`: :ref:`A new PyBytesWriter C API to create a Python bytes object ` * :pep:`803`, :pep:`820 <820>`, :pep:`793 <793>`: @@ -1726,6 +1726,8 @@ typing as it was incorrectly inferred at runtime before. (Contributed by Nikita Sobolev in :gh:`137191`.) + .. _whatsnew315-disjoint-base: + * :pep:`800`: Add :deco:`typing.disjoint_base`, a new decorator marking a class as a disjoint base. This is an advanced feature primarily intended to allow type checkers to faithfully reflect the runtime semantics of types defined From 1c54875b4b0bc4eedc0220edd2022211504451c2 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Wed, 29 Jul 2026 20:52:29 +0300 Subject: [PATCH 3/9] Move pathlib change from removals to improved modules --- Doc/whatsnew/3.15.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index e1a32b1763fac0..17c1f6c67d70ee 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -1333,6 +1333,14 @@ os.path (Contributed by Petr Viktorin for :cve:`2025-4517`.) +pathlib +------- + +* :meth:`pathlib.Path.mkdir` now has a *parent_mode* parameter that allows + specifying the mode for intermediate directories when ``parents=True``. + (Contributed by Gregory P. Smith in :gh:`86533`.) + + pdb --- @@ -2105,10 +2113,6 @@ importlib.resources pathlib ------- -* :meth:`pathlib.Path.mkdir` now has a *parent_mode* parameter that allows - specifying the mode for intermediate directories when ``parents=True``. - (Contributed by Gregory P. Smith in :gh:`86533`.) - * Removed deprecated :meth:`!pathlib.PurePath.is_reserved`. Use :func:`os.path.isreserved` to detect reserved paths on Windows. (Contributed by Nikita Sobolev in :gh:`133875`.) From 8a2c2933627715f00bb5130bf218bdf1d6867efa Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Wed, 29 Jul 2026 20:55:12 +0300 Subject: [PATCH 4/9] Move ctypes change from removals to improved modules --- Doc/whatsnew/3.15.rst | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 17c1f6c67d70ee..2552785cefc83a 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -1103,6 +1103,16 @@ contextlib (Contributed by Alex Grönholm & Gregory P. Smith in :gh:`125862`.) +ctypes +------ + +* Change the :py:attr:`~ctypes._SimpleCData._type_` of + :class:`~ctypes.c_float_complex`, :class:`~ctypes.c_double_complex` and + :class:`~ctypes.c_longdouble_complex` from ``F``, ``D`` and ``G`` to ``Zf``, + ``Zd`` and ``Zg`` for compatibility with NumPy. + (Contributed by Victor Stinner in :gh:`148675`.) + + dataclasses ----------- @@ -2068,12 +2078,6 @@ ctypes which has been deprecated since Python 3.13. (Contributed by Bénédikt Tran in :gh:`133866`.) -* Change the :py:attr:`~ctypes._SimpleCData._type_` of - :class:`~ctypes.c_float_complex`, :class:`~ctypes.c_double_complex` and - :class:`~ctypes.c_longdouble_complex` from ``F``, ``D`` and ``G`` to ``Zf``, - ``Zd`` and ``Zg`` for compatibility with numpy. - (Contributed by Victor Stinner in :gh:`148675`.) - datetime -------- From 1706bf125a4665f77f65ef37752ff44d52761ce6 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Wed, 29 Jul 2026 21:00:59 +0300 Subject: [PATCH 5/9] Fix markup --- Doc/whatsnew/3.15.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 2552785cefc83a..33bf0b71535584 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -2423,7 +2423,7 @@ New features functions as replacements for :c:func:`PySys_GetObject`. (Contributed by Serhiy Storchaka in :gh:`108512`.) -* Add :c:type:`PyUnstable_Unicode_GET_CACHED_HASH` to get the cached hash of +* Add :c:func:`PyUnstable_Unicode_GET_CACHED_HASH` to get the cached hash of a string. See the documentation for caveats. (Contributed by Petr Viktorin in :gh:`131510`.) From 91ba7c8de43712edccb80ed67fcf06dff999993e Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Wed, 29 Jul 2026 21:14:17 +0300 Subject: [PATCH 6/9] Wording --- Doc/whatsnew/3.15.rst | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 33bf0b71535584..7ea347382c0814 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -522,7 +522,7 @@ free-threading (``cp315t``) separately. Stable ABI for Free-Threaded Builds should typically be selected in a build tool (such as, for example, Setuptools, meson-python, scikit-build-core, or Maturin). -At the time of writing, these tools did **not** support ``abi3t``. +At the time of writing, these tools do **not** support ``abi3t``. If this is the case for your tool, compile for ``cp315t`` separately. If not using a build tool -- or when writing such a tool -- you can select ``abi3t`` by setting the macro :c:macro:`!Py_TARGET_ABI3T` as discussed @@ -1874,8 +1874,8 @@ xml whether a string can be used as an element or attribute name in XML. (Contributed by Serhiy Storchaka in :gh:`139489`.) -* Add the :func:`xml.is_valid_text` function, which allows to check - whether a string can be used in the XML document. +* Add the :func:`xml.is_valid_text` function to check + whether a string can be used in an XML document. (Contributed by Serhiy Storchaka in :gh:`139489`.) @@ -2156,8 +2156,8 @@ threading types ----- -* Removed deprecated in :pep:`626` since Python 3.12 - :attr:`!codeobject.co_lnotab` from :class:`types.CodeType`. +* Removed :attr:`!codeobject.co_lnotab` from :class:`types.CodeType`, + deprecated since Python 3.12 by :pep:`626`. (Contributed by Nikita Sobolev in :gh:`134690`.) @@ -2309,8 +2309,8 @@ New deprecations (Contributed by Sergey B Kirpichev and Serhiy Storchaka in :gh:`143715`.) - * Using ``'F'`` and ``'D'`` type codes now are :term:`soft deprecated` - in favor of two-letter forms ``'Zf'`` and ``'Zd'``. + * The ``'F'`` and ``'D'`` type codes are now :term:`soft deprecated` + in favor of the two-letter forms ``'Zf'`` and ``'Zd'``. (Contributed by Sergey B Kirpichev in :gh:`121249`.) @@ -2724,10 +2724,11 @@ Build changes At runtime, huge pages must be explicitly enabled by setting the :envvar:`PYTHON_PYMALLOC_HUGEPAGES` environment variable to ``1``. -* Annotating anonymous mmap usage is now supported if Linux kernel supports +* Annotating anonymous mmap usage is now supported if the Linux kernel supports :manpage:`PR_SET_VMA_ANON_NAME ` (Linux 5.17 or newer). Annotations are visible in ``/proc//maps`` if the kernel supports the feature - and :option:`-X dev <-X>` is passed to the Python or Python is built in :ref:`debug mode `. + and :option:`-X dev <-X>` is passed to Python, + or Python is built in :ref:`debug mode `. (Contributed by Donghee Na in :gh:`141770`.) * CPython is now built with frame pointers enabled by default From 6bec32b4ca7565d8a2cb864884df7732b1b4f697 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Wed, 29 Jul 2026 21:14:50 +0300 Subject: [PATCH 7/9] Punctuation --- Doc/whatsnew/3.15.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 7ea347382c0814..81cb8222fd9a53 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -494,8 +494,8 @@ drive it with :meth:`~site.StartupState.addsitedir`, .. _whatsnew315-abi3t: -:pep:`803` -- Stable ABI for free-threaded builds -------------------------------------------------- +:pep:`803`: Stable ABI for free-threaded builds +----------------------------------------------- C extensions that target the :ref:`Stable ABI ` can now be compiled for the new *Stable ABI for Free-Threaded Builds* (also known @@ -1239,7 +1239,7 @@ importlib.metadata ------------------ * Previously, when accessing a distribution metadata directory not - containing a metadata file, ``metadata()`` and ``Distribution.metadata()`` + containing a metadata file, ``metadata()`` and ``Distribution.metadata`` would return an empty ``PackageMetadata`` object as if the file was present but empty. Now, a ``MetadataNotFound`` exception is raised. See `importlib_metadata#493 `_ @@ -1465,7 +1465,7 @@ ssl supports "External PSKs" in TLSv1.3, as described in :rfc:`9258`. (Contributed by Will Childs-Klein in :gh:`133624`.) -* Added new methods for managing groups used for SSL key agreement +* Added new methods for managing groups used for SSL key agreement: * :meth:`ssl.SSLContext.set_groups` sets the groups allowed for doing key agreement, extending the previous @@ -2457,7 +2457,7 @@ New features (Contributed in :gh:`149227`.) -* Add a new :c:func:`PyImport_CreateModuleFromInitfunc` C-API for creating +* Add a new :c:func:`PyImport_CreateModuleFromInitfunc` C API for creating a module from a *spec* and *initfunc*. (Contributed by Itamar Oren in :gh:`116146`.) @@ -2531,7 +2531,7 @@ New features thread state. (Contributed by Victor Stinner in :gh:`139653`.) -* Add :c:func:`PyUnstable_SetImmortal` C-API function to mark objects as :term:`immortal`. +* Add :c:func:`PyUnstable_SetImmortal` C API function to mark objects as :term:`immortal`. (Contributed by Kumar Aditya in :gh:`143300`.) * Restore private provisional ``_Py_InitializeMain()`` function removed in From dd761255cfaa341de75d58c7b3a150a3e7eb9e85 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Wed, 29 Jul 2026 21:16:25 +0300 Subject: [PATCH 8/9] a-z --- Doc/whatsnew/3.15.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 81cb8222fd9a53..7a9ab8b8886ebb 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -2439,14 +2439,14 @@ New features * :c:func:`PyBytesWriter_Create` * :c:func:`PyBytesWriter_Discard` + * :c:func:`PyBytesWriter_Finish` * :c:func:`PyBytesWriter_FinishWithPointer` * :c:func:`PyBytesWriter_FinishWithSize` - * :c:func:`PyBytesWriter_Finish` * :c:func:`PyBytesWriter_Format` * :c:func:`PyBytesWriter_GetData` * :c:func:`PyBytesWriter_GetSize` - * :c:func:`PyBytesWriter_GrowAndUpdatePointer` * :c:func:`PyBytesWriter_Grow` + * :c:func:`PyBytesWriter_GrowAndUpdatePointer` * :c:func:`PyBytesWriter_Resize` * :c:func:`PyBytesWriter_WriteBytes` From 11372ffafcf5c07ca52a281ece0ea5839dffa4dc Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 31 Jul 2026 12:12:57 +0300 Subject: [PATCH 9/9] Explicitly list profile module as deprecated --- Doc/deprecations/pending-removal-in-3.17.rst | 7 +++++++ Doc/whatsnew/3.15.rst | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/Doc/deprecations/pending-removal-in-3.17.rst b/Doc/deprecations/pending-removal-in-3.17.rst index d6e4e81afbbd63..5ed674951d90cb 100644 --- a/Doc/deprecations/pending-removal-in-3.17.rst +++ b/Doc/deprecations/pending-removal-in-3.17.rst @@ -37,6 +37,13 @@ Pending removal in Python 3.17 is deprecated and scheduled for removal in Python 3.17. (Contributed by Stan Ulbrych in :gh:`136702`.) +* :mod:`profile`: + + - The :mod:`!profile` module is deprecated and will be removed in + Python 3.17. Use :mod:`profiling.tracing` instead, which provides a + compatible API. See :pep:`799` for details. + (Contributed by Pablo Galindo and László Kiss Kollár in :gh:`138122`.) + * :mod:`webbrowser`: - :class:`!webbrowser.MacOSXOSAScript` is deprecated in favour of diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 7a9ab8b8886ebb..5a8ab88a30fcf5 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -2280,6 +2280,14 @@ New deprecations and changing its value does *not* explicitly close the current file. +* :mod:`profile`: + + * The :mod:`!profile` module is deprecated and will be removed in + Python 3.17. Use :mod:`profiling.tracing` instead, which provides a + compatible API. See :pep:`799` for details. + (Contributed by Pablo Galindo and László Kiss Kollár in :gh:`138122`.) + + * :mod:`re`: * :func:`re.match` and :meth:`re.Pattern.match` are now