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 vstinner
Recipients gvanrossum, vstinner, yselivanov
Date 2016-02-17.11:30:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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:
Date User Action Args
2016-02-17 11:30:21vstinnersetrecipients: + vstinner, gvanrossum, yselivanov
2016-02-17 11:30:21vstinnersetmessageid: <>
2016-02-17 11:30:21vstinnerlinkissue26373 messages
2016-02-17 11:30:21vstinnercreate