This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yselivanov
Recipients André Caron, asvetlov, brett.cannon, gvanrossum, martin.panter, ncoghlan, vstinner, yselivanov
Date 2016-02-13.22:48:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1455403689.76.0.742268338169.issue25887@psf.upfronthosting.co.za>
In-reply-to
Content
> 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 that multiple awaits on coroutine objects only make that problem worse.

> While I still think there is a major benefit API-wise to have await expressions produce the same behaviour for both Futures and coroutine objects, I'm moving that discussion to issue #26357.

Looks like your problem can solved if you wrap coroutine objects in Tasks and then pass them to asyncio.wait().  In any case, it's good that you've opened #26357 to discuss that.  

I'm going to commit the patch for this issue now, since the current behaviour of coroutines returning None on second await is wrong.  Allowing multiple awaits for coroutine objects also seems very wrong to me, but please feel free to discuss that on python-ideas.
History
Date User Action Args
2016-02-13 22:48:09yselivanovsetrecipients: + yselivanov, gvanrossum, brett.cannon, ncoghlan, vstinner, asvetlov, martin.panter, André Caron
2016-02-13 22:48:09yselivanovsetmessageid: <1455403689.76.0.742268338169.issue25887@psf.upfronthosting.co.za>
2016-02-13 22:48:09yselivanovlinkissue25887 messages
2016-02-13 22:48:09yselivanovcreate