Bug report
Bug description:
consider:
import asyncio async def main(): names = [] async with asyncio.TaskGroup() as tg: async def append_name(): names.append(asyncio.current_task().get_name()) tg.create_task(append_name(), name="example name") print(names) def loop_factory(): loop = asyncio.EventLoop() loop.set_task_factory(asyncio.eager_task_factory) return loop asyncio.run(main()) asyncio.run(main(), loop_factory=loop_factory)
this outputs:
['example name']
['Task-5']
but it should output:
['example name']
['example name']
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Linked PRs
- gh-128308: pass **kwargs to asyncio task_factory #128768
- [3.13] gh-128308: pass
**kwargsto asyncio task_factory (GH-128768) #130084 - [3.13] gh-128308: Revert "pass
**kwargsto asyncio task_factory (GH-128768) (#130084)" #133808 - [3.13] gh-133745: Fix asyncio task factory name/context kwarg breaks #133948