X Tutup
The Wayback Machine - https://web.archive.org/web/20250916140126/https://github.com/python/cpython/pull/123033
Skip to content

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
X Tutup