[issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw()

2021-12-08 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw()

2020-09-04 Thread miss-islington


miss-islington  added the comment:


New changeset e92219d8f864a1a8eb381d98d5df4f1aa767dacb by Miss Islington (bot) 
in branch '3.9':
bpo-29590: fix stack trace for gen.throw() with yield from (GH-19896)
https://github.com/python/cpython/commit/e92219d8f864a1a8eb381d98d5df4f1aa767dacb


--

___
Python tracker 

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



[issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw()

2020-09-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21191
pull_request: https://github.com/python/cpython/pull/22106

___
Python tracker 

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



[issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw()

2020-07-09 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +20565
pull_request: https://github.com/python/cpython/pull/21416

___
Python tracker 

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



[issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw()

2020-07-09 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 8b33961e4bc4020d8b2d5b949ad9d5c669300e89 by Chris Jerdonek in 
branch 'master':
bpo-29590: fix stack trace for gen.throw() with yield from (#19896)
https://github.com/python/cpython/commit/8b33961e4bc4020d8b2d5b949ad9d5c669300e89


--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw()

2020-05-19 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

I just filed a related issue to this that's also similar to issue 29587:
https://bugs.python.org/issue40694

--

___
Python tracker 

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



[issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw()

2020-05-04 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

I proposed a PR to fix this: https://github.com/python/cpython/pull/19896

--

___
Python tracker 

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



[issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw()

2020-05-04 Thread Chris Jerdonek


Change by Chris Jerdonek :


--
keywords: +patch
pull_requests: +19207
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19896

___
Python tracker 

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



[issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw()

2020-05-03 Thread Chris Jerdonek


Change by Chris Jerdonek :


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



[issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw()

2020-05-02 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



[issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw()

2017-04-11 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
components: +Interpreter Core

___
Python tracker 

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



[issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw()

2017-02-17 Thread Nathaniel Smith

New submission from Nathaniel Smith:

The attached script sets up a stack of generators calling each other via 'yield 
from': f yields from g yield from h. Then the generator at the bottom of the 
stack yields.

Before they yield, sys._getframe shows the expected stack (or if you put in 
traceback.print_stack() you get the same thing).

After they yield, it depends: if the generator is resumed via 'gen.send(None)', 
then the stack looks sensible. But if the generator is resumed via 
'gen.throw(...)', then the stack is weird: Objects/genobject.c:_gen_throw 
implements 'yield from' in an weird manual way, where it first directly resumes 
the innermost generator frame, and then propagates any result to the next 
generator frame, etc. So the output I get from the sample script is:

~$ python3.6 weird-throw-stack.py
-- f before yielding --
f

-- g before yielding --
g
f

-- h before yielding --
h
g
f

-- h after yielding --
h

-- g after yielding --
g

-- f after yielding --
f


This causes problems for stack-based profiling 
(https://github.com/vmprof/vmprof-python/issues/117), debuggers, and other 
tools that need to introspect the stack.

--
files: weird-throw-stack.py
messages: 288010
nosy: njs
priority: normal
severity: normal
status: open
title: Incorrect stack traces when re-entering a generator/coroutine stack via 
.throw()
versions: Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file46644/weird-throw-stack.py

___
Python tracker 

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