Skip to content

Commit e50e41f

Browse files
authored
gh-151914: Copyedit "What's new in Python 3.16" (#156678)
1 parent 852381e commit e50e41f

1 file changed

Lines changed: 60 additions & 56 deletions

File tree

Doc/whatsnew/3.16.rst

Lines changed: 60 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,16 @@ codecs
120120
even when a built-in codec of the same name exists.
121121
(Contributed by Serhiy Storchaka in :gh:`152997`.)
122122

123+
124+
concurrent.futures
125+
------------------
126+
127+
* The iterator returned by :meth:`concurrent.futures.Executor.map` is no longer
128+
automatically closed if a function call raises an exception.
129+
Use method :meth:`!close` to explicitly close the iterator.
130+
(Contributed by xzmeng and Serhiy Storchaka in :gh:`108518`.)
131+
132+
123133
csv
124134
---
125135

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

153+
154+
ctypes
155+
------
156+
157+
* Add :func:`ctypes.util.struct` for generating :class:`~ctypes.Structure` types
158+
from an annotation-based syntax, similar to how the :mod:`dataclasses` module
159+
is used.
160+
(Contributed by Peter Bierma in :gh:`104533`.)
161+
* Add :func:`ctypes.util.wrap_dll_function` for generating function pointers
162+
through a function signature.
163+
(Contributed by Peter Bierma in :gh:`153903`.)
164+
165+
143166
curses
144167
------
145168

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

276299

277-
ctypes
278-
------
279-
280-
* Add :func:`ctypes.util.struct` for generating :class:`~ctypes.Structure` types
281-
from an annotation-based syntax, similar to how the :mod:`dataclasses` module
282-
is used.
283-
(Contributed by Peter Bierma in :gh:`104533`.)
284-
* Add :func:`ctypes.util.wrap_dll_function` for generating function pointers
285-
through a function signature.
286-
(Contributed by Peter Bierma in :gh:`153903`.)
287-
288-
289-
concurrent.futures
290-
------------------
291-
292-
* The iterator returned by :meth:`concurrent.futures.Executor.map` is no longer
293-
automatically closed if a function call raises an exception.
294-
Use method :meth:`!close` to explicitly close the iterator.
295-
(Contributed by xzmeng and Serhiy Storchaka in :gh:`108518`.)
296-
297-
298300
encodings
299301
---------
300302

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

313-
io
314-
--
315-
316-
* Add :meth:`io.BytesIO.peek` method to read without advancing position.
317-
(Contributed by Marcel Martin in :gh:`90533`.)
318-
319315

320316
imaplib
321317
-------
@@ -368,12 +364,20 @@ imaplib
368364
(Contributed by Serhiy Storchaka in :gh:`153521`.)
369365

370366

367+
io
368+
--
369+
370+
* Add :meth:`io.BytesIO.peek` method to read without advancing position.
371+
(Contributed by Marcel Martin in :gh:`90533`.)
372+
373+
371374
ipaddress
372375
---------
373376

374-
Add :meth:`~ipaddress.IPv4Network.next_network` and
375-
:meth:`~ipaddress.IPv6Network.next_network` methods to find the next nearest
376-
network with a specific prefix size.
377+
* Add :meth:`~ipaddress.IPv4Network.next_network` and
378+
:meth:`~ipaddress.IPv6Network.next_network` methods to find the next nearest
379+
network with a specific prefix size.
380+
(Contributed by Faisal Mahmood in :gh:`87027`.)
377381

378382

379383
logging
@@ -413,16 +417,15 @@ math
413417
multiprocessing
414418
---------------
415419

416-
* Add the optional ``buffersize`` parameter to
420+
* Add the optional *buffersize* parameter to
417421
:meth:`multiprocessing.pool.Pool.imap` and
418422
:meth:`multiprocessing.pool.Pool.imap_unordered` to limit the number of
419423
submitted tasks whose results have not yet been yielded. If the buffer is
420-
full, iteration over the *iterables* pauses until a result is yielded from
424+
full, iteration over the *iterable* pauses until a result is yielded from
421425
the buffer. To fully utilize pool's capacity when using this feature, set
422426
*buffersize* at least to the number of processes in pool (to consume
423427
*iterable* as you go), or even higher (to prefetch the next
424428
``N=buffersize-processes`` arguments).
425-
426429
(Contributed by Oleksandr Baltian in :gh:`136871`.)
427430

428431

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

477+
474478
sqlite3
475479
-------
476480

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

486+
482487
symtable
483488
--------
484489

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

676-
module_name
677-
-----------
678-
679-
* TODO
680-
681-
682681

683682
Removed
684683
========
@@ -719,22 +718,27 @@ asyncio
719718
functools
720719
---------
721720

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

725726
logging
726727
-------
727728

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

732734
mimetypes
733735
---------
734736

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

739743
shutil
740744
------
@@ -791,14 +795,14 @@ Deprecated
791795
New deprecations
792796
----------------
793797

794-
* :mod:`abc`
798+
* :mod:`abc`:
795799

796-
* Soft-deprecated since Python 3.3 :class:`abc.abstractclassmethod`,
797-
:class:`abc.abstractstaticmethod`, and :class:`abc.abstractproperty`
800+
* :class:`abc.abstractclassmethod`, :class:`abc.abstractstaticmethod`,
801+
and :class:`abc.abstractproperty`, soft-deprecated since Python 3.3,
798802
now raise a :exc:`DeprecationWarning`.
799-
These classes will be removed in Python 3.21, instead
803+
These classes will be removed in Python 3.21;
800804
use :func:`abc.abstractmethod` with :func:`classmethod`,
801-
:func:`staticmethod`, and :class:`property` respectively.
805+
:func:`staticmethod`, and :class:`property` respectively instead.
802806

803807
* :mod:`ast`:
804808

@@ -813,12 +817,12 @@ New deprecations
813817

814818
* :mod:`struct`:
815819

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

821-
* :mod:`tempfile`
825+
* :mod:`tempfile`:
822826

823827
* The private ``tempfile._TemporaryFileWrapper`` name is deprecated
824828
and is slated for removal in Python 3.21.

0 commit comments

Comments
 (0)