]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-110378: Close invalid generators in contextmanager and asynccontextmanager (GH...
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 10 Oct 2023 07:43:04 +0000 (10:43 +0300)
committerGitHub <noreply@github.com>
Tue, 10 Oct 2023 07:43:04 +0000 (09:43 +0200)
commit96fed66a65097eac2dc528ce29c9ba676bb07689
tree5df0c034d82f6604b2ac0f0375d5ac556d914a44
parentdef7ea5cec41e8d3112641bb4af7572c0ac4f380
gh-110378: Close invalid generators in contextmanager and asynccontextmanager (GH-110499)

contextmanager and asynccontextmanager context managers now close an invalid
underlying generator object that yields more then one value.
Lib/contextlib.py
Lib/test/test_contextlib.py
Lib/test/test_contextlib_async.py
Misc/NEWS.d/next/Library/2023-10-07-13-50-12.gh-issue-110378.Y4L8fl.rst [new file with mode: 0644]