mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
bpo-38415: Remove redundant AsyncContextDecorator.__call__ override from _AsyncGeneratorContextManager (GH-30233)
This commit is contained in:
parent
e466faa9df
commit
b57dbe5d1b
1 changed files with 0 additions and 8 deletions
|
@ -193,14 +193,6 @@ class _AsyncGeneratorContextManager(
|
||||||
):
|
):
|
||||||
"""Helper for @asynccontextmanager decorator."""
|
"""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):
|
async def __aenter__(self):
|
||||||
# do not keep args and kwds alive unnecessarily
|
# do not keep args and kwds alive unnecessarily
|
||||||
# they are only needed for recreation, which is not possible anymore
|
# they are only needed for recreation, which is not possible anymore
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue