From 14add7520bb2f6dd468338c50fe94a5ac9a6ae0c Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Mon, 28 Jun 2021 23:29:21 +0100 Subject: [PATCH] widen _SupportsAclose (#5708) see https://github.com/python-trio/trio-typing/issues/31#issuecomment-867534826 --- stdlib/contextlib.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/contextlib.pyi b/stdlib/contextlib.pyi index 9adddd817..abf3df6b2 100644 --- a/stdlib/contextlib.pyi +++ b/stdlib/contextlib.pyi @@ -48,7 +48,7 @@ class closing(ContextManager[_SupportsCloseT]): if sys.version_info >= (3, 10): class _SupportsAclose(Protocol): - async def aclose(self) -> object: ... + def aclose(self) -> Awaitable[object]: ... _SupportsAcloseT = TypeVar("_SupportsAcloseT", bound=_SupportsAclose) class aclosing(AsyncContextManager[_SupportsAcloseT]): def __init__(self, thing: _SupportsAcloseT) -> None: ...