Message260394
While working on the issue #24911 (Context manager of socket.socket is not documented), I recalled that asyncio objects don't support context manager. With the PEP 492, it becomes possible to add support for async context manager for a few asyncio objects. I suggest to start with StreamWriter.
Usually, my rationale to decide which object should implement context manager is to check if the destructor can emit ResourceWarning.
In asyncio, ResourceWarning is now emitted by transport and event loop destructors:
https://docs.python.org/dev/library/asyncio-dev.html#close-transports-and-event-loops |
|
Date |
User |
Action |
Args |
2016-02-17 11:30:21 | vstinner | set | recipients:
+ vstinner, gvanrossum, yselivanov |
2016-02-17 11:30:21 | vstinner | set | messageid: <1455708621.94.0.460576626878.issue26373@psf.upfronthosting.co.za> |
2016-02-17 11:30:21 | vstinner | link | issue26373 messages |
2016-02-17 11:30:21 | vstinner | create | |
|