[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-16 Thread Chris Jerdonek
Chris Jerdonek added the comment: New changeset d7184d3dbd249444ec3961641dc08a9ad3c1ac34 by Chris Jerdonek in branch 'master': bpo-29587: Add another test for the gen.throw() fix. (GH-19859) https://github.com/python/cpython/commit/d7184d3dbd249444ec3961641dc08a9ad3c1ac34 --

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-13 Thread Chris Jerdonek
Chris Jerdonek added the comment: New changeset 75cd8e48c62c97fdb9d9a94fd2335be06084471d by Chris Jerdonek in branch 'master': bpo-29587: Make gen.throw() chain exceptions with yield from (GH-19858) https://github.com/python/cpython/commit/75cd8e48c62c97fdb9d9a94fd2335be06084471d

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: Would someone be able to approve / take a look at this small PR addressing another aspect of this issue? https://github.com/python/cpython/pull/19858 I'm hoping it can be part of 3.9, and the deadline is just a week away. It builds on the already merged PR

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-06 Thread Chris Jerdonek
Change by Chris Jerdonek : -- pull_requests: +19266 pull_request: https://github.com/python/cpython/pull/19858 ___ Python tracker ___

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-05 Thread STINNER Victor
STINNER Victor added the comment: New changeset b0be6b3b94fbdf31b796adc19dc86a04a52b03e1 by Victor Stinner in branch 'master': bpo-29587: _PyErr_ChainExceptions() checks exception (GH-19902) https://github.com/python/cpython/commit/b0be6b3b94fbdf31b796adc19dc86a04a52b03e1 --

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-04 Thread STINNER Victor
STINNER Victor added the comment: tl; dr I wrote PR 19902 to remove the "XXX" comment. -- Commit 21893fbb74e8fde2931fbed9b511e2a41362b1ab adds the following code: /* XXX It seems like we shouldn't have to check not equal to Py_None here because exc_type should only ever be a

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-04 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +19216 pull_request: https://github.com/python/cpython/pull/19902 ___ Python tracker ___

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: Since none of you are subscribed to the other issue except for Nathaniel, I thought I'd let you know I also posted a PR to fix another issue he filed similar to this one (but this time about the stack trace being incorrect for `gen.throw()` in certain

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-03 Thread Chris Jerdonek
Chris Jerdonek added the comment: New changeset 21893fbb74e8fde2931fbed9b511e2a41362b1ab by Chris Jerdonek in branch 'master': bpo-29587: allow chaining NULL exceptions in _gen_throw() (GH-19877) https://github.com/python/cpython/commit/21893fbb74e8fde2931fbed9b511e2a41362b1ab --

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-02 Thread Chris Jerdonek
Chris Jerdonek added the comment: Okay, I was able to remove the NULL value check and get things working with a NULL exception value. I just posted a second follow-on PR that does this (which Guido approved - thanks, Guido!): https://github.com/python/cpython/pull/19877 I wanted to tell you

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-02 Thread Chris Jerdonek
Change by Chris Jerdonek : -- pull_requests: +19189 pull_request: https://github.com/python/cpython/pull/19877 ___ Python tracker ___

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-02 Thread Chris Jerdonek
Chris Jerdonek added the comment: FYI, I was able to finish addressing the other exception-chaining cases (the ones covered by the other issue) with a simple change to the fix for this PR. I moved the call to _PyErr_ChainExceptions() a bit deeper: into gen_send_ex() before the call to

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-02 Thread Chris Jerdonek
Chris Jerdonek added the comment: FYI, I just created a PR to add one more test to the prior fix, to test a slightly different aspect. Whereas the test in the first PR checks that exc.__context__ is set after gen.throw() is finished, the new test checks that exc.__context__ is available

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-02 Thread Chris Jerdonek
Change by Chris Jerdonek : -- pull_requests: +19175 pull_request: https://github.com/python/cpython/pull/19859 ___ Python tracker ___

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-01 Thread Guido van Rossum
Guido van Rossum added the comment: Wow, thanks all! FWIW I agree that ideally things should work with a NULL value... -- --Guido (mobile) -- ___ Python tracker ___

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-01 Thread Chris Jerdonek
Chris Jerdonek added the comment: Okay, thanks everyone. I think I'll take a look at issue 40466 next. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-01 Thread Chris Jerdonek
Chris Jerdonek added the comment: New changeset 02047265eb83a43ba18cc7fee81756f1a1a1f968 by Chris Jerdonek in branch 'master': bpo-29587: Update gen.throw() to chain exceptions (#19823) https://github.com/python/cpython/commit/02047265eb83a43ba18cc7fee81756f1a1a1f968 --

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-01 Thread Chris Jerdonek
Chris Jerdonek added the comment: By the way, I just posted a new issue about exception chaining getting suppressed, but this time in an asyncio setting with ensure_future(): https://bugs.python.org/issue40466 I first noticed this issue two or three years ago and raised it on the async-sig

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-01 Thread Chris Jerdonek
Chris Jerdonek added the comment: Okay, I was able to get the tests passing on the other platforms. I'm still not sure why Mac and Fedora behaved differently with my original PR. I was able to come up with a simple script that isolated the behavior difference (posted in the PR comments).

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-04-30 Thread Guido van Rossum
Guido van Rossum added the comment: Could it be running out of memory due to excessive chaining of tracebacks? (And yes, it's 3.9 only.) -- ___ Python tracker ___

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-04-30 Thread Yury Selivanov
Yury Selivanov added the comment: IMO this is a 3.9 fix. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-04-30 Thread Ned Deily
Ned Deily added the comment: Whatever the resolution of this is, it seems to me that this sort of behavior change should not be introduced at this stage of 3.7.x's life. Whether it should go into 3.8.x should be Ɓukasz's call once the final change is in master and has stabilized.

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-04-30 Thread Chris Jerdonek
Change by Chris Jerdonek : -- pull_requests: +19143 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/19823 ___ Python tracker ___

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-04-30 Thread Chris Jerdonek
Chris Jerdonek added the comment: > Oh, no! Buildbot failures. Help?! Yes, I'm sorry. There's something not so simple going on that I haven't yet reproduced locally. Will reply on the tracker. -- ___ Python tracker

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-04-30 Thread STINNER Victor
STINNER Victor added the comment: > Sorry, I had to revert this change since it broke like 41+ buildbots: (...) If someone wants to investigate, you can find examples of failed buildbot builds at: https://github.com/python/cpython/pull/19811 --

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-04-30 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: fixed -> status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-04-30 Thread STINNER Victor
STINNER Victor added the comment: > bpo-29587: Enable implicit exception chaining with gen.throw() (GH-19811) > https://github.com/python/cpython/commit/2514a632fb7d37be24c2059d0e286d35600f9795 Sorry, I had to revert this change since it broke like 41+ buildbots:

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-04-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset 3c7f9db85095952821f9d106dd874f75662ce7ec by Victor Stinner in branch 'master': Revert "bpo-29587: Enable implicit exception chaining with gen.throw() (GH-19811)" (#19821)

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-04-30 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner nosy_count: 6.0 -> 7.0 pull_requests: +19141 pull_request: https://github.com/python/cpython/pull/19821 ___ Python tracker ___

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-04-30 Thread Guido van Rossum
Guido van Rossum added the comment: Oh, no! Buildbot failures. Help?! -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-04-30 Thread Guido van Rossum
Guido van Rossum added the comment: Example 1 is now fixed too by Chris Jerdonek's PR 19811. Thanks Chris! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-04-30 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 2514a632fb7d37be24c2059d0e286d35600f9795 by Chris Jerdonek in branch 'master': bpo-29587: Enable implicit exception chaining with gen.throw() (GH-19811) https://github.com/python/cpython/commit/2514a632fb7d37be24c2059d0e286d35600f9795

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-04-30 Thread Chris Jerdonek
Chris Jerdonek added the comment: I made a naive attempt at addressing this issue here: https://github.com/python/cpython/pull/19811 The code has diverged significantly since Nathaniel first linked to a specific line above. However, what I came up with is simple, and seems to work. But I

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-04-30 Thread Chris Jerdonek
Change by Chris Jerdonek : -- keywords: +patch pull_requests: +19131 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19811 ___ Python tracker ___

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2017-11-13 Thread Yury Selivanov
Yury Selivanov added the comment: Guido, The second example ("No active exception to reraise") was an actual long open bug. It was recently fixed by Mark Shannon in [1]. I think we should be able to fix the first case (missing __context__) although it's not critical.

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2017-11-11 Thread Guido van Rossum
Guido van Rossum added the comment: Yury do you agree this is a bug? Do you have any ideas on how to fix it? -- nosy: +gvanrossum, yselivanov ___ Python tracker

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2017-11-11 Thread Hynek Schlawack
Change by Hynek Schlawack : -- nosy: +hynek ___ Python tracker ___ ___ Python-bugs-list mailing

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2017-11-11 Thread Chris Jerdonek
Change by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker ___ ___

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2017-02-17 Thread Martin Panter
Martin Panter added the comment: The second example seems like the original complaint in Issue 25612. That spawned a separate bug related to the first situation, which was later closed: Issue 25683. -- nosy: +martin.panter type: -> behavior ___

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2017-02-17 Thread Nathaniel Smith
New submission from Nathaniel Smith: Example 1: --- def f(): try: raise KeyError except Exception: yield gen = f() gen.send(None) gen.throw(ValueError) - Output: Traceback (most recent call last): File "", line 1, in File "", line 5, in f