You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
In some obscure cases, StopIteration exceptions can be turned into RuntimeErrors when passing through nurseries #229
Ought to raise a MultiError([StopIteration(), ValueError()]), but instead it raises a MultiError([RuntimeError(), ValueError()]). This is because you can't throw a StopIteration into an async_generator-based async generator (for details see here) – it gets wrapped into a RuntimeError. If we let that RuntimeError propagate, then acontextmanager could turn it back, but here it gets wrapped into a MultiError instead so the magic doesn't work.
I guess we could make acontextmanager smart enough to look inside MultiErrors? Or stop using acontextmanager and write this context manager directly? Or just not worry about it until we can drop 3.5 support and switch to using native async generators, which don't have this problem? It's very unusual to have free-floating StopIteration exceptions wandering around like this, and that's the only case that's affected. But I figured we should record the problem in any case.
Activity