@@ -185,7 +185,7 @@ Other Language Changes
185
185
``python -O -c 'assert (__debug__ := 1)' `` now produces a
186
186
:exc: `SyntaxError `. (Contributed by Irit Katriel in :gh: `122245 `.)
187
187
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 `
189
189
to convert a number to :class: `float ` or :class: `complex ` type correspondingly.
190
190
They raise an error if the argument is a string.
191
191
(Contributed by Serhiy Storchaka in :gh: `84978 `.)
@@ -206,7 +206,7 @@ Improved Modules
206
206
ast
207
207
---
208
208
209
- * Added :func: `ast.compare ` for comparing two ASTs.
209
+ * Add :func: `ast.compare ` for comparing two ASTs.
210
210
(Contributed by Batuhan Taskaya and Jeremy Hylton in :issue: `15987 `.)
211
211
212
212
* Add support for :func: `copy.replace ` for AST nodes.
215
215
* Docstrings are now removed from an optimized AST in optimization level 2.
216
216
(Contributed by Irit Katriel in :gh: `123958 `.)
217
217
218
+ * The ``repr() `` output for AST nodes now includes more information.
219
+ (Contributed by Tomas R in :gh: `116022 `.)
220
+
218
221
219
222
ctypes
220
223
------
@@ -233,32 +236,31 @@ ctypes
233
236
dis
234
237
---
235
238
236
- * Added support for rendering full source location information of
239
+ * Add support for rendering full source location information of
237
240
: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 *
239
242
keyword argument:
240
243
241
244
- :class: `dis.Bytecode `,
242
245
- :func: `dis.dis `, :func: `dis.distb `, and
243
246
- :func: `dis.disassemble `.
244
247
245
248
This feature is also exposed via :option: `dis --show-positions `.
246
-
247
249
(Contributed by Bénédikt Tran in :gh: `123165 `.)
248
250
249
251
250
252
fractions
251
253
---------
252
254
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 `.)
256
258
257
259
258
260
functools
259
261
---------
260
262
261
- * Added support to :func: `functools.partial ` and
263
+ * Add support to :func: `functools.partial ` and
262
264
:func: `functools.partialmethod ` for :data: `functools.Placeholder ` sentinels
263
265
to reserve a place for positional arguments.
264
266
(Contributed by Dominykas Grigonis in :gh: `119127 `.)
@@ -267,27 +269,27 @@ functools
267
269
http
268
270
----
269
271
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 `.)
273
275
274
276
275
277
json
276
278
----
277
279
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 `.)
281
283
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 `.)
285
287
286
288
287
289
operator
288
290
--------
289
291
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 `
291
293
have been added, such that ``operator.is_none(obj) `` is equivalent
292
294
to ``obj is None `` and ``operator.is_not_none(obj) `` is equivalent
293
295
to ``obj is not None ``.
@@ -297,13 +299,13 @@ operator
297
299
datetime
298
300
--------
299
301
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 `.)
302
304
303
305
os
304
306
--
305
307
306
- * Added the :data: `os.environ.refresh() <os.environ> ` method to update
308
+ * Add the :data: `os.environ.refresh() <os.environ> ` method to update
307
309
:data: `os.environ ` with changes to the environment made by :func: `os.putenv `,
308
310
by :func: `os.unsetenv `, or made outside Python in the same process.
309
311
(Contributed by Victor Stinner in :gh: `120057 `.)
@@ -333,15 +335,15 @@ pdb
333
335
:pdbcmd: `commands ` are preserved across hard-coded breakpoints.
334
336
(Contributed by Tian Gao in :gh: `121450 `.)
335
337
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 ``
337
339
command when :mod: `pdb ` is in ``inline `` mode.
338
340
(Contributed by Tian Gao in :gh: `123757 `.)
339
341
340
342
pickle
341
343
------
342
344
343
345
* 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 >`.
345
347
346
348
* Add notes for pickle serialization errors that allow to identify the source
347
349
of the error.
@@ -379,6 +381,12 @@ asyncio
379
381
Deprecated
380
382
==========
381
383
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
+
382
390
* :mod: `builtins `:
383
391
Passing a complex number as the *real * or *imag * argument in the
384
392
:func: `complex ` constructor is now deprecated; it should only be passed
437
445
user-defined ``visit_Num ``, ``visit_Str ``, ``visit_Bytes ``,
438
446
``visit_NameConstant `` and ``visit_Ellipsis `` methods on custom
439
447
: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 ``
441
449
method instead.
442
450
443
451
Also, remove the following deprecated properties on :class: `ast.Constant `,
@@ -588,18 +596,18 @@ New Features
588
596
* Add a new :c:type: `PyUnicodeWriter ` API to create a Python :class: `str `
589
597
object:
590
598
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 `
603
611
604
612
(Contributed by Victor Stinner in :gh: `119182 `.)
605
613
@@ -611,11 +619,11 @@ New Features
611
619
is backwards incompatible to any C-Extension that holds onto an interned
612
620
string after a call to :c:func: `Py_Finalize ` and is then reused after a
613
621
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
615
623
:c:func: `Py_Initialize ` from accessing uninitialized memory. To fix, use
616
624
an address sanitizer to identify any use-after-free coming from
617
625
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 `.)
619
627
620
628
* Add new functions to convert C ``<stdint.h> `` numbers from/to Python
621
629
:class: `int `:
@@ -691,12 +699,7 @@ Deprecated
691
699
:c:macro: `!isfinite ` available from :file: `math.h `
692
700
since C99. (Contributed by Sergey B Kirpichev in :gh: `119613 `.)
693
701
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.
700
703
701
704
.. include :: ../deprecations/c-api-pending-removal-in-3.15.rst
702
705
0 commit comments