Skip to content

[3.11] gh-95913: Prepare Improved Modules in 3.11 WhatsNew for final edits (GH-98631) #98652

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 91 additions & 22 deletions Doc/whatsnew/3.11.rst
Original file line number Diff line number Diff line change
Expand Up @@ -615,12 +615,18 @@ asyncio
These are primarily intended for internal use,
notably by :class:`~asyncio.TaskGroup`.


.. _whatsnew311-contextlib:

contextlib
----------

Added non parallel-safe :func:`~contextlib.chdir` context manager to change
the current working directory and then restore it on exit. Simple wrapper
around :func:`~os.chdir`. (Contributed by Filipe Laíns in :issue:`25625`)
* Added non parallel-safe :func:`~contextlib.chdir` context manager to change
the current working directory and then restore it on exit. Simple wrapper
around :func:`~os.chdir`. (Contributed by Filipe Laíns in :issue:`25625`)


.. _whatsnew311-dataclasses:

dataclasses
-----------
Expand All @@ -630,11 +636,15 @@ dataclasses
:class:`dict`, :class:`list` or :class:`set`. (Contributed by Eric V. Smith in
:issue:`44674`.)


.. _whatsnew311-datetime:

datetime
--------

* Add :attr:`datetime.UTC`, a convenience alias for
:attr:`datetime.timezone.utc`. (Contributed by Kabir Kwatra in :gh:`91973`.)

* :meth:`datetime.date.fromisoformat`, :meth:`datetime.time.fromisoformat` and
:meth:`datetime.datetime.fromisoformat` can now be used to parse most ISO 8601
formats (barring only those that support fractional hours and minutes).
Expand All @@ -659,7 +669,7 @@ enum
(used by :func:`str`, :func:`format` and :term:`f-string`\s).

* 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`
(both ``str(AnIntEnum.ONE)`` and ``format(AnIntEnum.ONE)`` return ``'1'``,
whereas before ``str(AnIntEnum.ONE)`` returned ``'AnIntEnum.ONE'``.
Expand Down Expand Up @@ -709,6 +719,18 @@ enum
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
---------

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


.. _whatsnew311-functools:

functools
---------

Expand Down Expand Up @@ -749,6 +774,9 @@ functools

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


.. _whatsnew311-hashlib:

hashlib
-------

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


.. _whatsnew311-idle:

IDLE and idlelib
----------------

Expand Down Expand Up @@ -804,6 +835,9 @@ inspect

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


.. _whatsnew311-locale:

locale
------

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


.. _whatsnew311-math:

math
----

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


.. _whatsnew311-operator:

operator
--------

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


.. _whatsnew311-os:

os
--

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


.. _whatsnew311-pathlib:

pathlib
-------

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


.. _whatsnew311-re:

re
--

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


.. _whatsnew311-shutil:

shutil
------

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


.. _whatsnew311-socket:

socket
------

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


.. _whatsnew311-sqlite3:

sqlite3
-------

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


.. _whatsnew311-sys:

sys
---

* :func:`sys.exc_info` now derives the ``type`` and ``traceback`` fields
from the ``value`` (the exception instance), so when an exception is
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`.)

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


.. _whatsnew311-sysconfig:

sysconfig
---------

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


.. _whatsnew311-threading:

threading
---------

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


.. _whatsnew311-time:

time
----

Expand All @@ -1037,6 +1098,18 @@ time
(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
---------

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


.. _whatsnew311-typing:

typing
------

Expand Down Expand Up @@ -1090,7 +1165,7 @@ For major changes, see :ref:`new-feat-related-type-hints-311`.
to clear all registered overloads of a function.
(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`.)

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


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-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
--------
Expand All @@ -1145,6 +1217,8 @@ unittest
(Contributed by Serhiy Storchaka in :issue:`45046`.)


.. _whatsnew311-venv:

venv
----

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


.. _whatsnew311-warnings:

warnings
--------

Expand All @@ -1184,14 +1261,6 @@ zipfile
(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:

Optimizations
Expand Down