classification
Title: Add contextlib.AbstractAsyncContextManager
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Jelle Zijlstra, levkivskyi, ncoghlan, yselivanov
Priority: normal Keywords:

Created on 2017-05-03 04:12 by Jelle Zijlstra, last changed 2017-12-14 01:20 by yselivanov. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 1412 merged Jelle Zijlstra, 2017-05-03 04:17
Messages (2)
msg292835 - (view) Author: Jelle Zijlstra (Jelle Zijlstra) * (Python triager) Date: 2017-05-03 04:12
It would be useful to have an abstract base class for asynchronous context managers, similar to the existing contextlib.AbstractContextManager. We can then also add this class to typing and use it as a PEP 544 Protocol.

I have code ready for contextlib.AbstractAsyncContextManager and will submit the PR shortly. I'll also add support in typing and typeshed if the CPython change is accepted.
msg308270 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2017-12-14 01:19
New changeset 176baa326be4ec2dc70ca0c054b7e2ab7ca6a9cf by Yury Selivanov (Jelle Zijlstra) in branch 'master':
bpo-30241: implement contextlib.AbstractAsyncContextManager (#1412)
https://github.com/python/cpython/commit/176baa326be4ec2dc70ca0c054b7e2ab7ca6a9cf
History
Date User Action Args
2017-12-14 01:20:16yselivanovsetstatus: open -> closed
resolution: fixed
stage: resolved
2017-12-14 01:19:20yselivanovsetmessages: + msg308270
2017-05-03 04:17:28Jelle Zijlstrasetpull_requests: + pull_request1520
2017-05-03 04:12:21Jelle Zijlstracreate