@@ -58,44 +58,49 @@ Summary -- Release highlights
5858.. This section singles out the most important changes in Python 3.11.
5959 Brevity is key.
6060
61- - Python 3.11 is between 10-60% faster than Python 3.10. On average, we measured a
62- 1.25x speedup on the standard benchmark suite. See `Faster CPython `_ for details.
61+ * Python 3.11 is between 10-60% faster than Python 3.10.
62+ On average, we measured a 1.25x speedup on the standard benchmark suite.
63+ See :ref: `whatsnew311-faster-cpython ` for details.
6364
6465.. PEP-sized items next.
6566
6667 New syntax features:
6768
68- * :pep: ` 654 `: Exception Groups and `` except* ``.
69+ * :ref: ` whatsnew311-pep654 `
6970
7071New built-in features:
7172
72- * :pep: ` 678 `: Enriching Exceptions with Notes.
73+ * :ref: ` whatsnew311-pep678 `
7374
7475New standard library modules:
7576
76- * :pep: `680 `: ``tomllib `` — Support for Parsing TOML in the Standard Library.
77+ * :pep: `680 `: :mod: `tomllib ` —
78+ Support for parsing `TOML <https://toml.io/ >`_ in the Standard Library
7779
7880Interpreter improvements:
7981
80- * :pep: ` 657 `: Include Fine Grained Error Locations in Tracebacks.
82+ * :ref: ` whatsnew311-pep657 `
8183* New :option: `-P ` command line option and :envvar: `PYTHONSAFEPATH ` environment
82- variable to disable automatically prepending a potentially unsafe path
83- (the working dir or script directory, depending on invocation)
84- to :data: `sys.path `.
84+ variable to :ref: `disable automatically prepending potentially unsafe paths
85+ <whatsnew311-pythonsafepath>` to :data: `sys.path `
8586
8687New typing features:
8788
88- * :pep: ` 646 `: Variadic generics.
89- * :pep: ` 655 `: Marking individual TypedDict items as required or potentially missing.
90- * :pep: ` 673 `: `` Self `` type.
91- * :pep: ` 675 `: Arbitrary literal string type.
92- * :pep: ` 681 `: Data Class Transforms.
89+ * :ref: ` whatsnew311-pep646 `
90+ * :ref: ` whatsnew311-pep655 `
91+ * :ref: ` whatsnew311-pep673 `
92+ * :ref: ` whatsnew311-pep675 `
93+ * :ref: ` whatsnew311-pep681 `
9394
94- Important deprecations, removals or restrictions:
95+ Important deprecations, removals and restrictions:
9596
96- * :pep: `594 `: Removing dead batteries from the standard library.
97- * :pep: `624 `: Remove ``Py_UNICODE `` encoder APIs.
98- * :pep: `670 `: Convert macros to functions in the Python C API.
97+ * :pep: `594 `:
98+ :ref: `Many legacy standard library modules have been deprecated
99+ <whatsnew311-pep594>` and will be removed in Python 3.13
100+ * :pep: `624 `:
101+ :ref: `Py_UNICODE encoder APIs have been removed <whatsnew311-pep624 >`
102+ * :pep: `670 `:
103+ :ref: `Macros converted to static inline functions <whatsnew311-pep670 >`
99104
100105
101106.. _whatsnew311-features :
@@ -105,8 +110,8 @@ New Features
105110
106111.. _whatsnew311-pep657 :
107112
108- PEP 657: Enhanced error locations in tracebacks
109- -----------------------------------------------
113+ PEP 657: Fine-grained error locations in tracebacks
114+ ---------------------------------------------------
110115
111116When printing tracebacks, the interpreter will now point to the exact expression
112117that caused the error, instead of just the line. For example:
@@ -381,7 +386,7 @@ Kumar Srinivasan and Graham Bleaney.)
381386
382387.. _whatsnew311-pep681 :
383388
384- PEP 681: Data Class Transforms
389+ PEP 681: Data class transforms
385390------------------------------
386391
387392:data: `~typing.dataclass_transform ` may be used to
@@ -455,6 +460,8 @@ Other Language Changes
455460 pickles instance attributes implemented as :term: `slots <__slots__> `.
456461 (Contributed by Serhiy Storchaka in :issue: `26579 `.)
457462
463+ .. _whatsnew311-pythonsafepath :
464+
458465* Added a :option: `-P ` command line option
459466 and a :envvar: `PYTHONSAFEPATH ` environment variable,
460467 which disable the automatic prepending to :data: `sys.path `
@@ -1497,11 +1504,7 @@ Deprecated
14971504 removed in Python 3.13. Use ``locale.setlocale(locale.LC_ALL, "") `` instead.
14981505 (Contributed by Victor Stinner in :gh: `90817 `.)
14991506
1500- * The :mod: `asynchat `, :mod: `asyncore ` and :mod: `smtpd ` modules have been
1501- deprecated since at least Python 3.6. Their documentation and deprecation
1502- warnings have now been updated to note they will removed in Python 3.12
1503- (:pep: `594 `).
1504- (Contributed by Hugo van Kemenade in :issue: `47022 `.)
1507+ .. _whatsnew311-pep594 :
15051508
15061509* :pep: `594 ` led to the deprecations of the following modules which are
15071510 slated for removal in Python 3.13:
@@ -1529,6 +1532,11 @@ Deprecated
15291532 (Contributed by Brett Cannon in :issue: `47061 ` and Victor Stinner in
15301533 :gh: `68966 `.)
15311534
1535+ * The :mod: `asynchat `, :mod: `asyncore ` and :mod: `smtpd ` modules have been
1536+ deprecated since at least Python 3.6. Their documentation and deprecation
1537+ warnings have now been updated to note they will removed in Python 3.12.
1538+ (Contributed by Hugo van Kemenade in :issue: `47022 `.)
1539+
15321540* More strict rules will be applied now applied for numerical group references
15331541 and group names in regular expressions in future Python versions.
15341542 Only sequence of ASCII digits will be now accepted as a numerical reference.
@@ -1916,6 +1924,8 @@ New Features
19161924Porting to Python 3.11
19171925----------------------
19181926
1927+ .. _whatsnew311-pep670 :
1928+
19191929* Some macros have been converted to static inline functions to avoid
19201930 `macro pitfalls <https://gcc.gnu.org/onlinedocs/cpp/Macro-Pitfalls.html >`_.
19211931 The change should be mostly transparent to users,
@@ -2292,6 +2302,8 @@ Removed
22922302 API).
22932303 (Contributed by Victor Stinner in :issue: `45412 `.)
22942304
2305+ .. _whatsnew311-pep624 :
2306+
22952307* Remove the :c:type: `Py_UNICODE ` encoder APIs,
22962308 as they have been deprecated since Python 3.3,
22972309 are little used
0 commit comments