Skip to content

Commit c96c763

Browse files
gh-95913: Prepare Improved Modules in 3.11 WhatsNew for final edits (GH-98631)
* Add two line breaks and ref target labels to remaining subsections * Fix a few out of order Improved Modules * Fix a few minor textual formatting issues in sections * Fix remaining Sphinx warnings in the Improved Modules section (cherry picked from commit dd13b23) Co-authored-by: C.A.M. Gerlach <[email protected]>
1 parent febbb4b commit c96c763

File tree

1 file changed

+91
-22
lines changed

1 file changed

+91
-22
lines changed

Doc/whatsnew/3.11.rst

Lines changed: 91 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -615,12 +615,18 @@ asyncio
615615
These are primarily intended for internal use,
616616
notably by :class:`~asyncio.TaskGroup`.
617617

618+
619+
.. _whatsnew311-contextlib:
620+
618621
contextlib
619622
----------
620623

621-
Added non parallel-safe :func:`~contextlib.chdir` context manager to change
622-
the current working directory and then restore it on exit. Simple wrapper
623-
around :func:`~os.chdir`. (Contributed by Filipe Laíns in :issue:`25625`)
624+
* Added non parallel-safe :func:`~contextlib.chdir` context manager to change
625+
the current working directory and then restore it on exit. Simple wrapper
626+
around :func:`~os.chdir`. (Contributed by Filipe Laíns in :issue:`25625`)
627+
628+
629+
.. _whatsnew311-dataclasses:
624630

625631
dataclasses
626632
-----------
@@ -630,11 +636,15 @@ dataclasses
630636
:class:`dict`, :class:`list` or :class:`set`. (Contributed by Eric V. Smith in
631637
:issue:`44674`.)
632638

639+
640+
.. _whatsnew311-datetime:
641+
633642
datetime
634643
--------
635644

636645
* Add :attr:`datetime.UTC`, a convenience alias for
637646
:attr:`datetime.timezone.utc`. (Contributed by Kabir Kwatra in :gh:`91973`.)
647+
638648
* :meth:`datetime.date.fromisoformat`, :meth:`datetime.time.fromisoformat` and
639649
:meth:`datetime.datetime.fromisoformat` can now be used to parse most ISO 8601
640650
formats (barring only those that support fractional hours and minutes).
@@ -659,7 +669,7 @@ enum
659669
(used by :func:`str`, :func:`format` and :term:`f-string`\s).
660670

661671
* Changed :class:`~enum.IntEnum`, :class:`~enum.IntFlag` and :class:`~enum.StrEnum`
662-
to now inherit from :class:`ReprEnum`,
672+
to now inherit from :class:`~enum.ReprEnum`,
663673
so their :func:`str` output now matches :func:`format`
664674
(both ``str(AnIntEnum.ONE)`` and ``format(AnIntEnum.ONE)`` return ``'1'``,
665675
whereas before ``str(AnIntEnum.ONE)`` returned ``'AnIntEnum.ONE'``.
@@ -709,6 +719,18 @@ enum
709719
inverted flags are coerced to their positive equivalent.
710720

711721

722+
.. _whatsnew311-fcntl:
723+
724+
fcntl
725+
-----
726+
727+
* On FreeBSD, the :data:`!F_DUP2FD` and :data:`!F_DUP2FD_CLOEXEC` flags respectively
728+
are supported, the former equals to ``dup2`` usage while the latter set
729+
the ``FD_CLOEXEC`` flag in addition.
730+
731+
732+
.. _whatsnew311-fractions:
733+
712734
fractions
713735
---------
714736

@@ -719,6 +741,9 @@ fractions
719741
that an ``isinstance(some_fraction, typing.SupportsInt)`` check passes.
720742
(Contributed by Mark Dickinson in :issue:`44547`.)
721743

744+
745+
.. _whatsnew311-functools:
746+
722747
functools
723748
---------
724749

@@ -749,6 +774,9 @@ functools
749774

750775
(Contributed by Yurii Karabas in :issue:`46014`.)
751776

777+
778+
.. _whatsnew311-hashlib:
779+
752780
hashlib
753781
-------
754782

@@ -767,6 +795,9 @@ hashlib
767795
of files or file-like objects.
768796
(Contributed by Christian Heimes in :gh:`89313`.)
769797

798+
799+
.. _whatsnew311-idle:
800+
770801
IDLE and idlelib
771802
----------------
772803

@@ -804,6 +835,9 @@ inspect
804835

805836
(Contributed by Pablo Galindo in :gh:`88116`.)
806837

838+
839+
.. _whatsnew311-locale:
840+
807841
locale
808842
------
809843

@@ -831,6 +865,8 @@ logging
831865
(Contributed by Kirill Pinchuk in :gh:`88457`.)
832866

833867

868+
.. _whatsnew311-math:
869+
834870
math
835871
----
836872

@@ -850,6 +886,8 @@ math
850886
(Contributed by Victor Stinner in :issue:`46917`.)
851887

852888

889+
.. _whatsnew311-operator:
890+
853891
operator
854892
--------
855893

@@ -858,6 +896,8 @@ operator
858896
(Contributed by Antony Lee in :issue:`44019`.)
859897

860898

899+
.. _whatsnew311-os:
900+
861901
os
862902
--
863903

@@ -866,6 +906,8 @@ os
866906
(Contributed by Dong-hee Na in :issue:`44611`.)
867907

868908

909+
.. _whatsnew311-pathlib:
910+
869911
pathlib
870912
-------
871913

@@ -874,20 +916,28 @@ pathlib
874916
:data:`~os.sep` or :data:`~os.altsep`.
875917
(Contributed by Eisuke Kawasima in :issue:`22276` and :issue:`33392`.)
876918

919+
920+
.. _whatsnew311-re:
921+
877922
re
878923
--
879924

880925
* Atomic grouping (``(?>...)``) and possessive quantifiers (``*+``, ``++``,
881926
``?+``, ``{m,n}+``) are now supported in regular expressions.
882927
(Contributed by Jeffrey C. Jacobs and Serhiy Storchaka in :issue:`433030`.)
883928

929+
930+
.. _whatsnew311-shutil:
931+
884932
shutil
885933
------
886934

887935
* Add optional parameter *dir_fd* in :func:`shutil.rmtree`.
888936
(Contributed by Serhiy Storchaka in :issue:`46245`.)
889937

890938

939+
.. _whatsnew311-socket:
940+
891941
socket
892942
------
893943

@@ -899,6 +949,9 @@ socket
899949
instead of only raising the last error.
900950
(Contributed by Irit Katriel in :issue:`29980`.)
901951

952+
953+
.. _whatsnew311-sqlite3:
954+
902955
sqlite3
903956
-------
904957

@@ -962,13 +1015,15 @@ string
9621015
(Contributed by Ben Kehoe in :gh:`90465`.)
9631016

9641017

1018+
.. _whatsnew311-sys:
1019+
9651020
sys
9661021
---
9671022

9681023
* :func:`sys.exc_info` now derives the ``type`` and ``traceback`` fields
9691024
from the ``value`` (the exception instance), so when an exception is
9701025
modified while it is being handled, the changes are reflected in
971-
the results of subsequent calls to :func:`exc_info`.
1026+
the results of subsequent calls to :func:`!exc_info`.
9721027
(Contributed by Irit Katriel in :issue:`45711`.)
9731028

9741029
* Add :func:`sys.exception` which returns the active exception instance
@@ -979,6 +1034,8 @@ sys
9791034
(Contributed by Victor Stinner in :gh:`57684`.)
9801035

9811036

1037+
.. _whatsnew311-sysconfig:
1038+
9821039
sysconfig
9831040
---------
9841041

@@ -1009,6 +1066,8 @@ tempfile
10091066
(Contributed by Carey Metcalfe in :gh:`70363`.)
10101067

10111068

1069+
.. _whatsnew311-threading:
1070+
10121071
threading
10131072
---------
10141073

@@ -1020,6 +1079,8 @@ threading
10201079
(Contributed by Victor Stinner in :issue:`41710`.)
10211080

10221081

1082+
.. _whatsnew311-time:
1083+
10231084
time
10241085
----
10251086

@@ -1037,6 +1098,18 @@ time
10371098
(Contributed by Benjamin Szőke, Dong-hee Na, Eryk Sun and Victor Stinner in :issue:`21302` and :issue:`45429`.)
10381099

10391100

1101+
.. _whatsnew311-tkinter:
1102+
1103+
tkinter
1104+
-------
1105+
1106+
* Added method ``info_patchlevel()`` which returns the exact version of
1107+
the Tcl library as a named tuple similar to :data:`sys.version_info`.
1108+
(Contributed by Serhiy Storchaka in :gh:`91827`.)
1109+
1110+
1111+
.. _whatsnew311-traceback:
1112+
10401113
traceback
10411114
---------
10421115

@@ -1050,6 +1123,8 @@ traceback
10501123
(Contributed by Irit Katriel in :issue:`33809`.)
10511124

10521125

1126+
.. _whatsnew311-typing:
1127+
10531128
typing
10541129
------
10551130

@@ -1090,7 +1165,7 @@ For major changes, see :ref:`new-feat-related-type-hints-311`.
10901165
to clear all registered overloads of a function.
10911166
(Contributed by Jelle Zijlstra in :gh:`89263`.)
10921167

1093-
* The :meth:`__init__` method of :class:`~typing.Protocol` subclasses
1168+
* The :meth:`~object.__init__` method of :class:`~typing.Protocol` subclasses
10941169
is now preserved. (Contributed by Adrian Garcia Badarasco in :gh:`88970`.)
10951170

10961171
* The representation of empty tuple types (``Tuple[()]``) is simplified.
@@ -1119,19 +1194,16 @@ For major changes, see :ref:`new-feat-related-type-hints-311`.
11191194
by Nikita Sobolev in :gh:`90729`.)
11201195

11211196

1122-
tkinter
1123-
-------
1124-
1125-
* Added method ``info_patchlevel()`` which returns the exact version of
1126-
the Tcl library as a named tuple similar to :data:`sys.version_info`.
1127-
(Contributed by Serhiy Storchaka in :gh:`91827`.)
1128-
1197+
.. _whatsnew311-unicodedata:
11291198

11301199
unicodedata
11311200
-----------
11321201

1133-
* The Unicode database has been updated to version 14.0.0. (Contributed by Benjamin Peterson in :issue:`45190`).
1202+
* The Unicode database has been updated to version 14.0.0.
1203+
(Contributed by Benjamin Peterson in :issue:`45190`).
1204+
11341205

1206+
.. _whatsnew311-unittest:
11351207

11361208
unittest
11371209
--------
@@ -1145,6 +1217,8 @@ unittest
11451217
(Contributed by Serhiy Storchaka in :issue:`45046`.)
11461218

11471219

1220+
.. _whatsnew311-venv:
1221+
11481222
venv
11491223
----
11501224

@@ -1158,6 +1232,9 @@ venv
11581232
Third party code that also creates new virtual environments should do the same.
11591233
(Contributed by Miro Hrončok in :issue:`45413`.)
11601234

1235+
1236+
.. _whatsnew311-warnings:
1237+
11611238
warnings
11621239
--------
11631240

@@ -1184,14 +1261,6 @@ zipfile
11841261
(Contributed by Miguel Brito in :gh:`88261`.)
11851262

11861263

1187-
fcntl
1188-
-----
1189-
1190-
* On FreeBSD, the :attr:`F_DUP2FD` and :attr:`F_DUP2FD_CLOEXEC` flags respectively
1191-
are supported, the former equals to ``dup2`` usage while the latter set
1192-
the ``FD_CLOEXEC`` flag in addition.
1193-
1194-
11951264
.. _whatsnew311-optimizations:
11961265

11971266
Optimizations

0 commit comments

Comments
 (0)