Skip to content

bpo-38415: Remove redundant AsyncContextDecorator.__call__ override from _AsyncG… #30233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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):
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