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.TaskGroup corrupts uncancel() stack when the parent task replaces the cancelled error #95289

Closed
Assignees
kumaraditya303
Labels
@graingert

Description

@graingert

Bug report

importasyncioclassMyException(Exception):passasyncdefasync_fn():awaitasyncio.sleep(0)raiseMyExceptionasyncdefmain():task=asyncio.current_task()try:asyncwithasyncio.TaskGroup()astg:tg.create_task(async_fn())try:awaitasyncio.sleep(1)exceptasyncio.CancelledError:pass    except*MyException:print("done!")print(f"{task.cancelling()=} should be 0")asyncio.run(main())

Metadata

Metadata

Labels

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp