Following #429, this PR makes the signature of CoroWrapper.throw compatible with gen.throw.
The signature of gen.throw is the same in python 3.3 - 3.5. Unless I'm missing something, the patch shouldn't change anything for the current implementation of asyncio, since throw is only called explicitly in Task:
https://github.com/python/asyncio/blob/master/asyncio/tasks.py#L241
Since the CoroWrapper class tries to emulate a regular coroutine/generator object I agree that this should be considered a bugfix. Can you add a unittest?
Following #429, this PR makes the signature of CoroWrapper.throw compatible with gen.throw.
The signature of gen.throw is the same in python 3.3 - 3.5. Unless I'm missing something, the patch shouldn't change anything for the current implementation of asyncio, since throw is only called explicitly in Task: https://github.com/python/asyncio/blob/master/asyncio/tasks.py#L241