Title: TaskGroup's task's exception's participate in a reference cycle, via TaskGroup.create_task -> task -> exception and loop.create_task -> task -> exception · Issue #128552 · python/cpython · GitHub
Open Graph Title: TaskGroup's task's exception's participate in a reference cycle, via TaskGroup.create_task -> task -> exception and loop.create_task -> task -> exception · Issue #128552 · python/cpython
X Title: TaskGroup's task's exception's participate in a reference cycle, via TaskGroup.create_task -> task -> exception and loop.create_task -> task -> exception · Issue #128552 · python/cpython
Description: Bug report Bug description: the following test fails when run with eager tasks async def test_exception_refcycles_parent_task(self): """Test that TaskGroup deletes self._parent_task""" tg = asyncio.TaskGroup() exc = None class _Done(Exce...
Open Graph Description: Bug report Bug description: the following test fails when run with eager tasks async def test_exception_refcycles_parent_task(self): """Test that TaskGroup deletes self._parent_task""" tg = asyncio...
X Description: Bug report Bug description: the following test fails when run with eager tasks async def test_exception_refcycles_parent_task(self): """Test that TaskGroup deletes self._parent_task&...
Opengraph URL: https://github.com/python/cpython/issues/128552
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TaskGroup's task's exception's participate in a reference cycle, via TaskGroup.create_task -\u003e task -\u003e exception and loop.create_task -\u003e task -\u003e exception","articleBody":"# Bug report\n\n### Bug description:\n\nthe following test fails when run with eager tasks\n\n```python\n async def test_exception_refcycles_parent_task(self):\n \"\"\"Test that TaskGroup deletes self._parent_task\"\"\"\n tg = asyncio.TaskGroup()\n exc = None\n\n class _Done(Exception):\n pass\n\n async def coro_fn():\n async with tg:\n raise _Done\n\n try:\n async with asyncio.TaskGroup() as tg2:\n tg2.create_task(coro_fn())\n except* _Done as excs:\n exc = excs.exceptions[0].exceptions[0]\n\n self.assertIsInstance(exc, _Done)\n self.assertListEqual(gc.get_referrers(exc), no_other_refs())\n```\n\n### CPython versions tested on:\n\n3.14\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-128553\n* gh-128585\n* gh-128586\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/graingert","@type":"Person","name":"graingert"},"datePublished":"2025-01-06T18:13:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/128552/cpython/issues/128552"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:65b9b142-f6a6-a8d6-b867-3eef10d7dd8d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D82C:12A9AF:C6313E:FF4891:696B2930 |
| html-safe-nonce | 572ec13e5c85dca8bd72d3d419d558c739f0e7926494e54b81ae5496f9152874 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODJDOjEyQTlBRjpDNjMxM0U6RkY0ODkxOjY5NkIyOTMwIiwidmlzaXRvcl9pZCI6IjUyNDg2MjU4MDQ3MjIyNTIwODAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2ad54f2f0b60f5a3513e46a60a331cfc43b79d92b267deeba6aeec5528ed6bad |
| hovercard-subject-tag | issue:2771186544 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/128552/issue_layout |
| twitter:image | https://opengraph.githubassets.com/91c605c43928d384c540cfa1022a9a0fc2ed0405390055c91b9576d3621b9871/python/cpython/issues/128552 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/91c605c43928d384c540cfa1022a9a0fc2ed0405390055c91b9576d3621b9871/python/cpython/issues/128552 |
| og:image:alt | Bug report Bug description: the following test fails when run with eager tasks async def test_exception_refcycles_parent_task(self): """Test that TaskGroup deletes self._parent_task""" tg = asyncio... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | graingert |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width