Message323217
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__). |
|
Date |
User |
Action |
Args |
2018-08-06 19:41:06 | jnwatson | set | recipients:
+ jnwatson, asvetlov, yselivanov |
2018-08-06 19:41:06 | jnwatson | set | messageid: <1533584466.72.0.56676864532.issue34349@psf.upfronthosting.co.za> |
2018-08-06 19:41:06 | jnwatson | link | issue34349 messages |
2018-08-06 19:41:06 | jnwatson | create | |
|