Skip to content

Conversation

@agronholm
Copy link
Contributor

If this is not done, it will be up to the event loop's asyncgen finalizer to do the closing, and there's no telling when it will happen. Additionally, Trio will emit a warning whenever the finalizer detects an unclosed async generator.

@agronholm
Copy link
Contributor Author

This is part of my efforts to clean up asyncgen usage in httpx/httpcore to get MCP working with Trio.

Copy link
Owner

@florimondmanca florimondmanca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, thanks!

@florimondmanca florimondmanca merged commit b1d12bb into florimondmanca:master Jun 18, 2025
4 checks passed
@agronholm
Copy link
Contributor Author

I am also working on PRs against httpcore and httpx, see encode/httpcore#1019

@agronholm agronholm deleted the asyncgenerators branch June 18, 2025 18:35
@agronholm
Copy link
Contributor Author

Could I ask for a new release too? 🙏

@florimondmanca
Copy link
Owner

Ah yes, will do

@florimondmanca florimondmanca mentioned this pull request Jun 24, 2025
@florimondmanca
Copy link
Owner

@agronholm
Copy link
Contributor Author

Ah yes, will do

Much obliged! 🎉

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.

2 participants