Title: `asyncio.print_call_graph()` loses the call stack at `aiter(callable, stop_value)` · Issue #157044 · python/cpython · GitHub
Open Graph Title: `asyncio.print_call_graph()` loses the call stack at `aiter(callable, stop_value)` · Issue #157044 · python/cpython
X Title: `asyncio.print_call_graph()` loses the call stack at `aiter(callable, stop_value)` · Issue #157044 · python/cpython
Description: Bug report Bug description: The two-argument form of aiter() hides everything the callable is waiting on. The awaitable it produces exposes nothing about the coroutine it wraps, so the walk stops there Repro: import asyncio async def dee...
Open Graph Description: Bug report Bug description: The two-argument form of aiter() hides everything the callable is waiting on. The awaitable it produces exposes nothing about the coroutine it wraps, so the walk stops t...
X Description: Bug report Bug description: The two-argument form of aiter() hides everything the callable is waiting on. The awaitable it produces exposes nothing about the coroutine it wraps, so the walk stops t...
Opengraph URL: https://github.com/python/cpython/issues/157044
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`asyncio.print_call_graph()` loses the call stack at `aiter(callable, stop_value)`","articleBody":"# Bug report\n\n### Bug description:\n\nThe two-argument form of `aiter()` hides everything the callable is waiting on. The awaitable it produces exposes nothing about the coroutine it wraps, so the walk stops there\n\nRepro:\n\n```python\nimport asyncio\n\nasync def deep():\n await asyncio.Event().wait()\n\nasync def produce():\n await deep()\n return 1\n\nasync def worker():\n async for _ in aiter(produce, None):\n pass\n\nasync def main():\n t = asyncio.create_task(worker(), name='worker')\n await asyncio.sleep(0.05)\n asyncio.print_call_graph(t)\n t.cancel()\n\nasyncio.run(main())\n```\n\nExpected:\n\n```\n* Task(name='worker', id=0x105e7cb90)\n + Call stack:\n | File '/Users/timofeiivankov/cpython/Lib/asyncio/locks.py', line 210, in async Event.wait()\n | File '/Users/timofeiivankov/cpython/repro.py', line 4, in async deep()\n | File '/Users/timofeiivankov/cpython/repro.py', line 7, in async produce()\n | File '/Users/timofeiivankov/cpython/repro.py', line 11, in async worker()\n```\n\nActual:\n\n```\n* Task(name='worker', id=0x105adcb90)\n + Call stack:\n | File '/Users/timofeiivankov/cpython/repro.py', line 11, in async worker()\n```\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nmacOS\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-157153\n* gh-157202\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/deadlovelll","@type":"Person","name":"deadlovelll"},"datePublished":"2026-09-06T18:01:57Z","url":"https://github.com/python/cpython/issues/157044"}
| 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:24952dc5-61c4-9f13-91d3-edc509e17ff0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 80D8:22DB35:494A67A:5D3DEC6:6B023F39 |
| html-safe-nonce | c7f60249672828ae9de12de3eb92750cbbe6c2648ec7f8b74584241b4a249f0f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MEQ4OjIyREIzNTo0OTRBNjdBOjVEM0RFQzY6NkIwMjNGMzkiLCJ2aXNpdG9yX2lkIjoiMTg4MTM3MDcxMzUxODQwNTY5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 8043dd1f0e0f86128d9d0323cd35484cd27aaad6654d86458d0f453fc4dfa36b |
| hovercard-subject-tag | issue:5366706286 |
| 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/157044/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f0fa23256751e6c867b71a45827672b4bd18a934f3dca57410ce8aab7b7a8223/python/cpython/issues/157044 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f0fa23256751e6c867b71a45827672b4bd18a934f3dca57410ce8aab7b7a8223/python/cpython/issues/157044 |
| og:image:alt | Bug report Bug description: The two-argument form of aiter() hides everything the callable is waiting on. The awaitable it produces exposes nothing about the coroutine it wraps, so the walk stops t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | deadlovelll |
| 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