Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,20 @@ asyncio
never awaited).
(Contributed by Arthur Tacca and Jason Zhang in :gh:`115957`.)

* The function and methods named ``create_task`` have received a new
``**kwargs`` argument that is passed through to the task constructor.
This changed was accidentally added in 3.13.3,
and broke the API contract for custom task factories.
Several third-party task factories implemented workarounds for this.
In 3.13.4 and later releases the old factory contract is honored
once again (until 3.14), but the extra ``**kwargs`` argument still
allows passing additional keyword arguments to :class:`~asyncio.Task`
and to custom task factories, to keep the workarounds working.
This affects the following function and methods:
:meth:`asyncio.create_task`,
:meth:`asyncio.loop.create_task`,
:meth:`asyncio.TaskGroup.create_task`.
(Contributed by Thomas Grainger in :gh:`128307`.)

base64
------
Expand Down
17 changes: 17 additions & 0 deletions Doc/whatsnew/3.14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,23 @@ ast
(Contributed by Semyon Moroz in :gh:`133367`.)


asyncio
-------

* The function and methods named ``create_task`` now take an arbitrary
list of keyword arguments. All keyword arguments are passed to the
:class:`~asyncio.Task` constructor or the custom task factory.
(See :meth:`~asyncio.loop.set_task_factory` for details.)
Keywords ``name`` and ``context`` are no longer special; the name
should now be set using the ``name`` keyword argument of the factory,
and ``context`` may be ``None``.
This affects the following function and methods:
:meth:`asyncio.create_task`,
:meth:`asyncio.loop.create_task`,
:meth:`asyncio.TaskGroup.create_task`.
(Contributed by Thomas Grainger in :gh:`128307`.)


bdb
---

Expand Down
Loading