André Caron added the comment:
Hi Guido,
Thanks for the quick reply :-)
AFAICT, there seem to be three possible directions regarding this issue -- for
both wait() and as_completed():
1) remove the need for ensure_future(): make the membership test succeed and
allow multiple await
André Caron added the comment:
After thinking about this some more, I think my problem with asyncio.wait() is
a bit bigger than the simple fact that coroutine objects cannot be awaited
multiple times. It seems to me like asyncio.wait() is completely broken for
coroutine objects as inputs and
New submission from André Caron:
When the asyncio.wait() function with coroutine objects as inputs, it is
impossbible to extract the results reliably.
This issue arises because asyncio.wait() returns an unordered set of futures
against which membership tests of coroutine objects always fail
André Caron added the comment:
> I believe you're not using the asyncio.task() function correctly.
I assume you meant asyncio.wait().
I just updated my gist with a variant of my example that uses the (done,
pending) pair returned by asyncio.wait() as you suggested.
The set of done
André Caron added the comment:
Hi there!
I've just stumbled upon this behavior and I was also surprised by the fact that
the second await simply returns None.
After fiddling around for a while, I noticed that if I wrap the coroutine
object using asyncio.ensure_future
Changes by André Caron :
--
nosy: +André Caron
___
Python tracker
<http://bugs.python.org/issue25833>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from André Caron:
When trying to create a new virtual environment using Python 3.5's venv package
from a virtual environment created by the popular 3rd-party virtualenv
package, I get a segfault.
Nested virtual environments work fine both with venv and virtualenv, but