]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-116720: Fix corner cases of taskgroups (#117407)
authorGuido van Rossum <guido@python.org>
Tue, 9 Apr 2024 15:17:28 +0000 (08:17 -0700)
committerGitHub <noreply@github.com>
Tue, 9 Apr 2024 15:17:28 +0000 (08:17 -0700)
commitfa58e75a8605146a89ef72b58b4529669ac48366
tree1e15a0af9593b52529a6e637703ea878d6d295e0
parent22b25d1ebaab7b8c4833a8c120c8b4699a830f40
gh-116720: Fix corner cases of taskgroups (#117407)

This prevents external cancellations of a task group's parent task to
be dropped when an internal cancellation happens at the same time.
Also strengthen the semantics of uncancel() to clear self._must_cancel
when the cancellation count reaches zero.

Co-Authored-By: Tin Tvrtković <tinchester@gmail.com>
Co-Authored-By: Arthur Tacca
Doc/library/asyncio-task.rst
Doc/whatsnew/3.13.rst
Lib/asyncio/taskgroups.py
Lib/asyncio/tasks.py
Lib/test/test_asyncio/test_taskgroups.py
Lib/test/test_asyncio/test_tasks.py
Misc/NEWS.d/next/Library/2024-04-04-15-28-12.gh-issue-116720.aGhXns.rst [new file with mode: 0644]
Modules/_asynciomodule.c