[New-bugs-announce] [issue40213] contextlib.aclosing()

John Belmonte report at bugs.python.org
Mon Apr 6 22:13:32 EDT 2020


New submission from John Belmonte <john at neggie.net>:

Please add aclosing() to contextlib, the async equivalent of closing().

It's needed to ensure deterministic call of aclose() on the resource object at block exit.

It's been available in the async_generator module for some time.  However that module is intended to provide async generators to Python 3.5, so it's odd for apps using modern Python versions to depend on it only for aclosing().

https://github.com/python-trio/async_generator/blob/22eddc191c2ae3fc152ca13cf2d6fa55ac3f1568/async_generator/_util.py#L6

----------
components: Library (Lib)
messages: 365885
nosy: John Belmonte, njs
priority: normal
severity: normal
status: open
title: contextlib.aclosing()
type: enhancement
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40213>
_______________________________________


More information about the New-bugs-announce mailing list