Title: asyncio call graph is truncated at async generators · Issue #160837 · python/cpython · GitHub
Open Graph Title: asyncio call graph is truncated at async generators · Issue #160837 · python/cpython
X Title: asyncio call graph is truncated at async generators · Issue #160837 · python/cpython
Description: Bug report This was originally filed by Timofey Ivankov (@deadlovelll), whose gh account is frozen currently, so I'm refiling it and will repost the PR. import asyncio fut = None async def deep(): await fut async def gen(): await deep() ...
Open Graph Description: Bug report This was originally filed by Timofey Ivankov (@deadlovelll), whose gh account is frozen currently, so I'm refiling it and will repost the PR. import asyncio fut = None async def deep(): ...
X Description: Bug report This was originally filed by Timofey Ivankov (@deadlovelll), whose gh account is frozen currently, so I'm refiling it and will repost the PR. import asyncio fut = None async def deep...
Opengraph URL: https://github.com/python/cpython/issues/160837
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"asyncio call graph is truncated at async generators","articleBody":"### Bug report\n\nThis was originally filed by Timofey Ivankov (@deadlovelll), whose gh account is frozen currently, so I'm refiling it and will repost the PR.\n\n```python\nimport asyncio\n\nfut = None\n\nasync def deep():\n await fut\n\nasync def gen():\n await deep()\n yield 1\n\nasync def consumer():\n async for _ in gen():\n pass\n\nasync def main():\n global fut\n fut = asyncio.get_running_loop().create_future()\n t = asyncio.create_task(consumer(), name='consumer')\n for _ in range(5):\n await asyncio.sleep(0)\n asyncio.print_call_graph(t)\n fut.set_result(None)\n await t\n\nasyncio.run(main())\n```\n\nThis prints:\n```\n* Task(name='consumer', id=0xe6e7055556d0)\n + Call stack:\n | File '/home/sully/asyncgen-callgraph.py', line 13, in async consumer()\n```\nand we'd like it to print the whole stack like:\n```\n* Task(name='consumer', id=0xf7a46909e210)\n + Call stack:\n | File '/home/sully/asyncgen-callgraph.py', line 6, in async deep()\n | File '/home/sully/asyncgen-callgraph.py', line 9, in async generator gen()\n | File '/home/sully/asyncgen-callgraph.py', line 13, in async consumer()\n```\n\n\n### CPython versions tested on:\n\nCPython main branch, 3.15\n\n### Operating systems tested on:\n\n_No response_\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-160839\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/msullivan","@type":"Person","name":"msullivan"},"datePublished":"2026-10-28T17:40:54Z","url":"https://github.com/python/cpython/issues/160837"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:b9bb5c6b-f5db-891e-c772-949aba9b5c90 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C686:E0ADF:1EE1B9A:26D5BA3:6B0245CF |
| html-safe-nonce | 1730915076a416f814482f453f2ecafd88739c7b6864960529afe537b2fe5911 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNjg2OkUwQURGOjFFRTFCOUE6MjZENUJBMzo2QjAyNDVDRiIsInZpc2l0b3JfaWQiOiIxMjA0NzA0NjY4NjY0NjEyMzAzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | df04497bb40ea0d1f69d2a2dcf10a3eae1b63fcca654cbacf6d424d6142526d7 |
| hovercard-subject-tag | issue:6084302472 |
| 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/160837/issue_layout |
| twitter:image | https://opengraph.githubassets.com/961bddd1d2d8973a66c6e0b5922f1d87ff6a6a42f7ec49b1f7b8846ec80e18d9/python/cpython/issues/160837 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/961bddd1d2d8973a66c6e0b5922f1d87ff6a6a42f7ec49b1f7b8846ec80e18d9/python/cpython/issues/160837 |
| og:image:alt | Bug report This was originally filed by Timofey Ivankov (@deadlovelll), whose gh account is frozen currently, so I'm refiling it and will repost the PR. import asyncio fut = None async def deep(): ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | msullivan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width