gh-151914: Copyedit "What's new in Python 3.16" (#156678)
diff --git a/Doc/whatsnew/3.16.rst b/Doc/whatsnew/3.16.rst
index f3ddae7..4c432fb 100644
--- a/Doc/whatsnew/3.16.rst
+++ b/Doc/whatsnew/3.16.rst
@@ -120,6 +120,16 @@
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
---
@@ -140,6 +150,19 @@
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
------
@@ -274,27 +297,6 @@
(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
---------
@@ -310,12 +312,6 @@
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
-------
@@ -368,12 +364,20 @@
(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
@@ -413,16 +417,15 @@
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`.)
@@ -471,6 +474,7 @@
a string, even if it is already safe for a shell without being quoted.
(Contributed by Jay Berry in :gh:`148846`.)
+
sqlite3
-------
@@ -479,6 +483,7 @@
:exc:`SystemError` or :exc:`ValueError`.
(Contributed by Jiseok CHOI in :gh:`150449`.)
+
symtable
--------
@@ -673,12 +678,6 @@
(Contributed by Serhiy Storchaka in :gh:`152033` and Pieter Eendebak in
:gh:`152056`.)
-module_name
------------
-
-* TODO
-
-
Removed
========
@@ -719,22 +718,27 @@
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
------
@@ -791,14 +795,14 @@
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`:
@@ -813,12 +817,12 @@
* :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.