Skip to content

Commit dd13b23

Browse files
authored
gh-95913: Prepare Improved Modules in 3.11 WhatsNew for final edits (#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
1 parent a1a8828 commit dd13b23

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
@@ -614,12 +614,18 @@ asyncio
614614
These are primarily intended for internal use,
615615
notably by :class:`~asyncio.TaskGroup`.
616616

617+
618+
.. _whatsnew311-contextlib:
619+
617620
contextlib
618621
----------
619622

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

624630
dataclasses
625631
-----------
@@ -629,11 +635,15 @@ dataclasses
629635
:class:`dict`, :class:`list` or :class:`set`. (Contributed by Eric V. Smith in
630636
:issue:`44674`.)
631637

638+
639+
.. _whatsnew311-datetime:
640+
632641
datetime
633642
--------
634643

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

660670
* Changed :class:`~enum.IntEnum`, :class:`~enum.IntFlag` and :class:`~enum.StrEnum`
661-
to now inherit from :class:`ReprEnum`,
671+
to now inherit from :class:`~enum.ReprEnum`,
662672
so their :func:`str` output now matches :func:`format`
663673
(both ``str(AnIntEnum.ONE)`` and ``format(AnIntEnum.ONE)`` return ``'1'``,
664674
whereas before ``str(AnIntEnum.ONE)`` returned ``'AnIntEnum.ONE'``.
@@ -708,6 +718,18 @@ enum
708718
inverted flags are coerced to their positive equivalent.
709719

710720

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

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

743+
744+
.. _whatsnew311-functools:
745+
721746
functools
722747
---------
723748

@@ -748,6 +773,9 @@ functools
748773

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

776+
777+
.. _whatsnew311-hashlib:
778+
751779
hashlib
752780
-------
753781

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

797+
798+
.. _whatsnew311-idle:
799+
769800
IDLE and idlelib
770801
----------------
771802

@@ -803,6 +834,9 @@ inspect
803834

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

837+
838+
.. _whatsnew311-locale:
839+
806840
locale
807841
------
808842

@@ -830,6 +864,8 @@ logging
830864
(Contributed by Kirill Pinchuk in :gh:`88457`.)
831865

832866

867+
.. _whatsnew311-math:
868+
833869
math
834870
----
835871

@@ -849,6 +885,8 @@ math
849885
(Contributed by Victor Stinner in :issue:`46917`.)
850886

851887

888+
.. _whatsnew311-operator:
889+
852890
operator
853891
--------
854892

@@ -857,6 +895,8 @@ operator
857895
(Contributed by Antony Lee in :issue:`44019`.)
858896

859897

898+
.. _whatsnew311-os:
899+
860900
os
861901
--
862902

@@ -865,6 +905,8 @@ os
865905
(Contributed by Dong-hee Na in :issue:`44611`.)
866906

867907

908+
.. _whatsnew311-pathlib:
909+
868910
pathlib
869911
-------
870912

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

918+
919+
.. _whatsnew311-re:
920+
876921
re
877922
--
878923

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

928+
929+
.. _whatsnew311-shutil:
930+
883931
shutil
884932
------
885933

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

889937

938+
.. _whatsnew311-socket:
939+
890940
socket
891941
------
892942

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

951+
952+
.. _whatsnew311-sqlite3:
953+
901954
sqlite3
902955
-------
903956

@@ -961,13 +1014,15 @@ string
9611014
(Contributed by Ben Kehoe in :gh:`90465`.)
9621015

9631016

1017+
.. _whatsnew311-sys:
1018+
9641019
sys
9651020
---
9661021

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

9731028
* Add :func:`sys.exception` which returns the active exception instance
@@ -978,6 +1033,8 @@ sys
9781033
(Contributed by Victor Stinner in :gh:`57684`.)
9791034

9801035

1036+
.. _whatsnew311-sysconfig:
1037+
9811038
sysconfig
9821039
---------
9831040

@@ -1008,6 +1065,8 @@ tempfile
10081065
(Contributed by Carey Metcalfe in :gh:`70363`.)
10091066

10101067

1068+
.. _whatsnew311-threading:
1069+
10111070
threading
10121071
---------
10131072

@@ -1019,6 +1078,8 @@ threading
10191078
(Contributed by Victor Stinner in :issue:`41710`.)
10201079

10211080

1081+
.. _whatsnew311-time:
1082+
10221083
time
10231084
----
10241085

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

10381099

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

@@ -1049,6 +1122,8 @@ traceback
10491122
(Contributed by Irit Katriel in :issue:`33809`.)
10501123

10511124

1125+
.. _whatsnew311-typing:
1126+
10521127
typing
10531128
------
10541129

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

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

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

11201195

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

11291198
unicodedata
11301199
-----------
11311200

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

1205+
.. _whatsnew311-unittest:
11341206

11351207
unittest
11361208
--------
@@ -1144,6 +1216,8 @@ unittest
11441216
(Contributed by Serhiy Storchaka in :issue:`45046`.)
11451217

11461218

1219+
.. _whatsnew311-venv:
1220+
11471221
venv
11481222
----
11491223

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

1234+
1235+
.. _whatsnew311-warnings:
1236+
11601237
warnings
11611238
--------
11621239

@@ -1183,14 +1260,6 @@ zipfile
11831260
(Contributed by Miguel Brito in :gh:`88261`.)
11841261

11851262

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

11961265
Optimizations

0 commit comments

Comments
 (0)