This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Valentin Lavrinenko
Recipients Valentin Lavrinenko, asvetlov, yselivanov
Date 2018-06-06.17:24:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1528305875.22.0.592728768989.issue33786@psf.upfronthosting.co.za>
In-reply-to
Content
```
@asynccontextmanager
async def ctx():
    yield


async def gen():
    async with ctx():
        yield 'hello'
        yield 'world'


async def main():
    async with ctx():
        async for value in gen():
            print(value)
            raise RuntimeError()
```

Running main() leads to `RuntimeError: generator didn't stop after throw()`. This happens because async gernerator's `.athrow()` method doesn't re-throw `GeneratorExit` exception; probably, this is wrong.
History
Date User Action Args
2018-06-06 17:24:35Valentin Lavrinenkosetrecipients: + Valentin Lavrinenko, asvetlov, yselivanov
2018-06-06 17:24:35Valentin Lavrinenkosetmessageid: <1528305875.22.0.592728768989.issue33786@psf.upfronthosting.co.za>
2018-06-06 17:24:35Valentin Lavrinenkolinkissue33786 messages
2018-06-06 17:24:35Valentin Lavrinenkocreate