Skip to content

Commit 1ba35ea

Browse files
gh-123299: Copy-edit the 3.14 What's New (#124670)
Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent 702c4a2 commit 1ba35ea

File tree

2 files changed

+56
-45
lines changed

2 files changed

+56
-45
lines changed

Doc/deprecations/pending-removal-in-3.16.rst

+8
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ Pending Removal in Python 3.16
1818
Use the ``'w'`` format code (:c:type:`Py_UCS4`)
1919
for Unicode characters instead.
2020

21+
* :mod:`asyncio`:
22+
23+
* :mod:`asyncio`:
24+
:func:`!asyncio.iscoroutinefunction` is deprecated
25+
and will be removed in Python 3.16,
26+
use :func:`inspect.iscoroutinefunction` instead.
27+
(Contributed by Jiahao Li and Kumar Aditya in :gh:`122875`.)
28+
2129
* :mod:`shutil`:
2230

2331
* The :class:`!ExecError` exception

Doc/whatsnew/3.14.rst

+48-45
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ Other Language Changes
185185
``python -O -c 'assert (__debug__ := 1)'`` now produces a
186186
:exc:`SyntaxError`. (Contributed by Irit Katriel in :gh:`122245`.)
187187

188-
* Added class methods :meth:`float.from_number` and :meth:`complex.from_number`
188+
* Add class methods :meth:`float.from_number` and :meth:`complex.from_number`
189189
to convert a number to :class:`float` or :class:`complex` type correspondingly.
190190
They raise an error if the argument is a string.
191191
(Contributed by Serhiy Storchaka in :gh:`84978`.)
@@ -206,7 +206,7 @@ Improved Modules
206206
ast
207207
---
208208

209-
* Added :func:`ast.compare` for comparing two ASTs.
209+
* Add :func:`ast.compare` for comparing two ASTs.
210210
(Contributed by Batuhan Taskaya and Jeremy Hylton in :issue:`15987`.)
211211

212212
* Add support for :func:`copy.replace` for AST nodes.
@@ -215,6 +215,9 @@ ast
215215
* Docstrings are now removed from an optimized AST in optimization level 2.
216216
(Contributed by Irit Katriel in :gh:`123958`.)
217217

218+
* The ``repr()`` output for AST nodes now includes more information.
219+
(Contributed by Tomas R in :gh:`116022`.)
220+
218221

219222
ctypes
220223
------
@@ -233,32 +236,31 @@ ctypes
233236
dis
234237
---
235238

236-
* Added support for rendering full source location information of
239+
* Add support for rendering full source location information of
237240
:class:`instructions <dis.Instruction>`, rather than only the line number.
238-
This feature is added to the following interfaces via the ``show_positions``
241+
This feature is added to the following interfaces via the *show_positions*
239242
keyword argument:
240243

241244
- :class:`dis.Bytecode`,
242245
- :func:`dis.dis`, :func:`dis.distb`, and
243246
- :func:`dis.disassemble`.
244247

245248
This feature is also exposed via :option:`dis --show-positions`.
246-
247249
(Contributed by Bénédikt Tran in :gh:`123165`.)
248250

249251

250252
fractions
251253
---------
252254

253-
Added support for converting any objects that have the
254-
:meth:`!as_integer_ratio` method to a :class:`~fractions.Fraction`.
255-
(Contributed by Serhiy Storchaka in :gh:`82017`.)
255+
* Add support for converting any objects that have the
256+
:meth:`!as_integer_ratio` method to a :class:`~fractions.Fraction`.
257+
(Contributed by Serhiy Storchaka in :gh:`82017`.)
256258

257259

258260
functools
259261
---------
260262

261-
* Added support to :func:`functools.partial` and
263+
* Add support to :func:`functools.partial` and
262264
:func:`functools.partialmethod` for :data:`functools.Placeholder` sentinels
263265
to reserve a place for positional arguments.
264266
(Contributed by Dominykas Grigonis in :gh:`119127`.)
@@ -267,27 +269,27 @@ functools
267269
http
268270
----
269271

270-
Directory lists and error pages generated by the :mod:`http.server`
271-
module allow the browser to apply its default dark mode.
272-
(Contributed by Yorik Hansen in :gh:`123430`.)
272+
* Directory lists and error pages generated by the :mod:`http.server`
273+
module allow the browser to apply its default dark mode.
274+
(Contributed by Yorik Hansen in :gh:`123430`.)
273275

274276

275277
json
276278
----
277279

278-
Add notes for JSON serialization errors that allow to identify the source
279-
of the error.
280-
(Contributed by Serhiy Storchaka in :gh:`122163`.)
280+
* Add notes for JSON serialization errors that allow to identify the source
281+
of the error.
282+
(Contributed by Serhiy Storchaka in :gh:`122163`.)
281283

282-
Enable :mod:`json` module to work as a script using the :option:`-m` switch: ``python -m json``.
283-
See the :ref:`JSON command-line interface <json-commandline>` documentation.
284-
(Contributed by Trey Hunner in :gh:`122873`.)
284+
* Enable the :mod:`json` module to work as a script using the :option:`-m` switch: ``python -m json``.
285+
See the :ref:`JSON command-line interface <json-commandline>` documentation.
286+
(Contributed by Trey Hunner in :gh:`122873`.)
285287

286288

287289
operator
288290
--------
289291

290-
* Two new functions ``operator.is_none`` and ``operator.is_not_none``
292+
* Two new functions :func:`operator.is_none` and :func:`operator.is_not_none`
291293
have been added, such that ``operator.is_none(obj)`` is equivalent
292294
to ``obj is None`` and ``operator.is_not_none(obj)`` is equivalent
293295
to ``obj is not None``.
@@ -297,13 +299,13 @@ operator
297299
datetime
298300
--------
299301

300-
Add :meth:`datetime.time.strptime` and :meth:`datetime.date.strptime`.
301-
(Contributed by Wannes Boeykens in :gh:`41431`.)
302+
* Add :meth:`datetime.time.strptime` and :meth:`datetime.date.strptime`.
303+
(Contributed by Wannes Boeykens in :gh:`41431`.)
302304

303305
os
304306
--
305307

306-
* Added the :data:`os.environ.refresh() <os.environ>` method to update
308+
* Add the :data:`os.environ.refresh() <os.environ>` method to update
307309
:data:`os.environ` with changes to the environment made by :func:`os.putenv`,
308310
by :func:`os.unsetenv`, or made outside Python in the same process.
309311
(Contributed by Victor Stinner in :gh:`120057`.)
@@ -333,15 +335,15 @@ pdb
333335
:pdbcmd:`commands` are preserved across hard-coded breakpoints.
334336
(Contributed by Tian Gao in :gh:`121450`.)
335337

336-
* Added a new argument ``mode`` to :class:`pdb.Pdb`. Disabled ``restart``
338+
* Add a new argument *mode* to :class:`pdb.Pdb`. Disable the ``restart``
337339
command when :mod:`pdb` is in ``inline`` mode.
338340
(Contributed by Tian Gao in :gh:`123757`.)
339341

340342
pickle
341343
------
342344

343345
* Set the default protocol version on the :mod:`pickle` module to 5.
344-
For more details, please see :ref:`pickle protocols <pickle-protocols>`.
346+
For more details, see :ref:`pickle protocols <pickle-protocols>`.
345347

346348
* Add notes for pickle serialization errors that allow to identify the source
347349
of the error.
@@ -379,6 +381,12 @@ asyncio
379381
Deprecated
380382
==========
381383

384+
* :mod:`asyncio`:
385+
:func:`!asyncio.iscoroutinefunction` is deprecated
386+
and will be removed in Python 3.16,
387+
use :func:`inspect.iscoroutinefunction` instead.
388+
(Contributed by Jiahao Li and Kumar Aditya in :gh:`122875`.)
389+
382390
* :mod:`builtins`:
383391
Passing a complex number as the *real* or *imag* argument in the
384392
:func:`complex` constructor is now deprecated; it should only be passed
@@ -437,7 +445,7 @@ ast
437445
user-defined ``visit_Num``, ``visit_Str``, ``visit_Bytes``,
438446
``visit_NameConstant`` and ``visit_Ellipsis`` methods on custom
439447
:class:`ast.NodeVisitor` subclasses will no longer be called when the
440-
``NodeVisitor`` subclass is visiting an AST. Define a ``visit_Constant``
448+
:class:`!NodeVisitor` subclass is visiting an AST. Define a ``visit_Constant``
441449
method instead.
442450

443451
Also, remove the following deprecated properties on :class:`ast.Constant`,
@@ -588,18 +596,18 @@ New Features
588596
* Add a new :c:type:`PyUnicodeWriter` API to create a Python :class:`str`
589597
object:
590598

591-
* :c:func:`PyUnicodeWriter_Create`.
592-
* :c:func:`PyUnicodeWriter_Discard`.
593-
* :c:func:`PyUnicodeWriter_Finish`.
594-
* :c:func:`PyUnicodeWriter_WriteChar`.
595-
* :c:func:`PyUnicodeWriter_WriteUTF8`.
596-
* :c:func:`PyUnicodeWriter_WriteUCS4`.
597-
* :c:func:`PyUnicodeWriter_WriteWideChar`.
598-
* :c:func:`PyUnicodeWriter_WriteStr`.
599-
* :c:func:`PyUnicodeWriter_WriteRepr`.
600-
* :c:func:`PyUnicodeWriter_WriteSubstring`.
601-
* :c:func:`PyUnicodeWriter_Format`.
602-
* :c:func:`PyUnicodeWriter_DecodeUTF8Stateful`.
599+
* :c:func:`PyUnicodeWriter_Create`
600+
* :c:func:`PyUnicodeWriter_Discard`
601+
* :c:func:`PyUnicodeWriter_Finish`
602+
* :c:func:`PyUnicodeWriter_WriteChar`
603+
* :c:func:`PyUnicodeWriter_WriteUTF8`
604+
* :c:func:`PyUnicodeWriter_WriteUCS4`
605+
* :c:func:`PyUnicodeWriter_WriteWideChar`
606+
* :c:func:`PyUnicodeWriter_WriteStr`
607+
* :c:func:`PyUnicodeWriter_WriteRepr`
608+
* :c:func:`PyUnicodeWriter_WriteSubstring`
609+
* :c:func:`PyUnicodeWriter_Format`
610+
* :c:func:`PyUnicodeWriter_DecodeUTF8Stateful`
603611

604612
(Contributed by Victor Stinner in :gh:`119182`.)
605613

@@ -611,11 +619,11 @@ New Features
611619
is backwards incompatible to any C-Extension that holds onto an interned
612620
string after a call to :c:func:`Py_Finalize` and is then reused after a
613621
call to :c:func:`Py_Initialize`. Any issues arising from this behavior will
614-
normally result in crashes during the exectuion of the subsequent call to
622+
normally result in crashes during the execution of the subsequent call to
615623
:c:func:`Py_Initialize` from accessing uninitialized memory. To fix, use
616624
an address sanitizer to identify any use-after-free coming from
617625
an interned string and deallocate it during module shutdown.
618-
(Contribued by Eddie Elizondo in :gh:`113601`.)
626+
(Contributed by Eddie Elizondo in :gh:`113601`.)
619627

620628
* Add new functions to convert C ``<stdint.h>`` numbers from/to Python
621629
:class:`int`:
@@ -691,12 +699,7 @@ Deprecated
691699
:c:macro:`!isfinite` available from :file:`math.h`
692700
since C99. (Contributed by Sergey B Kirpichev in :gh:`119613`.)
693701

694-
* :func:`!asyncio.iscoroutinefunction` is deprecated
695-
and will be removed in Python 3.16,
696-
use :func:`inspect.iscoroutinefunction` instead.
697-
(Contributed by Jiahao Li and Kumar Aditya in :gh:`122875`.)
698-
699-
.. Add deprecations above alphabetically, not here at the end.
702+
.. Add C API deprecations above alphabetically, not here at the end.
700703
701704
.. include:: ../deprecations/c-api-pending-removal-in-3.15.rst
702705

0 commit comments

Comments
 (0)