New submission from Thomas Grainger <tagr...@gmail.com>:
demo program: ``` def test_async_fn(): async def async_fn(): pass async_fn() def test_async_gen_fn(): async def agen_fn(): yield agen_fn().aclose() agen_fn().asend(None) test_async_fn() test_async_gen_fn() ``` output: ``` /home/graingert/projects/anyio/foo.py:5: RuntimeWarning: coroutine 'test_async_fn.<locals>.async_fn' was never awaited async_fn() RuntimeWarning: Enable tracemalloc to get the object allocation traceback ``` expected: ``` /home/graingert/projects/anyio/foo.py:5: RuntimeWarning: coroutine 'test_async_fn.<locals>.async_fn' was never awaited async_fn() RuntimeWarning: Enable tracemalloc to get the object allocation traceback /home/graingert/projects/anyio/foo.py:12: RuntimeWarning: coroutine '<async_generator_athrow object at 0xffffffffffff>' was never awaited agen_fn().aclose() RuntimeWarning: Enable tracemalloc to get the object allocation traceback /home/graingert/projects/anyio/foo.py:13: RuntimeWarning: coroutine '<async_generator_asend object at 0xffffffffffff>' was never awaited agen_fn().asend(None) RuntimeWarning: Enable tracemalloc to get the object allocation traceback ``` ---------- components: Interpreter Core messages: 399684 nosy: graingert priority: normal severity: normal status: open title: async generator missing unawaited coroutine warning versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44928> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com