From: Thomas Grainger Date: Sat, 26 Feb 2022 12:05:20 +0000 (+0000) Subject: bpo-38415: Remove redundant AsyncContextDecorator.__call__ override from _AsyncGenera... X-Git-Tag: v3.11.0a6~76 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b57dbe5d1be925b99f16fe5893e339f92fc05888;p=thirdparty%2FPython%2Fcpython.git bpo-38415: Remove redundant AsyncContextDecorator.__call__ override from _AsyncGeneratorContextManager (GH-30233) --- diff --git a/Lib/contextlib.py b/Lib/contextlib.py index ee7225850571..4cff9c6a4611 100644 --- a/Lib/contextlib.py +++ b/Lib/contextlib.py @@ -193,14 +193,6 @@ class _AsyncGeneratorContextManager( ): """Helper for @asynccontextmanager decorator.""" - def __call__(self, func): - @wraps(func) - async def inner(*args, **kwds): - async with self.__class__(self.func, self.args, self.kwds): - return await func(*args, **kwds) - - return inner - async def __aenter__(self): # do not keep args and kwds alive unnecessarily # they are only needed for recreation, which is not possible anymore