gh-89770: Implement PEP-678 - Exception notes#31317
Conversation
…le of the assigned notes
|
🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit 1555087 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
Sorry, something went wrong.
This reverts commit 7bab63e.
… a sequence of strings
gvanrossum
left a comment
There was a problem hiding this comment.
Where's the descriptor for "__notes__"?
Sorry, something went wrong.
gvanrossum
left a comment
There was a problem hiding this comment.
"Errors should never pass silently."
Sorry, something went wrong.
|
Yeah, I like this! |
Sorry, something went wrong.
|
How about error handling when printing the traceback? Should we print something like "cannot print notes: not a sequence", and similarly if a note is not a str? |
Sorry, something went wrong.
How about printing If either of those fails, either raise an exception from |
Sorry, something went wrong.
I'll do something like what we do for str(exc). |
Sorry, something went wrong.
|
Heya - I think we should have an explicit test that if you |
Sorry, something went wrong.
That's a good point. I added the test and fixed the code to copy the notes in split(), so long as they are a sequence (producing a list). If people assign arbitrary objects to notes I don't know how to copy them. |
Sorry, something went wrong.
|
🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit 95be670 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
Sorry, something went wrong.
|
Sorry about the noise (I messed it up multitasking). Getting there now. |
Sorry, something went wrong.
|
🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit 602b4c4 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
Sorry, something went wrong.
|
The buildbots are happy with this. Let me know if you would like to re-review, otherwise I'll merge it tomorrow or so. |
Sorry, something went wrong.
serhiy-storchaka
left a comment
There was a problem hiding this comment.
Opened #106033.
Sorry, something went wrong.
No description provided.