summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/taskgroups.py
diff options
context:
space:
mode:
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>2023-06-13 06:06:40 (GMT)
committerGitHub <noreply@github.com>2023-06-13 06:06:40 (GMT)
commit840d02f3f0cd341207db6d918ce7f0987be9952e (patch)
treebd456e3ea504d4a1e3ad0e270147d96d5f045b65 /Lib/asyncio/taskgroups.py
parent829ac13b69a2b53153e1b40670e6ef82f05130c1 (diff)
downloadcpython-840d02f3f0cd341207db6d918ce7f0987be9952e.zip
cpython-840d02f3f0cd341207db6d918ce7f0987be9952e.tar.gz
cpython-840d02f3f0cd341207db6d918ce7f0987be9952e.tar.bz2
GH-105684: Require `asyncio.Task` implementations to support `set_name` method (#105685)
Diffstat (limited to 'Lib/asyncio/taskgroups.py')
-rw-r--r--Lib/asyncio/taskgroups.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/asyncio/taskgroups.py b/Lib/asyncio/taskgroups.py
index 06b2e0d..bf92bba 100644
--- a/Lib/asyncio/taskgroups.py
+++ b/Lib/asyncio/taskgroups.py
@@ -163,7 +163,7 @@ class TaskGroup:
task = self._loop.create_task(coro)
else:
task = self._loop.create_task(coro, context=context)
- tasks._set_task_name(task, name)
+ task.set_name(name)
# optimization: Immediately call the done callback if the task is
# already done (e.g. if the coro was able to complete eagerly),
# and skip scheduling a done callback