New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Asyncio Task.get_stack fails with native coroutines #69055
Comments
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. |
It should be noted that when I said get_frame in the original comment, I actually meant get_stack |
New changeset 53d2a7c023bc by Yury Selivanov in branch '3.4': New changeset d25022765186 by Yury Selivanov in branch '3.5': New changeset c0b7829e3074 by Yury Selivanov in branch 'default': |
Looks like we didn't have unittests for Task.get_stack()/Task.print_stack(). Anyways, it's now fixed, I'll make a PR for Larry to get this in 3.5.0rc2. |
Pull request accepted and merged. |
New changeset 595614c08eeb by Yury Selivanov in branch '3.5': New changeset 9b28f41f1353 by Larry Hastings in branch '3.5': New changeset ad48d5a4ef40 by Larry Hastings in branch '3.5': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: