Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

asyncio eager tasks' names are set too late #128308

Closed
Labels
stdlibPython modules in the Lib dirtopic-asynciotype-bugAn unexpected behavior, bug, or error
@graingert

Description

@graingert

Bug report

Bug description:

consider:

importasyncioasyncdefmain():names= []asyncwithasyncio.TaskGroup()astg:asyncdefappend_name():names.append(asyncio.current_task().get_name())tg.create_task(append_name(),name="example name")print(names)defloop_factory():loop=asyncio.EventLoop()loop.set_task_factory(asyncio.eager_task_factory)returnloopasyncio.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

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtopic-asynciotype-bugAn unexpected behavior, bug, or error

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp