From aa981bab508c4dc7f868078590eab2f8dcd8d272 Mon Sep 17 00:00:00 2001 From: "C.A.M. Gerlach" Date: Sat, 1 Oct 2022 22:57:03 -0500 Subject: [PATCH 1/3] Add and refine reST/Sphinx syntax for implementation changes section --- Doc/whatsnew/3.11.rst | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 0cd281edbe5b17..d8377146322e21 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -471,17 +471,22 @@ Other Language Changes there is a mixture of strings and bytes keys. (Contributed by Thomas Grainger in :gh:`91181`.) + +.. _whatsnew311-other-implementation-changes: + Other CPython Implementation Changes ==================================== -* Special methods :meth:`complex.__complex__` and :meth:`bytes.__bytes__` are implemented to +* Special methods :meth:`~object.__complex__` and :meth:`~object.__bytes__` are implemented to support :class:`typing.SupportsComplex` and :class:`typing.SupportsBytes` protocols. (Contributed by Mark Dickinson and Dong-hee Na in :issue:`24234`.) * ``siphash13`` is added as a new internal hashing algorithms. It has similar security - properties as ``siphash24`` but it is slightly faster for long inputs. ``str``, ``bytes``, - and some other types now use it as default algorithm for :func:`hash`. :pep:`552` - hash-based pyc files now use ``siphash13``, too. + properties as ``siphash24`` but it is slightly faster for long inputs. + :class:`str`, :class:`bytes`, and some other types + now use it as default algorithm for :func:`hash`. + :pep:`552` :ref:`hash-based .pyc files ` + now use ``siphash13``, too. (Contributed by Inada Naoki in :issue:`29410`.) * When an active exception is re-raised by a :keyword:`raise` statement with no parameters, @@ -490,24 +495,26 @@ Other CPython Implementation Changes reflected in the re-raised exception. (Contributed by Irit Katriel in :issue:`45711`.) -* The interpreter state's representation of handled exceptions (a.k.a exc_info, or - _PyErr_StackItem) now has only the ``exc_value`` field, ``exc_type`` and ``exc_traceback`` +* The interpreter state's representation of handled exceptions + (a.k.a ``exc_info``, or ``_PyErr_StackItem``) + now has only the ``exc_value`` field, ``exc_type`` and ``exc_traceback`` have been removed as their values can be derived from ``exc_value``. (Contributed by Irit Katriel in :issue:`45711`.) -* A new command line option for the Windows installer ``AppendPath`` has been added. +* A new :ref:`command line option ` + for the Windows installer ``AppendPath`` has been added. It behaves similiar to ``PrependPath`` but appends the install and scripts directories instead of prepending them. (Contributed by Bastian Neuburger in :issue:`44934`.) -* The :c:member:`PyConfig.module_search_paths_set` field must now be set to 1 for +* The :c:member:`PyConfig.module_search_paths_set` field must now be set to ``1`` for initialization to use :c:member:`PyConfig.module_search_paths` to initialize :data:`sys.path`. Otherwise, initialization will recalculate the path and replace any values added to ``module_search_paths``. * The output of the :option:`--help` option is changed to fit inside 50 lines and 80 columns. Information about :ref:`Python environment variables ` - and :option:`-X options <-X>` is available with the new :option:`--help-env` or + and :option:`-X` options is available with the new :option:`--help-env` or :option:`--help-xoptions` flags, and with :option:`--help-all`. (Contributed by Éric Araujo in :issue:`46142`.) From 52afa4d98595bba53f635f8e49b40183821114af Mon Sep 17 00:00:00 2001 From: "C.A.M. Gerlach" Date: Sat, 1 Oct 2022 23:09:15 -0500 Subject: [PATCH 2/3] Clarify and refine wording in the Implementation Changes section --- Doc/whatsnew/3.11.rst | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index d8377146322e21..f4c9b1299f456f 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -477,14 +477,16 @@ Other Language Changes Other CPython Implementation Changes ==================================== -* Special methods :meth:`~object.__complex__` and :meth:`~object.__bytes__` are implemented to - support :class:`typing.SupportsComplex` and :class:`typing.SupportsBytes` protocols. +* The special methods :meth:`~object.__complex__` for :class:`complex` + and :meth:`~object.__bytes__` for :class:`bytes` are implemented to support + the :class:`typing.SupportsComplex` and :class:`typing.SupportsBytes` protocols. (Contributed by Mark Dickinson and Dong-hee Na in :issue:`24234`.) -* ``siphash13`` is added as a new internal hashing algorithms. It has similar security - properties as ``siphash24`` but it is slightly faster for long inputs. +* ``siphash13`` is added as a new internal hashing algorithm. + It has similar security properties as ``siphash24``, + but it is slightly faster for long inputs. :class:`str`, :class:`bytes`, and some other types - now use it as default algorithm for :func:`hash`. + now use it as the default algorithm for :func:`hash`. :pep:`552` :ref:`hash-based .pyc files ` now use ``siphash13``, too. (Contributed by Inada Naoki in :issue:`29410`.) @@ -496,15 +498,15 @@ Other CPython Implementation Changes (Contributed by Irit Katriel in :issue:`45711`.) * The interpreter state's representation of handled exceptions - (a.k.a ``exc_info``, or ``_PyErr_StackItem``) - now has only the ``exc_value`` field, ``exc_type`` and ``exc_traceback`` - have been removed as their values can be derived from ``exc_value``. + (aka ``exc_info`` or ``_PyErr_StackItem``) + now only has the ``exc_value`` field; ``exc_type`` and ``exc_traceback`` + have been removed, as they can be derived from ``exc_value``. (Contributed by Irit Katriel in :issue:`45711`.) -* A new :ref:`command line option ` - for the Windows installer ``AppendPath`` has been added. - It behaves similiar to ``PrependPath`` but appends the install and scripts directories - instead of prepending them. +* A new :ref:`command line option `, ``AppendPath``, + has been added for the Windows installer. + It behaves similarly to ``PrependPath``, + but appends the install and scripts directories instead of prepending them. (Contributed by Bastian Neuburger in :issue:`44934`.) * The :c:member:`PyConfig.module_search_paths_set` field must now be set to ``1`` for @@ -512,10 +514,11 @@ Other CPython Implementation Changes :data:`sys.path`. Otherwise, initialization will recalculate the path and replace any values added to ``module_search_paths``. -* The output of the :option:`--help` option is changed to fit inside 50 lines and 80 - columns. Information about :ref:`Python environment variables ` - and :option:`-X` options is available with the new :option:`--help-env` or - :option:`--help-xoptions` flags, and with :option:`--help-all`. +* The output of the :option:`--help` option now fits in 50 lines/80 columns. + Information about :ref:`Python environment variables ` + and :option:`-X` options is now available using the respective + :option:`--help-env` and :option:`--help-xoptions` flags, + and with the new :option:`--help-all`. (Contributed by Éric Araujo in :issue:`46142`.) From 701f6cbc1628f45b6ece26cc5981f2946a648155 Mon Sep 17 00:00:00 2001 From: "C.A.M. Gerlach" Date: Tue, 4 Oct 2022 17:37:55 -0500 Subject: [PATCH 3/3] Elide unnecessary comma Co-authored-by: Ezio Melotti --- Doc/whatsnew/3.11.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index f4c9b1299f456f..fd8c07824a4b50 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -488,7 +488,7 @@ Other CPython Implementation Changes :class:`str`, :class:`bytes`, and some other types now use it as the default algorithm for :func:`hash`. :pep:`552` :ref:`hash-based .pyc files ` - now use ``siphash13``, too. + now use ``siphash13`` too. (Contributed by Inada Naoki in :issue:`29410`.) * When an active exception is re-raised by a :keyword:`raise` statement with no parameters,