This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Leaked tasks cause IsolatedAsyncioTestCase to throw an exception
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.11, Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: bar.harel, lukasz.langa, michael.foord, miss-islington
Priority: normal Keywords: patch

Created on 2021-08-14 00:36 by bar.harel, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 27765 merged bar.harel, 2021-08-14 00:51
PR 27777 merged miss-islington, 2021-08-16 08:21
Messages (4)
msg399577 - (view) Author: Bar Harel (bar.harel) * Date: 2021-08-14 00:36
Writing a test that leaks a running asyncio task will cause IsolatedAsyncioTestCase to crash while attempting to cancel.

Seems like the loop argument wasn't removed from the usage of asyncio.gather() in IsolatedAsyncioTestCase._tearDownAsyncioLoop

Pushing a fix as we speak
msg399635 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-08-16 08:21
New changeset 2cb1a6806c0cefab0c3a40fdd428a89a4392570e by Bar Harel in branch 'main':
bpo-44911: Fixed IsolatedAsyncioTestCase from throwing an exception on leaked tasks (GH-27765)
https://github.com/python/cpython/commit/2cb1a6806c0cefab0c3a40fdd428a89a4392570e
msg399641 - (view) Author: miss-islington (miss-islington) Date: 2021-08-16 09:55
New changeset 8516ca500eb45ecf997a471f003df02a9eb767ce by Miss Islington (bot) in branch '3.10':
bpo-44911: Fixed IsolatedAsyncioTestCase from throwing an exception on leaked tasks (GH-27765)
https://github.com/python/cpython/commit/8516ca500eb45ecf997a471f003df02a9eb767ce
msg399646 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-08-16 10:40
Thanks, Bar! ✨ 🍰 ✨
History
Date User Action Args
2022-04-11 14:59:48adminsetgithub: 89074
2021-08-16 10:40:05lukasz.langasetstatus: open -> closed
resolution: fixed
messages: + msg399646

stage: patch review -> resolved
2021-08-16 09:55:16miss-islingtonsetmessages: + msg399641
2021-08-16 08:21:41miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request26249
2021-08-16 08:21:39lukasz.langasetnosy: + lukasz.langa
messages: + msg399635
2021-08-15 13:21:54bar.harelsetnosy: + michael.foord
2021-08-14 00:51:47bar.harelsetkeywords: + patch
stage: patch review
pull_requests: + pull_request26241
2021-08-14 00:36:43bar.harelcreate