@@ -85,7 +85,7 @@ Summary -- Release highlights
8585* :pep: `728 `: :ref: `TypedDict with typed extra items <whatsnew315-typeddict >`
8686* :pep: `747 `: :ref: `Annotating type forms with TypeForm
8787 <whatsnew315-typeform>`
88- * :pep: `800 `: Disjoint bases in the type system
88+ * :pep: `800 `: :ref: ` Disjoint bases in the type system < whatsnew315-disjoint-base >`
8989* :pep: `782 `: :ref: `A new PyBytesWriter C API to create a Python bytes object
9090 <whatsnew315-pybyteswriter>`
9191* :pep: `803 `, :pep: `820 <820 >`, :pep: `793 <793 >`:
@@ -494,8 +494,8 @@ drive it with :meth:`~site.StartupState.addsitedir`,
494494
495495.. _whatsnew315-abi3t :
496496
497- :pep: `803 ` -- Stable ABI for free-threaded builds
498- -------------------------------------------------
497+ :pep: `803 `: Stable ABI for free-threaded builds
498+ -----------------------------------------------
499499
500500C extensions that target the :ref: `Stable ABI <stable-abi >` can now be
501501compiled for the new *Stable ABI for Free-Threaded Builds * (also known
@@ -522,7 +522,7 @@ free-threading (``cp315t``) separately.
522522Stable ABI for Free-Threaded Builds should typically
523523be selected in a build tool (such as, for example, Setuptools, meson-python,
524524scikit-build-core, or Maturin).
525- At the time of writing, these tools did **not ** support ``abi3t ``.
525+ At the time of writing, these tools do **not ** support ``abi3t ``.
526526If this is the case for your tool, compile for ``cp315t `` separately.
527527If not using a build tool -- or when writing such a tool -- you can select
528528``abi3t `` by setting the macro :c:macro: `!Py_TARGET_ABI3T ` as discussed
@@ -1103,6 +1103,16 @@ contextlib
11031103 (Contributed by Alex Grönholm & Gregory P. Smith in :gh: `125862 `.)
11041104
11051105
1106+ ctypes
1107+ ------
1108+
1109+ * Change the :py:attr: `~ctypes._SimpleCData._type_ ` of
1110+ :class: `~ctypes.c_float_complex `, :class: `~ctypes.c_double_complex ` and
1111+ :class: `~ctypes.c_longdouble_complex ` from ``F ``, ``D `` and ``G `` to ``Zf ``,
1112+ ``Zd `` and ``Zg `` for compatibility with NumPy.
1113+ (Contributed by Victor Stinner in :gh: `148675 `.)
1114+
1115+
11061116dataclasses
11071117-----------
11081118
@@ -1229,7 +1239,7 @@ importlib.metadata
12291239------------------
12301240
12311241* Previously, when accessing a distribution metadata directory not
1232- containing a metadata file, ``metadata() `` and ``Distribution.metadata() ``
1242+ containing a metadata file, ``metadata() `` and ``Distribution.metadata ``
12331243 would return an empty ``PackageMetadata `` object as if the file
12341244 was present but empty. Now, a ``MetadataNotFound `` exception is raised.
12351245 See `importlib_metadata#493 <https://github.com/python/importlib_metadata/issues/493 >`_
@@ -1333,6 +1343,14 @@ os.path
13331343 (Contributed by Petr Viktorin for :cve: `2025-4517 `.)
13341344
13351345
1346+ pathlib
1347+ -------
1348+
1349+ * :meth: `pathlib.Path.mkdir ` now has a *parent_mode * parameter that allows
1350+ specifying the mode for intermediate directories when ``parents=True ``.
1351+ (Contributed by Gregory P. Smith in :gh: `86533 `.)
1352+
1353+
13361354pdb
13371355---
13381356
@@ -1439,7 +1457,7 @@ ssl
14391457 supports "External PSKs" in TLSv1.3, as described in :rfc: `9258 `.
14401458 (Contributed by Will Childs-Klein in :gh: `133624 `.)
14411459
1442- * Added new methods for managing groups used for SSL key agreement
1460+ * Added new methods for managing groups used for SSL key agreement:
14431461
14441462 * :meth: `ssl.SSLContext.set_groups ` sets the groups allowed for doing
14451463 key agreement, extending the previous
@@ -1718,6 +1736,8 @@ typing
17181736 as it was incorrectly inferred at runtime before.
17191737 (Contributed by Nikita Sobolev in :gh: `137191 `.)
17201738
1739+ .. _whatsnew315-disjoint-base :
1740+
17211741* :pep: `800 `: Add :deco: `typing.disjoint_base `, a new decorator marking a class
17221742 as a disjoint base. This is an advanced feature primarily intended to allow
17231743 type checkers to faithfully reflect the runtime semantics of types defined
@@ -1846,8 +1866,8 @@ xml
18461866 whether a string can be used as an element or attribute name in XML.
18471867 (Contributed by Serhiy Storchaka in :gh: `139489 `.)
18481868
1849- * Add the :func: `xml.is_valid_text ` function, which allows to check
1850- whether a string can be used in the XML document.
1869+ * Add the :func: `xml.is_valid_text ` function to check
1870+ whether a string can be used in an XML document.
18511871 (Contributed by Serhiy Storchaka in :gh: `139489 `.)
18521872
18531873
@@ -1981,8 +2001,8 @@ is now performed. This means when the JIT compiler detects that certain user
19812001code results in constants, the code can be simplified by the JIT.
19822002(Contributed by Ken Jin and Savannah Ostrowski in :gh: `132732 `.)
19832003
1984- :term: `Reference count ` \ s are avoided whenever it is safe to do so. This generally
1985- reduces the cost of most operations in Python.
2004+ :term: `Reference counts <reference count> ` are avoided whenever it is safe to
2005+ do so. This generally reduces the cost of most operations in Python.
19862006(Contributed by Ken Jin, Donghee Na, Zheao Li, Hai Zhu, Savannah Ostrowski,
19872007Reiden Ong, Noam Cohen, Tomas Roun, PuQing, Cajetan Rodrigues, and Sacul in :gh: `134584 `.)
19882008
@@ -2050,12 +2070,6 @@ ctypes
20502070 which has been deprecated since Python 3.13.
20512071 (Contributed by Bénédikt Tran in :gh: `133866 `.)
20522072
2053- * Change the :py:attr: `~ctypes._SimpleCData._type_ ` of
2054- :class: `~ctypes.c_float_complex `, :class: `~ctypes.c_double_complex ` and
2055- :class: `~ctypes.c_longdouble_complex ` from ``F ``, ``D `` and ``G `` to ``Zf ``,
2056- ``Zd `` and ``Zg `` for compatibility with numpy.
2057- (Contributed by Victor Stinner in :gh: `148675 `.)
2058-
20592073
20602074datetime
20612075--------
@@ -2095,10 +2109,6 @@ importlib.resources
20952109pathlib
20962110-------
20972111
2098- * :meth: `pathlib.Path.mkdir ` now has a *parent_mode * parameter that allows
2099- specifying the mode for intermediate directories when ``parents=True ``.
2100- (Contributed by Gregory P. Smith in :gh: `86533 `.)
2101-
21022112* Removed deprecated :meth: `!pathlib.PurePath.is_reserved `.
21032113 Use :func: `os.path.isreserved ` to detect reserved paths on Windows.
21042114 (Contributed by Nikita Sobolev in :gh: `133875 `.)
@@ -2138,8 +2148,8 @@ threading
21382148types
21392149-----
21402150
2141- * Removed deprecated in :pep: ` 626 ` since Python 3.12
2142- :attr: ` !codeobject.co_lnotab ` from :class: ` types.CodeType `.
2151+ * Removed :attr: ` !codeobject.co_lnotab ` from :class: ` types.CodeType `,
2152+ deprecated since Python 3.12 by :pep: ` 626 `.
21432153 (Contributed by Nikita Sobolev in :gh: `134690 `.)
21442154
21452155
@@ -2262,6 +2272,14 @@ New deprecations
22622272 and changing its value does *not * explicitly close the current file.
22632273
22642274
2275+ * :mod: `profile `:
2276+
2277+ * The :mod: `!profile ` module is deprecated and will be removed in
2278+ Python 3.17. Use :mod: `profiling.tracing ` instead, which provides a
2279+ compatible API. See :pep: `799 ` for details.
2280+ (Contributed by Pablo Galindo and László Kiss Kollár in :gh: `138122 `.)
2281+
2282+
22652283* :mod: `re `:
22662284
22672285 * :func: `re.match ` and :meth: `re.Pattern.match ` are now
@@ -2291,8 +2309,8 @@ New deprecations
22912309
22922310 (Contributed by Sergey B Kirpichev and Serhiy Storchaka in :gh: `143715 `.)
22932311
2294- * Using ``'F' `` and ``'D' `` type codes now are :term: `soft deprecated `
2295- in favor of two-letter forms ``'Zf' `` and ``'Zd' ``.
2312+ * The ``'F' `` and ``'D' `` type codes are now :term: `soft deprecated `
2313+ in favor of the two-letter forms ``'Zf' `` and ``'Zd' ``.
22962314 (Contributed by Sergey B Kirpichev in :gh: `121249 `.)
22972315
22982316
@@ -2403,7 +2421,7 @@ New features
24032421 functions as replacements for :c:func: `PySys_GetObject `.
24042422 (Contributed by Serhiy Storchaka in :gh: `108512 `.)
24052423
2406- * Add :c:type : `PyUnstable_Unicode_GET_CACHED_HASH ` to get the cached hash of
2424+ * Add :c:func : `PyUnstable_Unicode_GET_CACHED_HASH ` to get the cached hash of
24072425 a string. See the documentation for caveats.
24082426 (Contributed by Petr Viktorin in :gh: `131510 `.)
24092427
@@ -2419,14 +2437,14 @@ New features
24192437
24202438 * :c:func: `PyBytesWriter_Create `
24212439 * :c:func: `PyBytesWriter_Discard `
2440+ * :c:func: `PyBytesWriter_Finish `
24222441 * :c:func: `PyBytesWriter_FinishWithPointer `
24232442 * :c:func: `PyBytesWriter_FinishWithSize `
2424- * :c:func: `PyBytesWriter_Finish `
24252443 * :c:func: `PyBytesWriter_Format `
24262444 * :c:func: `PyBytesWriter_GetData `
24272445 * :c:func: `PyBytesWriter_GetSize `
2428- * :c:func: `PyBytesWriter_GrowAndUpdatePointer `
24292446 * :c:func: `PyBytesWriter_Grow `
2447+ * :c:func: `PyBytesWriter_GrowAndUpdatePointer `
24302448 * :c:func: `PyBytesWriter_Resize `
24312449 * :c:func: `PyBytesWriter_WriteBytes `
24322450
@@ -2437,7 +2455,7 @@ New features
24372455
24382456 (Contributed in :gh: `149227 `.)
24392457
2440- * Add a new :c:func: `PyImport_CreateModuleFromInitfunc ` C- API for creating
2458+ * Add a new :c:func: `PyImport_CreateModuleFromInitfunc ` C API for creating
24412459 a module from a *spec * and *initfunc *.
24422460 (Contributed by Itamar Oren in :gh: `116146 `.)
24432461
@@ -2511,7 +2529,7 @@ New features
25112529 thread state.
25122530 (Contributed by Victor Stinner in :gh: `139653 `.)
25132531
2514- * Add :c:func: `PyUnstable_SetImmortal ` C- API function to mark objects as :term: `immortal `.
2532+ * Add :c:func: `PyUnstable_SetImmortal ` C API function to mark objects as :term: `immortal `.
25152533 (Contributed by Kumar Aditya in :gh: `143300 `.)
25162534
25172535* Restore private provisional ``_Py_InitializeMain() `` function removed in
@@ -2704,10 +2722,11 @@ Build changes
27042722 At runtime, huge pages must be explicitly enabled by setting the
27052723 :envvar: `PYTHON_PYMALLOC_HUGEPAGES ` environment variable to ``1 ``.
27062724
2707- * Annotating anonymous mmap usage is now supported if Linux kernel supports
2725+ * Annotating anonymous mmap usage is now supported if the Linux kernel supports
27082726 :manpage: `PR_SET_VMA_ANON_NAME <PR_SET_VMA(2const)>` (Linux 5.17 or newer).
27092727 Annotations are visible in ``/proc/<pid>/maps `` if the kernel supports the feature
2710- and :option: `-X dev <-X> ` is passed to the Python or Python is built in :ref: `debug mode <debug-build >`.
2728+ and :option: `-X dev <-X> ` is passed to Python,
2729+ or Python is built in :ref: `debug mode <debug-build >`.
27112730 (Contributed by Donghee Na in :gh: `141770 `.)
27122731
27132732* CPython is now built with frame pointers enabled by default
0 commit comments