Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
bpo-29587: Enable implicit exception chaining with gen.throw()#19811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Conversation
cjerdonek commented Apr 30, 2020 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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