New submission from Nic Watson <pythonb...@nicwatson.org>:
Currently, passing a generator of coroutines or futures as the first parameter of asyncio.wait raises a TypeError. This is in conflict with the documentation calling the first parameter a "sequence". Line in question. https://github.com/python/cpython/blob/3.7/Lib/asyncio/tasks.py#L347 Generators are indeed coroutines, so the check to validate that the first parameter is not a coroutine or a future is too specific. I'd suggest replacing that line with a check that the passed-in parameter is iterable, i.e. hasattr(futures, __iter__). ---------- components: asyncio messages: 323217 nosy: asvetlov, jnwatson, yselivanov priority: normal severity: normal status: open title: asyncio.wait should accept generator of tasks as first argument versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34349> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com