Issue28721
Created on 2016-11-16 23:12 by yselivanov, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| agen.patch | yselivanov, 2016-11-16 23:12 | review | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 552 | closed | dstufft, 2017-03-31 16:36 | |
| Messages (2) | |||
|---|---|---|---|
| msg281008 - (view) | Author: Yury Selivanov (yselivanov) * | Date: 2016-11-16 23:12 | |
1. aclose() should not propagate StopAsyncIteration:
async def agen():
try:
yield
except:
pass
gen = agen()
await agen.asend(None)
await agen.aclose() # <- this shouldn't raise StopAsyncIteration
2. athrow() should propagate StopAsyncIteration when the exception was swallowed by the generator and it returned:
async def agen():
try:
yield
except:
pass
gen = agen()
await agen.asend(None)
await agen.athrow(ValueError) # <- this should raise StopAsyncIteration
|
|||
| msg281009 - (view) | Author: Roundup Robot (python-dev) | Date: 2016-11-16 23:16 | |
New changeset 0f12a1d3a737 by Yury Selivanov in branch '3.6': Issue #28721: Fix asynchronous generators aclose() and athrow() https://hg.python.org/cpython/rev/0f12a1d3a737 New changeset 22cd78026ad1 by Yury Selivanov in branch 'default': Merge 3.6 (issue #28721) https://hg.python.org/cpython/rev/22cd78026ad1 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:39 | admin | set | github: 72907 |
| 2017-03-31 16:36:18 | dstufft | set | pull_requests: + pull_request925 |
| 2016-11-16 23:26:54 | yselivanov | set | status: open -> closed resolution: fixed |
| 2016-11-16 23:16:56 | python-dev | set | nosy:
+ python-dev messages: + msg281009 |
| 2016-11-16 23:12:03 | yselivanov | create | |