Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue28721

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Fix asynchronous generators athrow() and aclose() to handle StopAsyncIteration
Type:behaviorStage:commit review
Components:Interpreter CoreVersions:Python 3.7, Python 3.6
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: yselivanovNosy List: ned.deily, python-dev, yselivanov
Priority:release blockerKeywords:patch

Created on2016-11-16 23:12 byyselivanov, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
agen.patchyselivanov,2016-11-16 23:12review
Pull Requests
URLStatusLinkedEdit
PR 552closeddstufft,2017-03-31 16:36
Messages (2)
msg281008 -(view)Author: Yury Selivanov (yselivanov)*(Python committer)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 StopAsyncIteration2. 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)(Python triager)Date: 2016-11-16 23:16
New changeset0f12a1d3a737 by Yury Selivanov in branch '3.6':Issue#28721: Fix asynchronous generators aclose() and athrow()https://hg.python.org/cpython/rev/0f12a1d3a737New changeset22cd78026ad1 by Yury Selivanov in branch 'default':Merge 3.6 (issue#28721)https://hg.python.org/cpython/rev/22cd78026ad1
History
DateUserActionArgs
2022-04-11 14:58:39adminsetgithub: 72907
2017-03-31 16:36:18dstufftsetpull_requests: +pull_request925
2016-11-16 23:26:54yselivanovsetstatus: open -> closed
resolution: fixed
2016-11-16 23:16:56python-devsetnosy: +python-dev
messages: +msg281009
2016-11-16 23:12:03yselivanovcreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp