This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Missing name in TaskGroup.__repr__()
Type: Stage: resolved
Components: asyncio Versions: Python 3.11
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: achimnol, asvetlov, gvanrossum, yselivanov
Priority: normal Keywords:

Created on 2022-02-27 18:30 by achimnol, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg414162 - (view) Author: Joongi Kim (achimnol) * Date: 2022-02-27 18:30
The __repr__() method in asyncio.TaskGroup does not include self._name.
I think this is a simple overlook, because asyncio.Task includes the task name in __repr__(). :wink:

https://github.com/python/cpython/blob/345572a1a02/Lib/asyncio/taskgroups.py#L28-L42

I'll make a simple PR to fix it.
msg414163 - (view) Author: Joongi Kim (achimnol) * Date: 2022-02-27 18:41
Ah, I'm confused with aiotools.TaskGroup (originated from EdgeDB's TaskGroup) code while browsing both aiotools and stdlib asyncio.TaskGroup source codes.

The naming facility seems to be intentionally removed when ported to the stdlib.
So I am closing this and sorry fo the noise.

Though, is there any particular reason to remove it?
My guess is that you think that TaskGroup is more like a control-flow structure which does not need to be named, just like we don't name "for loop" for instance.
History
Date User Action Args
2022-04-11 14:59:56adminsetgithub: 91031
2022-02-27 18:41:28achimnolsetstatus: open -> closed

messages: + msg414163
stage: resolved
2022-02-27 18:30:02achimnolcreate