[issue39191] Coroutine is awaited despite an exception in run_until_complete()

Karthikeyan Singaravelan report at bugs.python.org
Mon Jan 6 05:24:05 EST 2020


Karthikeyan Singaravelan <tir.karthi at gmail.com> added the comment:

This commit seems to generate some warnings in the nested run_until_complete test. The check for running loop is now done at run_until_complete itself before going through the below code in it to create a future and raised a RuntimeError by run_forever as the test used to do. Not sure why CI doesn't have these warnings.

PYTHONWARNINGS=always ./python.exe -m test test_asyncio -m test_run_until_complete_nesting
0:00:00 load avg: 2.16 Run tests sequentially
0:00:00 load avg: 2.16 [1/1] test_asyncio
/Users/kasingar/stuff/python/cpython/Lib/traceback.py:220: RuntimeWarning: coroutine 'EventLoopTestsMixin.test_run_until_complete_nesting.<locals>.coro1' was never awaited
  tb.tb_frame.clear()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
/Users/kasingar/stuff/python/cpython/Lib/traceback.py:220: RuntimeWarning: coroutine 'EventLoopTestsMixin.test_run_until_complete_nesting.<locals>.coro1' was never awaited
  tb.tb_frame.clear()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
/Users/kasingar/stuff/python/cpython/Lib/traceback.py:220: RuntimeWarning: coroutine 'EventLoopTestsMixin.test_run_until_complete_nesting.<locals>.coro1' was never awaited
  tb.tb_frame.clear()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

== Tests result: SUCCESS ==

1 test OK.

Total duration: 164 ms
Tests result: SUCCESS

----------
nosy: +xtreak

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39191>
_______________________________________


More information about the Python-bugs-list mailing list