classification
Title: CoroWrapper breaks gen.throw
Type: crash Stage: resolved
Components: asyncio Versions: Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Chris Seto, gvanrossum, mikenerone, vstinner, yselivanov
Priority: normal Keywords: patch

Created on 2015-10-13 17:32 by Chris Seto, last changed 2017-11-30 16:24 by vstinner. This issue is now closed.

Files
File name Uploaded Description Edit
example.py Chris Seto, 2015-10-13 17:32 Example code snippet that crashes
corowrapper.diff Chris Seto, 2015-10-13 17:40 Diff that address the referenced problem review
Messages (3)
msg252942 - (view) Author: Chris Seto (Chris Seto) * Date: 2015-10-13 17:32
When asyncio.coroutines._DEBUG is set to True all coroutines are wrapped in a CoroWrapper.
The definition of CoroWrapper.throw only excepts a single argument, exc.
It should accept an exception info tuple as returned from sys.exc_info just as normal generators do.
msg307323 - (view) Author: Mike Nerone (mikenerone) Date: 2017-11-30 16:03
This was fixed in Python 3.6. See https://github.com/python/asyncio/issues/429
msg307327 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-11-30 16:24
Sadly, Python 3.5 doesn't accept bugfixes anymore (only security fixes), so I close this issue.

Happy to read that a bug was fixed in Python 3.6 ;-)

FYI the fix was copied from the GitHub asyncio project to CPython in the commit e3c65a7a228a5808a7af48a47fdd77e982f95d00.
History
Date User Action Args
2017-11-30 16:24:57vstinnersetstatus: open -> closed
versions: - Python 3.5
messages: + msg307327

resolution: fixed
stage: resolved
2017-11-30 16:03:30mikeneronesetnosy: + mikenerone
messages: + msg307323
2015-10-13 17:40:14Chris Setosetfiles: + corowrapper.diff
keywords: + patch
2015-10-13 17:32:29Chris Setocreate