From beb4111d2210fa4afaf22a0e2976eb125e1da6d6 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 5 May 2025 13:09:25 +0300 Subject: [PATCH 01/22] Add me as editor, fix some pycon code-blocks --- Doc/whatsnew/3.14.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 506a820175bc25..0f06eefc96b45a 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -2,7 +2,7 @@ What's new in Python 3.14 **************************** -:Editor: TBD +:Editor: Hugo van Kemenade .. Rules for maintenance: @@ -378,7 +378,7 @@ Improved error messages feature helps programmers quickly identify and fix common typing mistakes. For example: - .. code-block:: python + .. code-block:: pycon >>> whille True: ... pass @@ -419,7 +419,7 @@ Improved error messages error message prints the received number of values in more cases than before. (Contributed by Tushar Sadhwani in :gh:`122239`.) - .. code-block:: python + .. code-block:: pycon >>> x, y, z = 1, 2, 3, 4 Traceback (most recent call last): @@ -473,7 +473,7 @@ Improved error messages that the string may be intended to be part of the string. (Contributed by Pablo Galindo in :gh:`88535`.) - .. code-block:: python + .. code-block:: pycon >>> "The interesting object "The important object" is very important" Traceback (most recent call last): From 0b0404dce5d0b664cc0b27ad5b3becc19857761e Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 5 May 2025 15:11:45 +0300 Subject: [PATCH 02/22] Link to release PEP --- Doc/whatsnew/3.14.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 0f06eefc96b45a..6bb66ff3eb216f 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -48,6 +48,10 @@ This article explains the new features in Python 3.14, compared to 3.13. For full details, see the :ref:`changelog `. +.. seealso:: + + :pep:`745` -- Python 3.14 release schedule + .. note:: Prerelease users should be aware that this document is currently in draft From b9242865eaeb36aeed5b2e3eec1d8ba3a75da3d1 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 5 May 2025 17:58:11 +0300 Subject: [PATCH 03/22] Add intro --- Doc/whatsnew/3.14.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 6bb66ff3eb216f..5b00ff490e325e 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -65,6 +65,20 @@ Summary -- release highlights .. This section singles out the most important changes in Python 3.14. Brevity is key. +Python 3.14 beta is the pre-release of the next version of the Python +programming language, with a mix of changes to the language, the +implementation and the standard library. + +The biggest changes to the implementation include template strings (:pep:`750`) +deferred evaluation of annotations (:pep:`649`), +and a new type of interpreter that uses tail calls. + +The library changes include the addition of a new :mod:`!annotationlib` module +for introspecting and wrapping annotations (:pep:`649`), +a new :mod:`!compression.zstd` module for Zstandard support (:pep:`784`), +plus syntax highlighting in the REPL, +as well as the usual deprecations and removals, +and improvements in user-friendliness and correctness. .. PEP-sized items next. From dd094b9e53c579f2050448e272104041ad824f54 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 5 May 2025 17:58:30 +0300 Subject: [PATCH 04/22] Full stops in contributed by --- Doc/whatsnew/3.14.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 5b00ff490e325e..171ac26b4b3868 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -997,7 +997,7 @@ ctypes :class:`~ctypes.c_double_complex` and :class:`~ctypes.c_longdouble_complex`, are now available if both the compiler and the ``libffi`` library support complex C types. - (Contributed by Sergey B Kirpichev in :gh:`61103`). + (Contributed by Sergey B Kirpichev in :gh:`61103`.) * Add :func:`ctypes.util.dllist` for listing the shared libraries loaded by the current process. @@ -1007,7 +1007,7 @@ ctypes (``_pointer_type_cache``) to the :attr:`ctypes._CData.__pointer_type__` attribute of the corresponding :mod:`ctypes` types. This will stop the cache from growing without limits in some situations. - (Contributed by Sergey Miryanov in :gh:`100926`). + (Contributed by Sergey Miryanov in :gh:`100926`.) * The :class:`ctypes.py_object` type now supports subscription, making it a :term:`generic type`. @@ -1129,7 +1129,7 @@ graphlib * Allow :meth:`graphlib.TopologicalSorter.prepare` to be called more than once as long as sorting has not started. - (Contributed by Daniel Pope in :gh:`130914`) + (Contributed by Daniel Pope in :gh:`130914`.) heapq From a2864f51f135dc47759253692c2d524b4d478bcd Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 5 May 2025 18:05:09 +0300 Subject: [PATCH 05/22] See also directive --- Doc/whatsnew/3.14.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 171ac26b4b3868..12592cd3974a0b 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -184,12 +184,14 @@ With this in place, developers can write template systems to sanitize SQL, make safe shell operations, improve logging, tackle modern ideas in web development (HTML, CSS, and so on), and implement lightweight, custom business DSLs. -See :pep:`750` for more details. - (Contributed by Jim Baker, Guido van Rossum, Paul Everitt, Koudai Aono, Lysandros Nikolaou, Dave Peck, Adam Turner, Jelle Zijlstra, Bénédikt Tran, and Pablo Galindo Salgado in :gh:`132661`.) +.. seealso:: + :pep:`750`. + + .. _whatsnew314-pep768: PEP 768: Safe external debugger interface for CPython From ff26ade44d4479daf74d55c5d4a1a0c30e078c93 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 5 May 2025 18:05:23 +0300 Subject: [PATCH 06/22] Wording --- Doc/whatsnew/3.14.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 12592cd3974a0b..44088795e91d21 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -270,7 +270,7 @@ attaching to a remote process that is blocked in a system call or waiting for I/O will only work once the next bytecode instruction is executed or when the process receives a signal. -This feature leverages :pep:`768` and the :func:`sys.remote_exec` function +This feature uses :pep:`768` and the :func:`sys.remote_exec` function to attach to the remote process and send the PDB commands to it. @@ -814,7 +814,7 @@ Other language changes explicitly overridden in the subclass. (Contributed by Tomasz Pytel in :gh:`132329`.) -* The command line option :option:`-c` now automatically dedents its code +* The command-line option :option:`-c` now automatically dedents its code argument before execution. The auto-dedentation behavior mirrors :func:`textwrap.dedent`. (Contributed by Jon Crall and Steven Sun in :gh:`103998`.) From a85f24767807467a3575cd8257a74b897c77ae3d Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 5 May 2025 18:05:34 +0300 Subject: [PATCH 07/22] Brevity --- Doc/whatsnew/3.14.rst | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 44088795e91d21..058909ea94d704 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -869,10 +869,8 @@ argparse * Introduced the optional *color* parameter to :class:`argparse.ArgumentParser`, enabling color for help text. - This can be controlled via the :envvar:`PYTHON_COLORS` environment - variable as well as the canonical |NO_COLOR|_ - and |FORCE_COLOR|_ environment variables. - See also :ref:`using-on-controlling-color`. + This can be controlled by :ref:`environment variables + `. (Contributed by Hugo van Kemenade in :gh:`130645`.) @@ -909,10 +907,8 @@ calendar * By default, today's date is highlighted in color in :mod:`calendar`'s :ref:`command-line ` text output. - This can be controlled via the :envvar:`PYTHON_COLORS` environment - variable as well as the canonical |NO_COLOR|_ - and |FORCE_COLOR|_ environment variables. - See also :ref:`using-on-controlling-color`. + This can be controlled by :ref:`environment variables + `. (Contributed by Hugo van Kemenade in :gh:`128317`.) @@ -1224,11 +1220,10 @@ json .. _whatsnew314-color-json: -* By default, the output of the :ref:`JSON command-line interface ` - is highlighted in color. This can be controlled via the - :envvar:`PYTHON_COLORS` environment variable as well as the canonical - |NO_COLOR|_ and |FORCE_COLOR|_ environment variables. See also - :ref:`using-on-controlling-color`. +* By default, the output of the :ref:`JSON command-line interface + ` is highlighted in color. + This can be controlled by :ref:`environment variables + `. (Contributed by Tomas Roun in :gh:`131952`.) linecache @@ -1681,10 +1676,8 @@ unittest -------- * :mod:`unittest` output is now colored by default. - This can be controlled via the :envvar:`PYTHON_COLORS` environment - variable as well as the canonical |NO_COLOR|_ - and |FORCE_COLOR|_ environment variables. - See also :ref:`using-on-controlling-color`. + This can be controlled by :ref:`environment variables + `. (Contributed by Hugo van Kemenade in :gh:`127221`.) * unittest discovery supports :term:`namespace package` as start From 3c97a9b278ce18afb2598fa6a0b52f06d725992e Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 5 May 2025 18:27:55 +0300 Subject: [PATCH 08/22] Wording and wrapping --- Doc/whatsnew/3.14.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 058909ea94d704..7eb7cc948ef454 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -798,9 +798,9 @@ Other language changes The testbed can also be used to run the test suite of projects other than CPython itself. (Contributed by Russell Keith-Magee in :gh:`127592`.) -* Three-argument :func:`pow` now try calling :meth:`~object.__rpow__` if necessary. - Previously it was only called in two-argument :func:`!pow` and the binary - power operator. +* Three-argument :func:`pow` now tries calling :meth:`~object.__rpow__` if. + necessary. Previously it was only called in two-argument :func:`!pow` and the + binary power operator. (Contributed by Serhiy Storchaka in :gh:`130104`.) * Add a built-in implementation for HMAC (:rfc:`2104`) using formally verified From e30451bf2517c9a2473054ac74087b0ecb0d6098 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 5 May 2025 18:31:26 +0300 Subject: [PATCH 09/22] Formatting --- Doc/whatsnew/3.14.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 7eb7cc948ef454..ef4e1690ab1e38 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -833,8 +833,8 @@ Other language changes .. _whatsnew314-pep765: -PEP 765: Disallow return/break/continue that exit a finally block ------------------------------------------------------------------ +PEP 765: Disallow ``return``/``break``/``continue`` that exit a ``finally`` block +--------------------------------------------------------------------------------- The compiler emits a :exc:`SyntaxWarning` when a :keyword:`return`, :keyword:`break` or :keyword:`continue` statements appears where it exits a :keyword:`finally` block. From a218885cadc8bad888afdd37b713841bdd4cfb5e Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 5 May 2025 18:33:41 +0300 Subject: [PATCH 10/22] Punctuation --- Doc/whatsnew/3.14.rst | 56 +++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index ef4e1690ab1e38..eead1fd2f56b34 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -916,7 +916,7 @@ concurrent.futures ------------------ * Add :class:`~concurrent.futures.InterpreterPoolExecutor`, - which exposes "subinterpreters (multiple Python interpreters in the + which exposes "subinterpreters" (multiple Python interpreters in the same process) to Python code. This is separate from the proposed API in :pep:`734`. (Contributed by Eric Snow in :gh:`124548`.) @@ -1359,9 +1359,9 @@ multiprocessing * The :ref:`multiprocessing proxy objects ` for *list* and *dict* types gain previously overlooked missing methods: - * :meth:`!clear` and :meth:`!copy` for proxies of :class:`list`. + * :meth:`!clear` and :meth:`!copy` for proxies of :class:`list` * :meth:`~dict.fromkeys`, ``reversed(d)``, ``d | {}``, ``{} | d``, - ``d |= {'b': 2}`` for proxies of :class:`dict`. + ``d |= {'b': 2}`` for proxies of :class:`dict` (Contributed by Roy Hyunjin Han for :gh:`103134`.) @@ -1518,7 +1518,7 @@ socket :const:`~socket.BTPROTO_HCI` on Linux. (Contributed by Serhiy Storchaka in :gh:`70145`.) * Accept an integer as the address for - :const:`~socket.BTPROTO_HCI` on Linux + :const:`~socket.BTPROTO_HCI` on Linux. (Contributed by Serhiy Storchaka in :gh:`132099`.) * Return *cid* in :meth:`~socket.socket.getsockname` for :const:`~socket.BTPROTO_L2CAP`. @@ -2404,12 +2404,12 @@ New features * Add a new import and export API for Python :class:`int` objects (:pep:`757`): - * :c:func:`PyLong_GetNativeLayout`; - * :c:func:`PyLong_Export`; - * :c:func:`PyLong_FreeExport`; - * :c:func:`PyLongWriter_Create`; - * :c:func:`PyLongWriter_Finish`; - * :c:func:`PyLongWriter_Discard`. + * :c:func:`PyLong_GetNativeLayout` + * :c:func:`PyLong_Export` + * :c:func:`PyLong_FreeExport` + * :c:func:`PyLongWriter_Create` + * :c:func:`PyLongWriter_Finish` + * :c:func:`PyLongWriter_Discard` (Contributed by Sergey B Kirpichev and Victor Stinner in :gh:`102471`.) @@ -2517,24 +2517,24 @@ Porting to Python 3.14 * Private functions promoted to public C APIs: - * ``_PyBytes_Join()``: :c:func:`PyBytes_Join`. - * ``_PyLong_IsNegative()``: :c:func:`PyLong_IsNegative`. - * ``_PyLong_IsPositive()``: :c:func:`PyLong_IsPositive`. - * ``_PyLong_IsZero()``: :c:func:`PyLong_IsZero`. - * ``_PyLong_Sign()``: :c:func:`PyLong_GetSign`. - * ``_PyUnicodeWriter_Dealloc()``: :c:func:`PyUnicodeWriter_Discard`. - * ``_PyUnicodeWriter_Finish()``: :c:func:`PyUnicodeWriter_Finish`. - * ``_PyUnicodeWriter_Init()``: use :c:func:`PyUnicodeWriter_Create`. - * ``_PyUnicodeWriter_Prepare()``: (no replacement). - * ``_PyUnicodeWriter_PrepareKind()``: (no replacement). - * ``_PyUnicodeWriter_WriteChar()``: :c:func:`PyUnicodeWriter_WriteChar`. - * ``_PyUnicodeWriter_WriteStr()``: :c:func:`PyUnicodeWriter_WriteStr`. - * ``_PyUnicodeWriter_WriteSubstring()``: :c:func:`PyUnicodeWriter_WriteSubstring`. - * ``_PyUnicode_EQ()``: :c:func:`PyUnicode_Equal`. - * ``_PyUnicode_Equal()``: :c:func:`PyUnicode_Equal`. - * ``_Py_GetConfig()``: :c:func:`PyConfig_Get` and :c:func:`PyConfig_GetInt`. - * ``_Py_HashBytes()``: :c:func:`Py_HashBuffer`. - * ``_Py_fopen_obj()``: :c:func:`Py_fopen`. + * ``_PyBytes_Join()``: :c:func:`PyBytes_Join` + * ``_PyLong_IsNegative()``: :c:func:`PyLong_IsNegative` + * ``_PyLong_IsPositive()``: :c:func:`PyLong_IsPositive` + * ``_PyLong_IsZero()``: :c:func:`PyLong_IsZero` + * ``_PyLong_Sign()``: :c:func:`PyLong_GetSign` + * ``_PyUnicodeWriter_Dealloc()``: :c:func:`PyUnicodeWriter_Discard` + * ``_PyUnicodeWriter_Finish()``: :c:func:`PyUnicodeWriter_Finish` + * ``_PyUnicodeWriter_Init()``: use :c:func:`PyUnicodeWriter_Create` + * ``_PyUnicodeWriter_Prepare()``: (no replacement) + * ``_PyUnicodeWriter_PrepareKind()``: (no replacement) + * ``_PyUnicodeWriter_WriteChar()``: :c:func:`PyUnicodeWriter_WriteChar` + * ``_PyUnicodeWriter_WriteStr()``: :c:func:`PyUnicodeWriter_WriteStr` + * ``_PyUnicodeWriter_WriteSubstring()``: :c:func:`PyUnicodeWriter_WriteSubstring` + * ``_PyUnicode_EQ()``: :c:func:`PyUnicode_Equal` + * ``_PyUnicode_Equal()``: :c:func:`PyUnicode_Equal` + * ``_Py_GetConfig()``: :c:func:`PyConfig_Get` and :c:func:`PyConfig_GetInt` + * ``_Py_HashBytes()``: :c:func:`Py_HashBuffer` + * ``_Py_fopen_obj()``: :c:func:`Py_fopen` The `pythoncapi-compat project`_ can be used to get most of these new functions on Python 3.13 and older. From 5b3d08a2cfa0306278a7f34cac5244af56646d5f Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 5 May 2025 18:57:11 +0300 Subject: [PATCH 11/22] Link, wording, wrapping --- Doc/whatsnew/3.14.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index eead1fd2f56b34..783b5df22b9da4 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -1371,9 +1371,9 @@ multiprocessing (Contributed by Mingyu Park in :gh:`129949`.) * Add :func:`multiprocessing.Process.interrupt` which terminates the child - process by sending :py:const:`~signal.SIGINT`. This enables "finally" clauses - and printing stack trace for the terminated process. - (Contributed by Artem Pulkin in :gh:`131913`.) + process by sending :py:const:`~signal.SIGINT`. This enables + :keyword:`finally` clauses allowing to print a stack trace for the terminated + process. (Contributed by Artem Pulkin in :gh:`131913`.) operator -------- From dd9e3c8d7f88ffcdb9477216eff1386fda72f089 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 5 May 2025 19:02:53 +0300 Subject: [PATCH 12/22] Link, wrap --- Doc/whatsnew/3.14.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 783b5df22b9da4..2bf7ec0b0abc76 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -1597,8 +1597,8 @@ threading tkinter ------- -* Make tkinter widget methods :meth:`!after` and :meth:`!after_idle` accept - arguments passed by keyword. +* Make :mod:`tkinter` widget methods :meth:`!after` and :meth:`!after_idle` + accept arguments passed by keyword. (Contributed by Zhikang Yan in :gh:`126899`.) * Add ability to specify name for :class:`!tkinter.OptionMenu` and From 4d7b5f876b516de229ebcf633e95fca08c4caf7f Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 5 May 2025 19:08:33 +0300 Subject: [PATCH 13/22] Group deprecations --- Doc/whatsnew/3.14.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 2bf7ec0b0abc76..ae50801ab6643b 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -1905,17 +1905,17 @@ Deprecated (Contributed by Inada Naoki in :gh:`133036`.) * :mod:`ctypes`: - On non-Windows platforms, setting :attr:`.Structure._pack_` to use a - MSVC-compatible default memory layout is deprecated in favor of setting - :attr:`.Structure._layout_` to ``'ms'``. - (Contributed by Petr Viktorin in :gh:`131747`.) -* :mod:`ctypes`: - Calling :func:`ctypes.POINTER` on a string is deprecated. - Use :ref:`ctypes-incomplete-types` for self-referential structures. - Also, the internal ``ctypes._pointer_type_cache`` is deprecated. - See :func:`ctypes.POINTER` for updated implementation details. - (Contributed by Sergey Myrianov in :gh:`100926`.) + * On non-Windows platforms, setting :attr:`.Structure._pack_` to use a + MSVC-compatible default memory layout is deprecated in favor of setting + :attr:`.Structure._layout_` to ``'ms'``. + (Contributed by Petr Viktorin in :gh:`131747`.) + + * Calling :func:`ctypes.POINTER` on a string is deprecated. + Use :ref:`ctypes-incomplete-types` for self-referential structures. + Also, the internal ``ctypes._pointer_type_cache`` is deprecated. + See :func:`ctypes.POINTER` for updated implementation details. + (Contributed by Sergey Myrianov in :gh:`100926`.) * :mod:`functools`: Calling the Python implementation of :func:`functools.reduce` with *function* From 610ef2a1fb4d50beab06970d5542f43d3e16a576 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 5 May 2025 19:11:05 +0300 Subject: [PATCH 14/22] Avoid Latin abbreviations --- Doc/whatsnew/3.14.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index ae50801ab6643b..98115c6727eddc 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -2081,7 +2081,7 @@ asyncio asyncio.run(main()) - If you need to start something, e.g. a server listening on a socket + If you need to start something, for example, a server listening on a socket and then run forever, use :func:`asyncio.run` and an :class:`asyncio.Event`. From 4b94ab2f029a431a68e27dd31e41a0e2c792874f Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 5 May 2025 19:16:43 +0300 Subject: [PATCH 15/22] Heading sentence case --- Doc/whatsnew/3.14.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 98115c6727eddc..ddbb8b7b5e5b4f 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -2263,7 +2263,7 @@ Others of module attributes is not currently supported. (Contributed by Tomas Roun in :gh:`69605`.) -CPython Bytecode Changes +CPython bytecode changes ======================== * Replaced the opcode ``BINARY_SUBSCR`` by :opcode:`BINARY_OP` with oparg ``NB_SUBSCR``. From 6ebcb11ae91fcb51bcca11c0813b9032eb175dcf Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 5 May 2025 19:19:36 +0300 Subject: [PATCH 16/22] Move new REPL autocomplete from 'Removed>Others' to 'Other language changes' --- Doc/whatsnew/3.14.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index ddbb8b7b5e5b4f..0f6a747906adc4 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -738,6 +738,13 @@ in the :envvar:`PYTHONSTARTUP` script. Other language changes ====================== +* The default :term:`interactive` shell now supports import autocompletion. + This means that typing ``import foo`` and pressing ```` will suggest + modules starting with ``foo``. Similarly, typing ``from foo import b`` will + suggest submodules of ``foo`` starting with ``b``. Note that autocompletion + of module attributes is not currently supported. + (Contributed by Tomas Roun in :gh:`69605`.) + * The :func:`map` built-in now has an optional keyword-only *strict* flag like :func:`zip` to check that all the iterables are of equal length. (Contributed by Wannes Boeykens in :gh:`119793`.) @@ -2256,12 +2263,6 @@ Others integer must implement either :meth:`~object.__int__` or :meth:`~object.__index__`. (Contributed by Mark Dickinson in :gh:`119743`.) -* The default :term:`interactive` shell now supports import autocompletion. - This means that typing ``import foo`` and pressing ```` will suggest - modules starting with ``foo``. Similarly, typing ``from foo import b`` will - suggest submodules of ``foo`` starting with ``b``. Note that autocompletion - of module attributes is not currently supported. - (Contributed by Tomas Roun in :gh:`69605`.) CPython bytecode changes ======================== From befd46d3364b53bc91ec4301bb0f4b24cfff4230 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 5 May 2025 19:29:48 +0300 Subject: [PATCH 17/22] Wording --- Doc/whatsnew/3.14.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 0f6a747906adc4..bc7f4b4917f6e9 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -826,10 +826,10 @@ Other language changes :func:`textwrap.dedent`. (Contributed by Jon Crall and Steven Sun in :gh:`103998`.) -* Improve error message when an object supporting the synchronous (resp. - asynchronous) context manager protocol is entered using :keyword:`async - with` (resp. :keyword:`with`) instead of :keyword:`with` (resp. - :keyword:`async with`). +* Improve error message when an object supporting the synchronous + context manager protocol is entered using :keyword:`async + with` instead of :keyword:`with`. + And vice versa with the asynchronous context manager protocol. (Contributed by Bénédikt Tran in :gh:`128398`.) * :option:`!-J` is no longer a reserved flag for Jython_, From f79436f8a179a34b2d634954e6b7e7f814a30a2c Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 5 May 2025 23:36:40 +0300 Subject: [PATCH 18/22] Color enabled for stdlib argparse CLIs' help --- Doc/library/cmdline.rst | 2 ++ Doc/whatsnew/3.14.rst | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Doc/library/cmdline.rst b/Doc/library/cmdline.rst index f7ae2133a70b7a..16c67ddbf7cec2 100644 --- a/Doc/library/cmdline.rst +++ b/Doc/library/cmdline.rst @@ -1,3 +1,5 @@ +.. _library-cmdline: + ++++++++++++++++++++++++++++++++++++ Modules command-line interface (CLI) ++++++++++++++++++++++++++++++++++++ diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 864bd0d1382147..eac95add404199 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -877,7 +877,8 @@ argparse * Introduced the optional *color* parameter to :class:`argparse.ArgumentParser`, enabling color for help text. This can be controlled by :ref:`environment variables - `. + `. Color has also been enabled for help in the + :ref:`stdlib CLIs ` which use :mod:`!argparse`. (Contributed by Hugo van Kemenade in :gh:`130645`.) From 1054137e38d62cc61367ae767a7e42f92cc2b098 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 6 May 2025 00:23:17 +0300 Subject: [PATCH 19/22] Apply suggestions from code review --- Doc/whatsnew/3.14.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index eac95add404199..20c4fea1e0c126 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -805,7 +805,7 @@ Other language changes The testbed can also be used to run the test suite of projects other than CPython itself. (Contributed by Russell Keith-Magee in :gh:`127592`.) -* Three-argument :func:`pow` now tries calling :meth:`~object.__rpow__` if. +* Three-argument :func:`pow` now tries calling :meth:`~object.__rpow__` if necessary. Previously it was only called in two-argument :func:`!pow` and the binary power operator. (Contributed by Serhiy Storchaka in :gh:`130104`.) @@ -1385,7 +1385,7 @@ multiprocessing * Add :func:`multiprocessing.Process.interrupt` which terminates the child process by sending :py:const:`~signal.SIGINT`. This enables - :keyword:`finally` clauses allowing to print a stack trace for the terminated + :keyword:`finally` clauses to print a stack trace for the terminated process. (Contributed by Artem Pulkin in :gh:`131913`.) operator From 04e6912085563e150aff466274c5835548878aa0 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 6 May 2025 07:27:46 +0300 Subject: [PATCH 20/22] Add comma Co-authored-by: Daniel Hollas --- Doc/whatsnew/3.14.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 20c4fea1e0c126..7bbb50bb467116 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -69,7 +69,7 @@ Python 3.14 beta is the pre-release of the next version of the Python programming language, with a mix of changes to the language, the implementation and the standard library. -The biggest changes to the implementation include template strings (:pep:`750`) +The biggest changes to the implementation include template strings (:pep:`750`), deferred evaluation of annotations (:pep:`649`), and a new type of interpreter that uses tail calls. From ae5335f391228e4075b3f8cbf96188b624e48121 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 6 May 2025 07:28:41 +0300 Subject: [PATCH 21/22] Sentence case --- Doc/whatsnew/3.14.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 7bbb50bb467116..648898da63e24c 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -84,7 +84,7 @@ and improvements in user-friendliness and correctness. * :ref:`PEP 649: deferred evaluation of annotations ` * :ref:`PEP 741: Python Configuration C API ` -* :ref:`PEP 750: Template Strings ` +* :ref:`PEP 750: Template strings ` * :ref:`PEP 758: Allow except and except* expressions without parentheses ` * :ref:`PEP 761: Discontinuation of PGP signatures ` * :ref:`PEP 765: Disallow return/break/continue that exit a finally block ` @@ -122,7 +122,7 @@ New features .. _whatsnew314-pep750: -PEP 750: Template Strings +PEP 750: Template strings ------------------------- Template string literals (t-strings) are a generalization of f-strings, From 72bd2261b9b55490cc637baf43fd63500d135686 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 6 May 2025 10:04:03 +0300 Subject: [PATCH 22/22] See also: PEP --- Doc/whatsnew/3.14.rst | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 0b209475c5f724..d1adc5ce4da410 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -249,10 +249,12 @@ A key implementation detail is that the interface piggybacks on the interpreter' loop and safe points, ensuring zero overhead during normal execution while providing a reliable way for external processes to coordinate debugging operations. -See :pep:`768` for more details. - (Contributed by Pablo Galindo Salgado, Matt Wozniski, and Ivona Stojanovic in :gh:`131591`.) +.. seealso:: + :pep:`768`. + + .. _whatsnew314-pep784: PEP 784: Adding Zstandard to the standard library @@ -296,7 +298,7 @@ As can be seen, the API is similar to the APIs of the :mod:`!lzma` and Victor Stinner, and Rogdham in :gh:`132983`) .. seealso:: - :pep:`768`. + :pep:`784`. .. _whatsnew314-remote-pdb: @@ -323,6 +325,9 @@ to attach to the remote process and send the PDB commands to it. (Contributed by Matt Wozniski and Pablo Galindo in :gh:`131591`.) +.. seealso:: + :pep:`768`. + .. _whatsnew314-pep758: @@ -350,6 +355,9 @@ Check :pep:`758` for more details. (Contributed by Pablo Galindo and Brett Cannon in :gh:`131831`.) +.. seealso:: + :pep:`758`. + .. _whatsnew314-pep649: @@ -576,6 +584,9 @@ Improved error messages ^^^^^^ SyntaxError: cannot use subscript as import target +.. seealso:: + :pep:`649`. + .. _whatsnew314-pep741: