1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

Fixed #31407 -- Fixed unawaited coroutine warning for Python 3.8+.

Co-authored-by: Mark Korput <dr.theman@gmail.com>
This commit is contained in:
Carlton Gibson 2020-04-09 11:56:01 +02:00 committed by Carlton Gibson
parent 377018b6ff
commit ed274a4ae4

View File

@ -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()