Author jnwatson
Recipients asvetlov, jnwatson, yselivanov
Date 2018-08-06.19:41:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1533584466.72.0.56676864532.issue34349@psf.upfronthosting.co.za>
In-reply-to
Content
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__).
History
Date User Action Args
2018-08-06 19:41:06jnwatsonsetrecipients: + jnwatson, asvetlov, yselivanov
2018-08-06 19:41:06jnwatsonsetmessageid: <1533584466.72.0.56676864532.issue34349@psf.upfronthosting.co.za>
2018-08-06 19:41:06jnwatsonlinkissue34349 messages
2018-08-06 19:41:06jnwatsoncreate