File tree 2 files changed +34
-0
lines changed
2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -730,6 +730,22 @@ asyncio
730
730
never awaited).
731
731
(Contributed by Arthur Tacca and Jason Zhang in :gh: `115957 `.)
732
732
733
+ * The function and methods named ``create_task `` have received a new
734
+ ``**kwargs `` argument that is passed through to the task constructor.
735
+ This change was accidentally added in 3.13.3,
736
+ and broke the API contract for custom task factories.
737
+ Several third-party task factories implemented workarounds for this.
738
+ In 3.13.4 and later releases the old factory contract is honored
739
+ once again (until 3.14).
740
+ To keep the workarounds working, the extra ``**kwargs `` argument still
741
+ allows passing additional keyword arguments to :class: `~asyncio.Task `
742
+ and to custom task factories.
743
+
744
+ This affects the following function and methods:
745
+ :meth: `asyncio.create_task `,
746
+ :meth: `asyncio.loop.create_task `,
747
+ :meth: `asyncio.TaskGroup.create_task `.
748
+ (Contributed by Thomas Grainger in :gh: `128307 `.)
733
749
734
750
base64
735
751
------
Original file line number Diff line number Diff line change @@ -1064,6 +1064,24 @@ ast
1064
1064
(Contributed by Semyon Moroz in :gh: `133367 `.)
1065
1065
1066
1066
1067
+ asyncio
1068
+ -------
1069
+
1070
+ * The function and methods named :func: `!create_task ` now take an arbitrary
1071
+ list of keyword arguments. All keyword arguments are passed to the
1072
+ :class: `~asyncio.Task ` constructor or the custom task factory.
1073
+ (See :meth: `~asyncio.loop.set_task_factory ` for details.)
1074
+ The ``name `` and ``context `` keyword arguments are no longer special;
1075
+ the name should now be set using the ``name `` keyword argument of the factory,
1076
+ and ``context `` may be ``None ``.
1077
+
1078
+ This affects the following function and methods:
1079
+ :meth: `asyncio.create_task `,
1080
+ :meth: `asyncio.loop.create_task `,
1081
+ :meth: `asyncio.TaskGroup.create_task `.
1082
+ (Contributed by Thomas Grainger in :gh: `128307 `.)
1083
+
1084
+
1067
1085
bdb
1068
1086
---
1069
1087
You can’t perform that action at this time.
0 commit comments