[New-bugs-announce] [issue24867] Asyncio get_frame fails with native coroutines

David Griffin report at bugs.python.org
Fri Aug 14 17:26:22 CEST 2015


New submission from David Griffin:

I've been playing around with native coroutines and asyncio, and came across an issue with retrieving exceptions from tasks: The get_frame method on a Task in asyncio fails with an AttibuteError because it assumes that gi_frame as the attribute containing the stack frame; with native coroutines it's cr_frame.

I've attached a quick patch that just uses hasattr to see if gi_frame is present, and if not try cr_frame. This may not be the most elegant solution, but it does fix the issue. If there's any other stuff I can provide to help with this (within reason), just say the word.

----------
components: asyncio
files: fix_asyncio_task_get_frame.diff
keywords: patch
messages: 248589
nosy: David Griffin, gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: Asyncio get_frame fails with native coroutines
versions: Python 3.5
Added file: http://bugs.python.org/file40179/fix_asyncio_task_get_frame.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24867>
_______________________________________


More information about the New-bugs-announce mailing list