Message296106
Here is the example code I am running:
```
import asyncio
class it:
async def __aenter__(self):
return self
async def __aexit__(self, *_):
print('EXIT')
async def main():
async with it():
await asyncio.sleep(100)
asyncio.get_event_loop().run_until_complete(main())
```
When this gets interrupted by a SIGINT, I would expect this code to display `EXIT` before the `KeyboardInterrupt` stacktrace. But instead the `__aexit__` function is simply not called. |
|
Date |
User |
Action |
Args |
2017-06-15 15:27:28 | rthr | set | recipients:
+ rthr, yselivanov |
2017-06-15 15:27:28 | rthr | set | messageid: <1497540448.31.0.823018030843.issue30679@psf.upfronthosting.co.za> |
2017-06-15 15:27:28 | rthr | link | issue30679 messages |
2017-06-15 15:27:28 | rthr | create | |
|