Skip to content

Close sub-generators even if top level generator was asynchronous. #96040

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

markshannon
Copy link
Member

I think this is correct.
It seems odd that whether a sub-generator is closed or not depends on whether an async generator exists higher up the stack.

@brandtbucher thoughts?

Will need news and issue, if we agree this is correct.

Copy link
Member

@brandtbucher brandtbucher left a comment

Choose a reason for hiding this comment

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

Has this been abandoned, or are you still considering it for 3.13? I agree that this makes the code a bit simpler, but I find it hard to reason about whether the correctness is preserved or not (presumably there's some reason it currently works this way).

So I would lean towards not changing it, unless we have a compelling reason to.

@markshannon markshannon closed this Aug 6, 2024
@markshannon markshannon deleted the remove-close-on-genexit branch August 6, 2024 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants