From 0454323d6b100ab648f54d366be96b3929e6c396 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Thu, 23 Dec 2021 00:27:44 +0000 Subject: [PATCH 1/5] remove redundant AsyncContextDecorator.__call__ override from _AsyncGeneratorContextManager --- Lib/contextlib.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Lib/contextlib.py b/Lib/contextlib.py index ee72258505714a..4cff9c6a461178 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 From f55afb201f69bf73adfada2c893a855662dbcae6 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Thu, 23 Dec 2021 00:58:33 +0000 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NEWS.d/next/Library/2021-12-23-00-58-31.bpo-38415.NY5sUF.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Library/2021-12-23-00-58-31.bpo-38415.NY5sUF.rst diff --git a/Misc/NEWS.d/next/Library/2021-12-23-00-58-31.bpo-38415.NY5sUF.rst b/Misc/NEWS.d/next/Library/2021-12-23-00-58-31.bpo-38415.NY5sUF.rst new file mode 100644 index 00000000000000..c91f1043b85cda --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-12-23-00-58-31.bpo-38415.NY5sUF.rst @@ -0,0 +1 @@ +remove redundant ``AsyncContextDecorator.__call__` override from ``_AsyncGeneratorContextManager`` \ No newline at end of file From 0b6ee6b61585fa4f95cfa9aa29db9507b534f455 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Thu, 23 Dec 2021 00:59:24 +0000 Subject: [PATCH 3/5] Update Misc/NEWS.d/next/Library/2021-12-23-00-58-31.bpo-38415.NY5sUF.rst --- .../next/Library/2021-12-23-00-58-31.bpo-38415.NY5sUF.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Library/2021-12-23-00-58-31.bpo-38415.NY5sUF.rst b/Misc/NEWS.d/next/Library/2021-12-23-00-58-31.bpo-38415.NY5sUF.rst index c91f1043b85cda..85868ae664a103 100644 --- a/Misc/NEWS.d/next/Library/2021-12-23-00-58-31.bpo-38415.NY5sUF.rst +++ b/Misc/NEWS.d/next/Library/2021-12-23-00-58-31.bpo-38415.NY5sUF.rst @@ -1 +1 @@ -remove redundant ``AsyncContextDecorator.__call__` override from ``_AsyncGeneratorContextManager`` \ No newline at end of file +remove redundant ``AsyncContextDecorator.__call__`` override from ``_AsyncGeneratorContextManager`` \ No newline at end of file From 1c350a65030dcc03e9a6e0af4ea9f5f39b964673 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Thu, 23 Dec 2021 01:08:48 +0000 Subject: [PATCH 4/5] Update Misc/NEWS.d/next/Library/2021-12-23-00-58-31.bpo-38415.NY5sUF.rst --- .../next/Library/2021-12-23-00-58-31.bpo-38415.NY5sUF.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Library/2021-12-23-00-58-31.bpo-38415.NY5sUF.rst b/Misc/NEWS.d/next/Library/2021-12-23-00-58-31.bpo-38415.NY5sUF.rst index 85868ae664a103..24c975aba2a9bb 100644 --- a/Misc/NEWS.d/next/Library/2021-12-23-00-58-31.bpo-38415.NY5sUF.rst +++ b/Misc/NEWS.d/next/Library/2021-12-23-00-58-31.bpo-38415.NY5sUF.rst @@ -1 +1 @@ -remove redundant ``AsyncContextDecorator.__call__`` override from ``_AsyncGeneratorContextManager`` \ No newline at end of file +remove redundant AsyncContextDecorator override from _AsyncGeneratorContextManager \ No newline at end of file From 462ae8b01c6da7b6d7824e707c8d46fac93e6611 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 3 Feb 2022 11:28:36 +0200 Subject: [PATCH 5/5] Delete 2021-12-23-00-58-31.bpo-38415.NY5sUF.rst Since the change does not affect the user-visible behavior, a NEWS entry is not needed. --- .../NEWS.d/next/Library/2021-12-23-00-58-31.bpo-38415.NY5sUF.rst | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Misc/NEWS.d/next/Library/2021-12-23-00-58-31.bpo-38415.NY5sUF.rst diff --git a/Misc/NEWS.d/next/Library/2021-12-23-00-58-31.bpo-38415.NY5sUF.rst b/Misc/NEWS.d/next/Library/2021-12-23-00-58-31.bpo-38415.NY5sUF.rst deleted file mode 100644 index 24c975aba2a9bb..00000000000000 --- a/Misc/NEWS.d/next/Library/2021-12-23-00-58-31.bpo-38415.NY5sUF.rst +++ /dev/null @@ -1 +0,0 @@ -remove redundant AsyncContextDecorator override from _AsyncGeneratorContextManager \ No newline at end of file