GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||
GeezerVison is showing github.com — bpo-45607: Make it possible to enrich exception displays via setting their __note__ field by iritkatriel · Pull Request #29880 · python/cpython Conversation
|
|
Should I add PyException_GetNote and PyException_SetNote to the c api? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Nice feature! LGTM. I found one path not covered by the test suite. I of course also left some pedantic PEP-7 comments 🤓
(BTW, I still find the error handling in pythonrun.c hard to read... and it generates so many indent levels 😕)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Erlend Egeberg Aasland <[email protected]>
Co-authored-by: Erlend Egeberg Aasland <[email protected]>
Co-authored-by: Erlend Egeberg Aasland <[email protected]>
Co-authored-by: Erlend Egeberg Aasland <[email protected]>
|
Thanks.
I'm working on it. I made a patch that changed so much it would take a year to review. I'll break it up. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Nice! LGTM, but please fix the issues Erlend brought up.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I did all of them except the test coverage for the error when passing NULL to the setter. This would only come into play if I add PyException_GetNote and PyException_SetNote to the C api. I think we need those, right? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I think we should not add to the C API. If people want to access the note from C, they can use the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ah yes, very good: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
That behavior is fine. So do you have a unit test for that? If not, it
should be easy to add one.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I don’t, I’ll add one. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
+1
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.