Skip to content
8 changes: 0 additions & 8 deletions Lib/contextlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Comment thread
serhiy-storchaka marked this conversation as resolved.
Resolved
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
Expand Down