From ed274a4ae4665b5c7a367670b0c89c8eeed1c8b4 Mon Sep 17 00:00:00 2001 From: Carlton Gibson Date: Thu, 9 Apr 2020 11:56:01 +0200 Subject: [PATCH] Fixed #31407 -- Fixed unawaited coroutine warning for Python 3.8+. Co-authored-by: Mark Korput --- tests/handlers/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/handlers/views.py b/tests/handlers/views.py index 455532dd3c..6d573c5df8 100644 --- a/tests/handlers/views.py +++ b/tests/handlers/views.py @@ -58,5 +58,8 @@ class CoroutineClearingView: self._unawaited_coroutine = asyncio.sleep(0) return self._unawaited_coroutine + def __del__(self): + self._unawaited_coroutine.close() + async_unawaited = CoroutineClearingView()