mirror of
https://github.com/python/cpython.git
synced 2025-09-28 03:13:48 +00:00
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 dd13b23e49
)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
This commit is contained in:
parent
febbb4b819
commit
c96c7630c5
1 changed files with 91 additions and 22 deletions
|
@ -615,12 +615,18 @@ asyncio
|
||||||
These are primarily intended for internal use,
|
These are primarily intended for internal use,
|
||||||
notably by :class:`~asyncio.TaskGroup`.
|
notably by :class:`~asyncio.TaskGroup`.
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-contextlib:
|
||||||
|
|
||||||
contextlib
|
contextlib
|
||||||
----------
|
----------
|
||||||
|
|
||||||
Added non parallel-safe :func:`~contextlib.chdir` context manager to change
|
* Added non parallel-safe :func:`~contextlib.chdir` context manager to change
|
||||||
the current working directory and then restore it on exit. Simple wrapper
|
the current working directory and then restore it on exit. Simple wrapper
|
||||||
around :func:`~os.chdir`. (Contributed by Filipe Laíns in :issue:`25625`)
|
around :func:`~os.chdir`. (Contributed by Filipe Laíns in :issue:`25625`)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-dataclasses:
|
||||||
|
|
||||||
dataclasses
|
dataclasses
|
||||||
-----------
|
-----------
|
||||||
|
@ -630,11 +636,15 @@ dataclasses
|
||||||
:class:`dict`, :class:`list` or :class:`set`. (Contributed by Eric V. Smith in
|
:class:`dict`, :class:`list` or :class:`set`. (Contributed by Eric V. Smith in
|
||||||
:issue:`44674`.)
|
:issue:`44674`.)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-datetime:
|
||||||
|
|
||||||
datetime
|
datetime
|
||||||
--------
|
--------
|
||||||
|
|
||||||
* Add :attr:`datetime.UTC`, a convenience alias for
|
* Add :attr:`datetime.UTC`, a convenience alias for
|
||||||
:attr:`datetime.timezone.utc`. (Contributed by Kabir Kwatra in :gh:`91973`.)
|
:attr:`datetime.timezone.utc`. (Contributed by Kabir Kwatra in :gh:`91973`.)
|
||||||
|
|
||||||
* :meth:`datetime.date.fromisoformat`, :meth:`datetime.time.fromisoformat` and
|
* :meth:`datetime.date.fromisoformat`, :meth:`datetime.time.fromisoformat` and
|
||||||
:meth:`datetime.datetime.fromisoformat` can now be used to parse most ISO 8601
|
:meth:`datetime.datetime.fromisoformat` can now be used to parse most ISO 8601
|
||||||
formats (barring only those that support fractional hours and minutes).
|
formats (barring only those that support fractional hours and minutes).
|
||||||
|
@ -659,7 +669,7 @@ enum
|
||||||
(used by :func:`str`, :func:`format` and :term:`f-string`\s).
|
(used by :func:`str`, :func:`format` and :term:`f-string`\s).
|
||||||
|
|
||||||
* Changed :class:`~enum.IntEnum`, :class:`~enum.IntFlag` and :class:`~enum.StrEnum`
|
* Changed :class:`~enum.IntEnum`, :class:`~enum.IntFlag` and :class:`~enum.StrEnum`
|
||||||
to now inherit from :class:`ReprEnum`,
|
to now inherit from :class:`~enum.ReprEnum`,
|
||||||
so their :func:`str` output now matches :func:`format`
|
so their :func:`str` output now matches :func:`format`
|
||||||
(both ``str(AnIntEnum.ONE)`` and ``format(AnIntEnum.ONE)`` return ``'1'``,
|
(both ``str(AnIntEnum.ONE)`` and ``format(AnIntEnum.ONE)`` return ``'1'``,
|
||||||
whereas before ``str(AnIntEnum.ONE)`` returned ``'AnIntEnum.ONE'``.
|
whereas before ``str(AnIntEnum.ONE)`` returned ``'AnIntEnum.ONE'``.
|
||||||
|
@ -709,6 +719,18 @@ enum
|
||||||
inverted flags are coerced to their positive equivalent.
|
inverted flags are coerced to their positive equivalent.
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-fcntl:
|
||||||
|
|
||||||
|
fcntl
|
||||||
|
-----
|
||||||
|
|
||||||
|
* On FreeBSD, the :data:`!F_DUP2FD` and :data:`!F_DUP2FD_CLOEXEC` flags respectively
|
||||||
|
are supported, the former equals to ``dup2`` usage while the latter set
|
||||||
|
the ``FD_CLOEXEC`` flag in addition.
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-fractions:
|
||||||
|
|
||||||
fractions
|
fractions
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
@ -719,6 +741,9 @@ fractions
|
||||||
that an ``isinstance(some_fraction, typing.SupportsInt)`` check passes.
|
that an ``isinstance(some_fraction, typing.SupportsInt)`` check passes.
|
||||||
(Contributed by Mark Dickinson in :issue:`44547`.)
|
(Contributed by Mark Dickinson in :issue:`44547`.)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-functools:
|
||||||
|
|
||||||
functools
|
functools
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
@ -749,6 +774,9 @@ functools
|
||||||
|
|
||||||
(Contributed by Yurii Karabas in :issue:`46014`.)
|
(Contributed by Yurii Karabas in :issue:`46014`.)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-hashlib:
|
||||||
|
|
||||||
hashlib
|
hashlib
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
@ -767,6 +795,9 @@ hashlib
|
||||||
of files or file-like objects.
|
of files or file-like objects.
|
||||||
(Contributed by Christian Heimes in :gh:`89313`.)
|
(Contributed by Christian Heimes in :gh:`89313`.)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-idle:
|
||||||
|
|
||||||
IDLE and idlelib
|
IDLE and idlelib
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
@ -804,6 +835,9 @@ inspect
|
||||||
|
|
||||||
(Contributed by Pablo Galindo in :gh:`88116`.)
|
(Contributed by Pablo Galindo in :gh:`88116`.)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-locale:
|
||||||
|
|
||||||
locale
|
locale
|
||||||
------
|
------
|
||||||
|
|
||||||
|
@ -831,6 +865,8 @@ logging
|
||||||
(Contributed by Kirill Pinchuk in :gh:`88457`.)
|
(Contributed by Kirill Pinchuk in :gh:`88457`.)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-math:
|
||||||
|
|
||||||
math
|
math
|
||||||
----
|
----
|
||||||
|
|
||||||
|
@ -850,6 +886,8 @@ math
|
||||||
(Contributed by Victor Stinner in :issue:`46917`.)
|
(Contributed by Victor Stinner in :issue:`46917`.)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-operator:
|
||||||
|
|
||||||
operator
|
operator
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
@ -858,6 +896,8 @@ operator
|
||||||
(Contributed by Antony Lee in :issue:`44019`.)
|
(Contributed by Antony Lee in :issue:`44019`.)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-os:
|
||||||
|
|
||||||
os
|
os
|
||||||
--
|
--
|
||||||
|
|
||||||
|
@ -866,6 +906,8 @@ os
|
||||||
(Contributed by Dong-hee Na in :issue:`44611`.)
|
(Contributed by Dong-hee Na in :issue:`44611`.)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-pathlib:
|
||||||
|
|
||||||
pathlib
|
pathlib
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
@ -874,6 +916,9 @@ pathlib
|
||||||
:data:`~os.sep` or :data:`~os.altsep`.
|
:data:`~os.sep` or :data:`~os.altsep`.
|
||||||
(Contributed by Eisuke Kawasima in :issue:`22276` and :issue:`33392`.)
|
(Contributed by Eisuke Kawasima in :issue:`22276` and :issue:`33392`.)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-re:
|
||||||
|
|
||||||
re
|
re
|
||||||
--
|
--
|
||||||
|
|
||||||
|
@ -881,6 +926,9 @@ re
|
||||||
``?+``, ``{m,n}+``) are now supported in regular expressions.
|
``?+``, ``{m,n}+``) are now supported in regular expressions.
|
||||||
(Contributed by Jeffrey C. Jacobs and Serhiy Storchaka in :issue:`433030`.)
|
(Contributed by Jeffrey C. Jacobs and Serhiy Storchaka in :issue:`433030`.)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-shutil:
|
||||||
|
|
||||||
shutil
|
shutil
|
||||||
------
|
------
|
||||||
|
|
||||||
|
@ -888,6 +936,8 @@ shutil
|
||||||
(Contributed by Serhiy Storchaka in :issue:`46245`.)
|
(Contributed by Serhiy Storchaka in :issue:`46245`.)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-socket:
|
||||||
|
|
||||||
socket
|
socket
|
||||||
------
|
------
|
||||||
|
|
||||||
|
@ -899,6 +949,9 @@ socket
|
||||||
instead of only raising the last error.
|
instead of only raising the last error.
|
||||||
(Contributed by Irit Katriel in :issue:`29980`.)
|
(Contributed by Irit Katriel in :issue:`29980`.)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-sqlite3:
|
||||||
|
|
||||||
sqlite3
|
sqlite3
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
@ -962,13 +1015,15 @@ string
|
||||||
(Contributed by Ben Kehoe in :gh:`90465`.)
|
(Contributed by Ben Kehoe in :gh:`90465`.)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-sys:
|
||||||
|
|
||||||
sys
|
sys
|
||||||
---
|
---
|
||||||
|
|
||||||
* :func:`sys.exc_info` now derives the ``type`` and ``traceback`` fields
|
* :func:`sys.exc_info` now derives the ``type`` and ``traceback`` fields
|
||||||
from the ``value`` (the exception instance), so when an exception is
|
from the ``value`` (the exception instance), so when an exception is
|
||||||
modified while it is being handled, the changes are reflected in
|
modified while it is being handled, the changes are reflected in
|
||||||
the results of subsequent calls to :func:`exc_info`.
|
the results of subsequent calls to :func:`!exc_info`.
|
||||||
(Contributed by Irit Katriel in :issue:`45711`.)
|
(Contributed by Irit Katriel in :issue:`45711`.)
|
||||||
|
|
||||||
* Add :func:`sys.exception` which returns the active exception instance
|
* Add :func:`sys.exception` which returns the active exception instance
|
||||||
|
@ -979,6 +1034,8 @@ sys
|
||||||
(Contributed by Victor Stinner in :gh:`57684`.)
|
(Contributed by Victor Stinner in :gh:`57684`.)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-sysconfig:
|
||||||
|
|
||||||
sysconfig
|
sysconfig
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
@ -1009,6 +1066,8 @@ tempfile
|
||||||
(Contributed by Carey Metcalfe in :gh:`70363`.)
|
(Contributed by Carey Metcalfe in :gh:`70363`.)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-threading:
|
||||||
|
|
||||||
threading
|
threading
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
@ -1020,6 +1079,8 @@ threading
|
||||||
(Contributed by Victor Stinner in :issue:`41710`.)
|
(Contributed by Victor Stinner in :issue:`41710`.)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-time:
|
||||||
|
|
||||||
time
|
time
|
||||||
----
|
----
|
||||||
|
|
||||||
|
@ -1037,6 +1098,18 @@ time
|
||||||
(Contributed by Benjamin Szőke, Dong-hee Na, Eryk Sun and Victor Stinner in :issue:`21302` and :issue:`45429`.)
|
(Contributed by Benjamin Szőke, Dong-hee Na, Eryk Sun and Victor Stinner in :issue:`21302` and :issue:`45429`.)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-tkinter:
|
||||||
|
|
||||||
|
tkinter
|
||||||
|
-------
|
||||||
|
|
||||||
|
* Added method ``info_patchlevel()`` which returns the exact version of
|
||||||
|
the Tcl library as a named tuple similar to :data:`sys.version_info`.
|
||||||
|
(Contributed by Serhiy Storchaka in :gh:`91827`.)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-traceback:
|
||||||
|
|
||||||
traceback
|
traceback
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
@ -1050,6 +1123,8 @@ traceback
|
||||||
(Contributed by Irit Katriel in :issue:`33809`.)
|
(Contributed by Irit Katriel in :issue:`33809`.)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-typing:
|
||||||
|
|
||||||
typing
|
typing
|
||||||
------
|
------
|
||||||
|
|
||||||
|
@ -1090,7 +1165,7 @@ For major changes, see :ref:`new-feat-related-type-hints-311`.
|
||||||
to clear all registered overloads of a function.
|
to clear all registered overloads of a function.
|
||||||
(Contributed by Jelle Zijlstra in :gh:`89263`.)
|
(Contributed by Jelle Zijlstra in :gh:`89263`.)
|
||||||
|
|
||||||
* The :meth:`__init__` method of :class:`~typing.Protocol` subclasses
|
* The :meth:`~object.__init__` method of :class:`~typing.Protocol` subclasses
|
||||||
is now preserved. (Contributed by Adrian Garcia Badarasco in :gh:`88970`.)
|
is now preserved. (Contributed by Adrian Garcia Badarasco in :gh:`88970`.)
|
||||||
|
|
||||||
* The representation of empty tuple types (``Tuple[()]``) is simplified.
|
* The representation of empty tuple types (``Tuple[()]``) is simplified.
|
||||||
|
@ -1119,20 +1194,17 @@ For major changes, see :ref:`new-feat-related-type-hints-311`.
|
||||||
by Nikita Sobolev in :gh:`90729`.)
|
by Nikita Sobolev in :gh:`90729`.)
|
||||||
|
|
||||||
|
|
||||||
tkinter
|
.. _whatsnew311-unicodedata:
|
||||||
-------
|
|
||||||
|
|
||||||
* Added method ``info_patchlevel()`` which returns the exact version of
|
|
||||||
the Tcl library as a named tuple similar to :data:`sys.version_info`.
|
|
||||||
(Contributed by Serhiy Storchaka in :gh:`91827`.)
|
|
||||||
|
|
||||||
|
|
||||||
unicodedata
|
unicodedata
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
* The Unicode database has been updated to version 14.0.0. (Contributed by Benjamin Peterson in :issue:`45190`).
|
* The Unicode database has been updated to version 14.0.0.
|
||||||
|
(Contributed by Benjamin Peterson in :issue:`45190`).
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-unittest:
|
||||||
|
|
||||||
unittest
|
unittest
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
@ -1145,6 +1217,8 @@ unittest
|
||||||
(Contributed by Serhiy Storchaka in :issue:`45046`.)
|
(Contributed by Serhiy Storchaka in :issue:`45046`.)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-venv:
|
||||||
|
|
||||||
venv
|
venv
|
||||||
----
|
----
|
||||||
|
|
||||||
|
@ -1158,6 +1232,9 @@ venv
|
||||||
Third party code that also creates new virtual environments should do the same.
|
Third party code that also creates new virtual environments should do the same.
|
||||||
(Contributed by Miro Hrončok in :issue:`45413`.)
|
(Contributed by Miro Hrončok in :issue:`45413`.)
|
||||||
|
|
||||||
|
|
||||||
|
.. _whatsnew311-warnings:
|
||||||
|
|
||||||
warnings
|
warnings
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
@ -1184,14 +1261,6 @@ zipfile
|
||||||
(Contributed by Miguel Brito in :gh:`88261`.)
|
(Contributed by Miguel Brito in :gh:`88261`.)
|
||||||
|
|
||||||
|
|
||||||
fcntl
|
|
||||||
-----
|
|
||||||
|
|
||||||
* On FreeBSD, the :attr:`F_DUP2FD` and :attr:`F_DUP2FD_CLOEXEC` flags respectively
|
|
||||||
are supported, the former equals to ``dup2`` usage while the latter set
|
|
||||||
the ``FD_CLOEXEC`` flag in addition.
|
|
||||||
|
|
||||||
|
|
||||||
.. _whatsnew311-optimizations:
|
.. _whatsnew311-optimizations:
|
||||||
|
|
||||||
Optimizations
|
Optimizations
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue