-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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
bpo-35409: Ignore GeneratorExit in async_gen_athrow_throw #14755
Conversation
…ynchronous generator Related issues and pull requests on cpython: - https://bugs.python.org/issue35409 - python/cpython#14755
Corresponding PR on pypy: https://bitbucket.org/pypy/pypy/pull-requests/655 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you double check if regular generators have the same bahavior before we merge?
Well, I don't think this behavior applies to regular generators. The closest thing I could think of is: >>> def gen():
... try:
... yield
... finally:
... yield
...
>>> g = gen()
>>> g.send(None)
>>> g.close() which produces: Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: generator ignored GeneratorExit Also note that the chunk of code added to |
Just pinging, as it turns out to be a blocking issue for the aiostream library :) |
Andrew, can you take a look at this too? |
Is it urgent? |
I guess since we missed the RC1 for this it's no longer urgent. But please look at this as soon as you can. I'd like to hear your opinion. |
Hi all, I'm just pinging again as I would really like to have this issue fixed :) |
LGTM |
Sorry, I can't merge this PR. Reason: |
Thanks @vxgmichel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8. |
I'm having trouble backporting to |
…4755) Ignore `GeneratorExit` exceptions when throwing an exception into the `aclose` coroutine of an asynchronous generator. https://bugs.python.org/issue35409 (cherry picked from commit 8e0de2a) Co-authored-by: Vincent Michel <[email protected]>
GH-17257 is a backport of this pull request to the 3.7 branch. |
Thanks @vxgmichel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
…4755) Ignore `GeneratorExit` exceptions when throwing an exception into the `aclose` coroutine of an asynchronous generator. https://bugs.python.org/issue35409 (cherry picked from commit 8e0de2a) Co-authored-by: Vincent Michel <[email protected]>
GH-17258 is a backport of this pull request to the 3.8 branch. |
Thanks! |
Ignore `GeneratorExit` exceptions when throwing an exception into the `aclose` coroutine of an asynchronous generator. https://bugs.python.org/issue35409 (cherry picked from commit 8e0de2a) Co-authored-by: Vincent Michel <[email protected]>
Ignore `GeneratorExit` exceptions when throwing an exception into the `aclose` coroutine of an asynchronous generator. https://bugs.python.org/issue35409 (cherry picked from commit 8e0de2a) Co-authored-by: Vincent Michel <[email protected]>
…4755) Ignore `GeneratorExit` exceptions when throwing an exception into the `aclose` coroutine of an asynchronous generator. https://bugs.python.org/issue35409
…4755) Ignore `GeneratorExit` exceptions when throwing an exception into the `aclose` coroutine of an asynchronous generator. https://bugs.python.org/issue35409
Summary: Apply the changes from python/cpython#14755 to Pyro Based on Facebook D27943651
Ignore
GeneratorExit
exceptions when throwing an exception into theaclose
coroutine of an asynchronous generator.https://bugs.python.org/issue35409
Automerge-Triggered-By: @asvetlov