[issue39060] asyncio.Task.print_stack doesn't print the full stack

2019-12-16 Thread Amit Itzkovitch


New submission from Amit Itzkovitch :

Hi!
I think I found some issue in the "print_stack()" function of asyncio.Task.
When I try to print the stack of some task, I only see the first few lines of 
the stack. 
Attached an example file, that contains a recursive function that after 10 
calls prints the stack of the task. 
You can see that the stack that it prints only shows the first call of the 
recursive function, although you would expect to see it 10 times.

Tested on python3.7 and 3.8 on both MacOS and CentOS, the result is the same. 

Your help will be appreciated very much! :)

--
components: asyncio
files: example.py
messages: 358468
nosy: amit7itz, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.Task.print_stack doesn't print the full stack
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file48779/example.py

___
Python tracker 
<https://bugs.python.org/issue39060>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39060] asyncio.Task.print_stack doesn't print the full stack

2019-12-16 Thread Amit Itzkovitch


Amit Itzkovitch  added the comment:

In is mainly confusing because I expected this function to behave like 
"traceback.print_stack()", which prints the stack including all the awaits that 
lead to it.

--

___
Python tracker 
<https://bugs.python.org/issue39060>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39060] asyncio.Task.print_stack doesn't print the full stack

2019-12-22 Thread Amit Itzkovitch


Amit Itzkovitch  added the comment:

Hi Terry,
I guess the right place to update the Task.get_stack doc: 
https://docs.python.org/3/library/asyncio-task.html#asyncio.Task.get_stack

I'm not sure I know the terminology enough to phrase it right, but I would add 
there something like:
Note that the task's stack does not include the stack of coroutines that were 
awaited inside the task, as it is not part of the Task itself. 

But I am sure one of you can phrase it more professionally than me :)

--

___
Python tracker 
<https://bugs.python.org/issue39060>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com