-
Notifications
You must be signed in to change notification settings - Fork 782
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
Unwrap dynamic error types when inner is simple PyErr
#3004
Conversation
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.
Thanks! I think this is a nice improvement with minimal effort.
@mejrs Will wait for your feedback before merging as you sounded unsure whether this is a sensible thing to do in the issue. |
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.
While I think this change is strictly an improvement, I'd like to quickly take a moment to think about how we document this and / or provide backwards compatibility.
Changing the error type observed here may catch some users out. Probably module docs need updating. Should this go in the migration guide?
First time contributor has agreed to the new licensing scheme. |
I have nothing, feel free to merge as you wish :) |
@BlueGlassBlock You would be up to writing an entry for the migration guide showing the difference when forwarding errors using |
Certainly! |
Thanks for drafting the migration guide entry. Please remember to adjust the existing module-level docs in |
@davidhewitt I think this better positioned now w.r.t. the above concerns and therefore ready to be merged. Do you agree? |
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.
Yep this looks great to me now, thanks! I'll squash and merge this now.
bors r=davidhewitt,adamreichold,mejrs |
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page.
|
This is the first part of suggested improvements in #2998.
This change will make bubbled
PyErr
wrapped ineyre::Report
/anyhow::Error
bubble up unchanged, instead of being wrapped in aPyRuntimeError
.