Skip to content

gh-160837: Fix asyncio call graph truncation at async generators - #160839

Merged
kumaraditya303 merged 4 commits into
python:mainfrom
msullivan:gh-160837-asyncgen
Oct 31, 2026
Merged

kumaraditya303 merged 4 commits into
python:mainfrom
msullivan:gh-160837-asyncgen

Conversation

@msullivan

@msullivan msullivan commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Add an aga_gen field to the awaitables returned by asend/athrow/aclose
on async generators, and make the graph construction inspect it.

This change originally by Timofey Ivankov (@deadlovelll), whose gh account is
frozen right now.

I made two changes:

  • Dropped the doc changes added to stdtypes and documented it in inspect, where similar things are documented
  • Renamed the field from ag_gen to aga_gen, since it is not actually on an async generator, but on an async generator awaitable. In the C, there are two different types and the fields are ags_gen and agt_gen, but I thought it was worth combining them.

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #35477893 | 📁 Comparing 09be550 against main (19270d3)

  🔍 Preview build  

2 files changed
± library/inspect.html
± whatsnew/changelog.html

@kumaraditya303
kumaraditya303 enabled auto-merge (squash) October 31, 2026 12:29
@kumaraditya303
kumaraditya303 merged commit f32067f into python:main Oct 31, 2026
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants