Uh oh!
There was an error while loading. Please reload this page.
bpo-45607: Make it possible to enrich exception displays via setting their __note__ field - #29880
Conversation
iritkatriel
commented
Dec 1, 2021
Should I add PyException_GetNote and PyException_SetNote to the c api? |
erlend-aasland
left a comment
There was a problem hiding this comment.
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 😕)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
iritkatriel
commented
Dec 2, 2021
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. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
gvanrossum
left a comment
There was a problem hiding this comment.
Nice! LGTM, but please fix the issues Erlend brought up.
iritkatriel
commented
Dec 3, 2021
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? |
gvanrossum
commented
Dec 3, 2021
I think we should not add to the C API. If people want to access the note from C, they can use the |
iritkatriel
commented
Dec 3, 2021
Ah yes, very good: |
gvanrossum
commented
Dec 3, 2021
via email
That behavior is fine. So do you have a unit test for that? If not, it
should be easy to add one. |
iritkatriel
commented
Dec 3, 2021
I don’t, I’ll add one. |
https://bugs.python.org/issue45607