Skip to content
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
116 changes: 60 additions & 56 deletions Doc/whatsnew/3.16.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,16 @@ codecs
even when a built-in codec of the same name exists.
(Contributed by Serhiy Storchaka in :gh:`152997`.)


concurrent.futures
------------------

* The iterator returned by :meth:`concurrent.futures.Executor.map` is no longer
automatically closed if a function call raises an exception.
Use method :meth:`!close` to explicitly close the iterator.
(Contributed by xzmeng and Serhiy Storchaka in :gh:`108518`.)


csv
---

Expand All @@ -140,6 +150,19 @@ csv
instead of always returning ``'\r\n'``.
(Contributed by Serhiy Storchaka in :gh:`75008`.)


ctypes
------

* Add :func:`ctypes.util.struct` for generating :class:`~ctypes.Structure` types
from an annotation-based syntax, similar to how the :mod:`dataclasses` module
is used.
(Contributed by Peter Bierma in :gh:`104533`.)
* Add :func:`ctypes.util.wrap_dll_function` for generating function pointers
through a function signature.
(Contributed by Peter Bierma in :gh:`153903`.)


curses
------

Expand Down Expand Up @@ -274,27 +297,6 @@ curses
(Contributed by Serhiy Storchaka in :gh:`133031`.)


ctypes
------

* Add :func:`ctypes.util.struct` for generating :class:`~ctypes.Structure` types
from an annotation-based syntax, similar to how the :mod:`dataclasses` module
is used.
(Contributed by Peter Bierma in :gh:`104533`.)
* Add :func:`ctypes.util.wrap_dll_function` for generating function pointers
through a function signature.
(Contributed by Peter Bierma in :gh:`153903`.)


concurrent.futures
------------------

* The iterator returned by :meth:`concurrent.futures.Executor.map` is no longer
automatically closed if a function call raises an exception.
Use method :meth:`!close` to explicitly close the iterator.
(Contributed by xzmeng and Serhiy Storchaka in :gh:`108518`.)


encodings
---------

Expand All @@ -310,12 +312,6 @@ gzip
which is passed on to the constructor of the :class:`~gzip.GzipFile` class.
(Contributed by Marin Misur in :gh:`91372`.)

io
--

* Add :meth:`io.BytesIO.peek` method to read without advancing position.
(Contributed by Marcel Martin in :gh:`90533`.)


imaplib
-------
Expand Down Expand Up @@ -368,12 +364,20 @@ imaplib
(Contributed by Serhiy Storchaka in :gh:`153521`.)


io
--

* Add :meth:`io.BytesIO.peek` method to read without advancing position.
(Contributed by Marcel Martin in :gh:`90533`.)


ipaddress
---------

Add :meth:`~ipaddress.IPv4Network.next_network` and
:meth:`~ipaddress.IPv6Network.next_network` methods to find the next nearest
network with a specific prefix size.
* Add :meth:`~ipaddress.IPv4Network.next_network` and
:meth:`~ipaddress.IPv6Network.next_network` methods to find the next nearest
network with a specific prefix size.
(Contributed by Faisal Mahmood in :gh:`87027`.)


logging
Expand Down Expand Up @@ -413,16 +417,15 @@ math
multiprocessing
---------------

* Add the optional ``buffersize`` parameter to
* Add the optional *buffersize* parameter to
:meth:`multiprocessing.pool.Pool.imap` and
:meth:`multiprocessing.pool.Pool.imap_unordered` to limit the number of
submitted tasks whose results have not yet been yielded. If the buffer is
full, iteration over the *iterables* pauses until a result is yielded from
full, iteration over the *iterable* pauses until a result is yielded from
the buffer. To fully utilize pool's capacity when using this feature, set
*buffersize* at least to the number of processes in pool (to consume
*iterable* as you go), or even higher (to prefetch the next
``N=buffersize-processes`` arguments).

(Contributed by Oleksandr Baltian in :gh:`136871`.)


Expand Down Expand Up @@ -471,6 +474,7 @@ shlex
a string, even if it is already safe for a shell without being quoted.
(Contributed by Jay Berry in :gh:`148846`.)


sqlite3
-------

Expand All @@ -479,6 +483,7 @@ sqlite3
:exc:`SystemError` or :exc:`ValueError`.
(Contributed by Jiseok CHOI in :gh:`150449`.)


symtable
--------

Expand Down Expand Up @@ -673,12 +678,6 @@ re
(Contributed by Serhiy Storchaka in :gh:`152033` and Pieter Eendebak in
:gh:`152056`.)

module_name
-----------

* TODO



Removed
========
Expand Down Expand Up @@ -719,22 +718,27 @@ asyncio
functools
---------

* Calling the Python implementation of :func:`functools.reduce` with *function*
or *sequence* as keyword arguments has been deprecated since Python 3.14.
* Remove support for calling the Python implementation of
:func:`functools.reduce` with *function* or *sequence* as keyword arguments,
deprecated since Python 3.14. These parameters are now positional-only.
(Contributed by Nikita Sobolev in :gh:`149537`.)

logging
-------

* Support for custom logging handlers with the *strm* argument is deprecated
and scheduled for removal in Python 3.16. Define handlers with the *stream*
argument instead.
* Remove support for custom logging handlers with the *strm* argument,
deprecated since Python 3.14.
Define handlers with the *stream* argument instead.
(Contributed by Nikita Sobolev in :gh:`149598`.)

mimetypes
---------

* Valid extensions start with a '.' or are empty for
:meth:`mimetypes.MimeTypes.add_type`.
Undotted extensions now raise a :exc:`ValueError`.
* Remove support for undotted extensions in
:meth:`mimetypes.MimeTypes.add_type`, deprecated since Python 3.14.
Valid extensions must now start with a ``'.'`` or be empty;
undotted extensions raise a :exc:`ValueError`.
(Contributed by Nikita Sobolev in :gh:`149720`.)

shutil
------
Expand Down Expand Up @@ -791,14 +795,14 @@ Deprecated
New deprecations
----------------

* :mod:`abc`
* :mod:`abc`:

* Soft-deprecated since Python 3.3 :class:`abc.abstractclassmethod`,
:class:`abc.abstractstaticmethod`, and :class:`abc.abstractproperty`
* :class:`abc.abstractclassmethod`, :class:`abc.abstractstaticmethod`,
and :class:`abc.abstractproperty`, soft-deprecated since Python 3.3,
now raise a :exc:`DeprecationWarning`.
These classes will be removed in Python 3.21, instead
These classes will be removed in Python 3.21;
use :func:`abc.abstractmethod` with :func:`classmethod`,
:func:`staticmethod`, and :class:`property` respectively.
:func:`staticmethod`, and :class:`property` respectively instead.

* :mod:`ast`:

Expand All @@ -813,12 +817,12 @@ New deprecations

* :mod:`struct`:

* Soft-deprecated since Python 3.15, using ``'F'`` and ``'D'`` type codes are now
deprecated. These codes will be removed in Python 3.21. Use instead
two-letter forms ``'Zf'`` and ``'Zd'``.
* The ``'F'`` and ``'D'`` type codes, soft-deprecated since Python 3.15,
are now deprecated. These codes will be removed in Python 3.21.
Use the two-letter forms ``'Zf'`` and ``'Zd'`` instead.
(Contributed by Sergey B Kirpichev in :gh:`121249`.)

* :mod:`tempfile`
* :mod:`tempfile`:

* The private ``tempfile._TemporaryFileWrapper`` name is deprecated
and is slated for removal in Python 3.21.
Expand Down
Loading