Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.

make CoroWrapper.throw fully compatible with gen.throw - #430

Merged
gvanrossum merged 2 commits into
python:masterfrom
Martiusweb:corowrapper_throw_args
Sep 30, 2016
Merged

gvanrossum merged 2 commits into
python:masterfrom
Martiusweb:corowrapper_throw_args

Conversation

@Martiusweb

Copy link
Copy Markdown
Member

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

@gvanrossum

Copy link
Copy Markdown
Member

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?

@gvanrossum
gvanrossum merged commit 51dabc4 into python:master Sep 30, 2016
@gvanrossum

Copy link
Copy Markdown
Member

Thanks! Looking forward to more from you.

@Martiusweb
Martiusweb deleted the corowrapper_throw_args branch October 4, 2016 09:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants