]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-29590: fix stack trace for gen.throw() with yield from (GH-19896)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 4 Sep 2020 23:07:18 +0000 (16:07 -0700)
committerGitHub <noreply@github.com>
Fri, 4 Sep 2020 23:07:18 +0000 (16:07 -0700)
commite92219d8f864a1a8eb381d98d5df4f1aa767dacb
tree737d03df4becc2a6c348b6a2940828266f75cd61
parent106c1df736d38f5b411a8571b97275d0ecf1d0a9
bpo-29590: fix stack trace for gen.throw() with yield from (GH-19896)

* Add failing test.

* bpo-29590: fix stack trace for gen.throw() with yield from (GH-NNNN)

When gen.throw() is called on a generator after a "yield from", the
intermediate stack trace entries are lost.  This commit fixes that.
(cherry picked from commit 8b33961e4bc4020d8b2d5b949ad9d5c669300e89)

Co-authored-by: Chris Jerdonek <chris.jerdonek@gmail.com>
Lib/test/test_generators.py
Misc/NEWS.d/next/Core and Builtins/2020-05-03-22-26-00.bpo-29590.aRz3l7.rst [new file with mode: 0644]
Objects/genobject.c