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 vstinner
Recipients giampaolo.rodola, gvanrossum, ncoghlan, pitrou, richard.kiss, vstinner, yselivanov
Date 2014-04-14.03:00:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1397444425.4.0.693772150108.issue21209@psf.upfronthosting.co.za>
In-reply-to
Content
I don't think that the bug comes from asyncio, but it looks like a bug in the implementation of "yield from" in CPython directly! Try with ceval.patch.

ceval.c has a fast path if the object is a generator. With PYTHONASYNCIODEBUG=1, the object is a CoroWrapper, not a generator. In this case, the slow path is used:

   retval = _PyObject_CallMethodId(reciever, &PyId_send, "O", v);

This line comes from the initial commit introducing yield-from:
---
changeset:   74356:d64ac9ab4cd0
user:        Nick Coghlan <ncoghlan@gmail.com>
date:        Fri Jan 13 21:43:40 2012 +1000
files:       Doc/library/dis.rst Doc/library/exceptions.rst Doc/reference/expressions.rst Doc/reference/simple_stmts.rst Doc/whatsnew/3.
description:
Implement PEP 380 - 'yield from' (closes #11682)
---
(The exact line changed and the line was moved, but "O" format didn't change.)

Still no unit test, I'm too tired to write one, and I'm not sure that it's a bug in ceval.c.
History
Date User Action Args
2014-04-14 03:00:25vstinnersetrecipients: + vstinner, gvanrossum, ncoghlan, pitrou, giampaolo.rodola, yselivanov, richard.kiss
2014-04-14 03:00:25vstinnersetmessageid: <1397444425.4.0.693772150108.issue21209@psf.upfronthosting.co.za>
2014-04-14 03:00:25vstinnerlinkissue21209 messages
2014-04-14 03:00:24vstinnercreate