Author rthr
Recipients rthr, yselivanov
Date 2017-06-15.15:27:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1497540448.31.0.823018030843.issue30679@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-06-15 15:27:28rthrsetrecipients: + rthr, yselivanov
2017-06-15 15:27:28rthrsetmessageid: <1497540448.31.0.823018030843.issue30679@psf.upfronthosting.co.za>
2017-06-15 15:27:28rthrlinkissue30679 messages
2017-06-15 15:27:28rthrcreate