]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-112622: Pass name to loop create_task method (#112623)
authorJamie <101677823+ordinary-jamie@users.noreply.github.com>
Wed, 13 Dec 2023 01:26:40 +0000 (12:26 +1100)
committerGitHub <noreply@github.com>
Wed, 13 Dec 2023 01:26:40 +0000 (17:26 -0800)
commita3a1cb48456c809f7b1ab6a6ffe83e8b3f69be0f
tree3db53a3a61bae19902af9f2b962545ee96a88952
parentc6e614fd81d7dca436fe640d63a307c7dc9f6f3b
gh-112622: Pass name to loop create_task method (#112623)

This affects task creation through either `asyncio.create_task()` or `TaskGroup.create_task()` -- the redundant call to `task.set_name()` is skipped. We still call `set_name()` when a task factory is involved, because the task factory call signature (unfortunately) doesn't take a `name` argument.
Lib/asyncio/taskgroups.py
Lib/asyncio/tasks.py
Misc/NEWS.d/next/Library/2023-12-03-01-01-52.gh-issue-112622.1Z8cpx.rst [new file with mode: 0644]