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

2020-05-18 Thread Chris Jerdonek


Change by Chris Jerdonek :


--
nosy: +chris.jerdonek

___
Python tracker 

___
___
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 

___
___
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-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Amit, is there a simple doc change that would have made the result clearer? 
(before getting Andrew's response?)

--
nosy: +terry.reedy
versions: +Python 3.8, Python 3.9

___
Python tracker 

___
___
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 

___
___
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 Andrew Svetlov


Andrew Svetlov  added the comment:

Technically the output is correct: a stack for async function call doesn't 
contain the outer async function that is used for awaiting.

Agree, it may sound confusing, but `await f()` is not the same as just `f()`.

Perhaps we can provide *alternative* API for retrieving async call stack.

--

___
Python tracker 

___
___
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


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 

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