GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign up…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 |
|
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: |
8e0de2a
into
python:master
|
Thanks @vxgmichel for the PR |
|
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 |
…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
vxgmichel commentedJul 13, 2019
•
edited by miss-islington
Ignore
GeneratorExitexceptions when throwing an exception into theaclosecoroutine of an asynchronous generator.https://bugs.python.org/issue35409
Automerge-Triggered-By: @asvetlov