Skip to content
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

[3.12] gh-112182: Replace StopIteration with RuntimeError for future (GH-113220) #123033

Merged
merged 2 commits into from
Aug 15, 2024

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Aug 15, 2024

When an StopIteration raises into asyncio.Future, this will cause
a thread to hang. This commit address this by not raising an exception
and silently transforming the StopIteration with a RuntimeError,
which the caller can reconstruct from fut.exception().__cause__
(cherry picked from commit 4826d52)

Co-authored-by: Jamie Phan jamie@ordinarylab.dev

…ythonGH-113220)

When an `StopIteration` raises into `asyncio.Future`, this will cause
a thread to hang. This commit address this by not raising an exception
and silently transforming the `StopIteration` with a `RuntimeError`,
which the caller can reconstruct from `fut.exception().__cause__`
(cherry picked from commit 4826d52)

Co-authored-by: Jamie Phan <jamie@ordinarylab.dev>
@serhiy-storchaka serhiy-storchaka merged commit 41090b7 into python:3.12 Aug 15, 2024
28 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