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 |
1st1
left a comment
There was a problem hiding this comment.
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 GeneratorExitAlso 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 <vxgmichel@gmail.com>
|
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 <vxgmichel@gmail.com>
|
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 <vxgmichel@gmail.com>
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 <vxgmichel@gmail.com>
…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
GeneratorExitexceptions when throwing an exception into theaclosecoroutine of an asynchronous generator.https://bugs.python.org/issue35409
Automerge-Triggered-By: @asvetlov