gh-95914: Add links to 3.11 WhatsNew Summary items (#98416)

Add links to Summary items to where readers can learn more
This commit is contained in:
C.A.M. Gerlach 2022-10-18 18:10:35 -05:00 committed by GitHub
parent f4ead4874b
commit fcae1954a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,44 +58,49 @@ Summary -- Release highlights
.. This section singles out the most important changes in Python 3.11. .. This section singles out the most important changes in Python 3.11.
Brevity is key. Brevity is key.
- Python 3.11 is between 10-60% faster than Python 3.10. On average, we measured a * Python 3.11 is between 10-60% faster than Python 3.10.
1.25x speedup on the standard benchmark suite. See `Faster CPython`_ for details. On average, we measured a 1.25x speedup on the standard benchmark suite.
See :ref:`whatsnew311-faster-cpython` for details.
.. PEP-sized items next. .. PEP-sized items next.
New syntax features: New syntax features:
* :pep:`654`: Exception Groups and ``except*``. * :ref:`whatsnew311-pep654`
New built-in features: New built-in features:
* :pep:`678`: Enriching Exceptions with Notes. * :ref:`whatsnew311-pep678`
New standard library modules: New standard library modules:
* :pep:`680`: ``tomllib`` — Support for Parsing TOML in the Standard Library. * :pep:`680`: :mod:`tomllib`
Support for parsing `TOML <https://toml.io/>`_ in the Standard Library
Interpreter improvements: Interpreter improvements:
* :pep:`657`: Include Fine Grained Error Locations in Tracebacks. * :ref:`whatsnew311-pep657`
* New :option:`-P` command line option and :envvar:`PYTHONSAFEPATH` environment * New :option:`-P` command line option and :envvar:`PYTHONSAFEPATH` environment
variable to disable automatically prepending a potentially unsafe path variable to :ref:`disable automatically prepending potentially unsafe paths
(the working dir or script directory, depending on invocation) <whatsnew311-pythonsafepath>` to :data:`sys.path`
to :data:`sys.path`.
New typing features: New typing features:
* :pep:`646`: Variadic generics. * :ref:`whatsnew311-pep646`
* :pep:`655`: Marking individual TypedDict items as required or potentially missing. * :ref:`whatsnew311-pep655`
* :pep:`673`: ``Self`` type. * :ref:`whatsnew311-pep673`
* :pep:`675`: Arbitrary literal string type. * :ref:`whatsnew311-pep675`
* :pep:`681`: Data Class Transforms. * :ref:`whatsnew311-pep681`
Important deprecations, removals or restrictions: Important deprecations, removals and restrictions:
* :pep:`594`: Removing dead batteries from the standard library. * :pep:`594`:
* :pep:`624`: Remove ``Py_UNICODE`` encoder APIs. :ref:`Many legacy standard library modules have been deprecated
* :pep:`670`: Convert macros to functions in the Python C API. <whatsnew311-pep594>` and will be removed in Python 3.13
* :pep:`624`:
:ref:`Py_UNICODE encoder APIs have been removed <whatsnew311-pep624>`
* :pep:`670`:
:ref:`Macros converted to static inline functions <whatsnew311-pep670>`
.. _whatsnew311-features: .. _whatsnew311-features:
@ -105,8 +110,8 @@ New Features
.. _whatsnew311-pep657: .. _whatsnew311-pep657:
PEP 657: Enhanced error locations in tracebacks PEP 657: Fine-grained error locations in tracebacks
----------------------------------------------- ---------------------------------------------------
When printing tracebacks, the interpreter will now point to the exact expression When printing tracebacks, the interpreter will now point to the exact expression
that caused the error, instead of just the line. For example: that caused the error, instead of just the line. For example:
@ -381,7 +386,7 @@ Kumar Srinivasan and Graham Bleaney.)
.. _whatsnew311-pep681: .. _whatsnew311-pep681:
PEP 681: Data Class Transforms PEP 681: Data class transforms
------------------------------ ------------------------------
:data:`~typing.dataclass_transform` may be used to :data:`~typing.dataclass_transform` may be used to
@ -457,6 +462,8 @@ Other Language Changes
pickles instance attributes implemented as :term:`slots <__slots__>`. pickles instance attributes implemented as :term:`slots <__slots__>`.
(Contributed by Serhiy Storchaka in :issue:`26579`.) (Contributed by Serhiy Storchaka in :issue:`26579`.)
.. _whatsnew311-pythonsafepath:
* Added a :option:`-P` command line option * Added a :option:`-P` command line option
and a :envvar:`PYTHONSAFEPATH` environment variable, and a :envvar:`PYTHONSAFEPATH` environment variable,
which disable the automatic prepending to :data:`sys.path` which disable the automatic prepending to :data:`sys.path`
@ -1546,11 +1553,7 @@ Deprecated C APIs are :ref:`listed separately <whatsnew311-c-api-deprecated>`.
removed in Python 3.13. Use ``locale.setlocale(locale.LC_ALL, "")`` instead. removed in Python 3.13. Use ``locale.setlocale(locale.LC_ALL, "")`` instead.
(Contributed by Victor Stinner in :gh:`90817`.) (Contributed by Victor Stinner in :gh:`90817`.)
* The :mod:`asynchat`, :mod:`asyncore` and :mod:`smtpd` modules have been .. _whatsnew311-pep594:
deprecated since at least Python 3.6. Their documentation and deprecation
warnings have now been updated to note they will removed in Python 3.12
(:pep:`594`).
(Contributed by Hugo van Kemenade in :issue:`47022`.)
* :pep:`594` led to the deprecations of the following modules which are * :pep:`594` led to the deprecations of the following modules which are
slated for removal in Python 3.13: slated for removal in Python 3.13:
@ -1578,6 +1581,11 @@ Deprecated C APIs are :ref:`listed separately <whatsnew311-c-api-deprecated>`.
(Contributed by Brett Cannon in :issue:`47061` and Victor Stinner in (Contributed by Brett Cannon in :issue:`47061` and Victor Stinner in
:gh:`68966`.) :gh:`68966`.)
* The :mod:`asynchat`, :mod:`asyncore` and :mod:`smtpd` modules have been
deprecated since at least Python 3.6. Their documentation and deprecation
warnings have now been updated to note they will removed in Python 3.12.
(Contributed by Hugo van Kemenade in :issue:`47022`.)
* More strict rules will be applied now applied for numerical group references * More strict rules will be applied now applied for numerical group references
and group names in regular expressions in future Python versions. and group names in regular expressions in future Python versions.
Only sequence of ASCII digits will be now accepted as a numerical reference. Only sequence of ASCII digits will be now accepted as a numerical reference.
@ -1970,6 +1978,8 @@ New Features
Porting to Python 3.11 Porting to Python 3.11
---------------------- ----------------------
.. _whatsnew311-pep670:
* Some macros have been converted to static inline functions to avoid * Some macros have been converted to static inline functions to avoid
`macro pitfalls <https://gcc.gnu.org/onlinedocs/cpp/Macro-Pitfalls.html>`_. `macro pitfalls <https://gcc.gnu.org/onlinedocs/cpp/Macro-Pitfalls.html>`_.
The change should be mostly transparent to users, The change should be mostly transparent to users,
@ -2378,6 +2388,8 @@ Removed
API). API).
(Contributed by Victor Stinner in :issue:`45412`.) (Contributed by Victor Stinner in :issue:`45412`.)
.. _whatsnew311-pep624:
* Remove the :c:type:`Py_UNICODE` encoder APIs, * Remove the :c:type:`Py_UNICODE` encoder APIs,
as they have been deprecated since Python 3.3, as they have been deprecated since Python 3.3,
are little used are little used