]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-38415: Remove redundant AsyncContextDecorator.__call__ override from _AsyncGenera...
authorThomas Grainger <tagrain@gmail.com>
Sat, 26 Feb 2022 12:05:20 +0000 (12:05 +0000)
committerGitHub <noreply@github.com>
Sat, 26 Feb 2022 12:05:20 +0000 (14:05 +0200)
Lib/contextlib.py

index ee72258505714a4d12f3b00d2c9dacda911ec237..4cff9c6a4611788ef799982848a9748a1ebd97d9 100644 (file)
@@ -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