New submission from Yury Selivanov: 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 ---------- assignee: yselivanov components: Interpreter Core files: agen.patch keywords: patch messages: 281008 nosy: ned.deily, yselivanov priority: release blocker severity: normal stage: commit review status: open title: Fix asynchronous generators athrow() and aclose() to handle StopAsyncIteration type: behavior versions: Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45514/agen.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28721> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com