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

TaskGroup's task's exception's participate in a reference cycle, via TaskGroup.create_task -> task -> exception and loop.create_task -> task -> exception #128552

Closed
Labels
stdlibStandard Library Python modules in the Lib/ directorytopic-asynciotype-bugAn unexpected behavior, bug, or error
@graingert

Description

@graingert

Bug report

Bug description:

the following test fails when run with eager tasks

asyncdeftest_exception_refcycles_parent_task(self):"""Test that TaskGroup deletes self._parent_task"""tg=asyncio.TaskGroup()exc=Noneclass_Done(Exception):passasyncdefcoro_fn():asyncwithtg:raise_Donetry:asyncwithasyncio.TaskGroup()astg2:tg2.create_task(coro_fn())        except*_Doneasexcs:exc=excs.exceptions[0].exceptions[0]self.assertIsInstance(exc,_Done)self.assertListEqual(gc.get_referrers(exc),no_other_refs())

CPython versions tested on:

3.14

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-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