Uh oh!
There was an error while loading. Please reload this page.
bpo-29587: Enable implicit exception chaining with gen.throw() - #19811
Conversation
Before this commit, if an exception was active inside a generator when calling gen.throw(), then that exception was lost (i.e. there was no implicit exception chaining). This commit fixes that.
gvanrossum
left a comment
There was a problem hiding this comment.
Looks good to me. I think we should just land this -- if there's something wrong with it we'll shake it out during beta, but it looks likely that it's correct. Thanks for fixing this old bug!
gvanrossum
commented
Apr 30, 2020
Closing and reopening to re-trigger Azures CI build (that was unstable a while ago, should be better now). |
gvanrossum
commented
Apr 30, 2020
Whatever; the required tests pass, as do the non-Azure tests. I'll just land. |
bedevere-bot
commented
Apr 30, 2020
|
bedevere-bot
commented
Apr 30, 2020
|
bedevere-bot
commented
Apr 30, 2020
|
bedevere-bot
commented
Apr 30, 2020
|
bedevere-bot
commented
Apr 30, 2020
|
bedevere-bot
commented
Apr 30, 2020
|
bedevere-bot
commented
Apr 30, 2020
|
bedevere-bot
commented
Apr 30, 2020
|
bedevere-bot
commented
Apr 30, 2020
|
bedevere-bot
commented
Apr 30, 2020
|
bedevere-bot
commented
Apr 30, 2020
|
bedevere-bot
commented
Apr 30, 2020
|
bedevere-bot
commented
Apr 30, 2020
|
bedevere-bot
commented
Apr 30, 2020
|
gvanrossum
commented
Apr 30, 2020
All these tests pass for me locally, except test_idle which fails because I don't have the right Tcl/Tk installed. What to do? |
vstinner
commented
Apr 30, 2020
It seems like this change broke tons of buildbots, whereas tests passed on the PR, except on the Ubuntu job of Azure Pipelines.
Either fix it, or revert it. Depending on your availability :-) |
bedevere-bot
commented
Apr 30, 2020
|
bedevere-bot
commented
Apr 30, 2020
|
bedevere-bot
commented
Apr 30, 2020
|
bedevere-bot
commented
Apr 30, 2020
|
bedevere-bot
commented
Apr 30, 2020
|
Before this commit, if an exception was active inside a generator when calling gen.throw(), then that exception was lost (i.e. there was no implicit exception chaining). This commit fixes that.
This enables implicit exception chaining when calling
generator.throw(exc)by settingexc.__context__.This is a naive attempt at fixing this, so I could very well be missing something.
https://bugs.python.org/issue29587