Sorry, something went wrong.
|
PyErr_Display is not documented, but it is mentioned in the stable abi file: Doc/data/stable_abi.dat:function,PyErr_Display,3.2,, I'm not sure what this means for PyErr_DisplayException. |
Sorry, something went wrong.
|
It looks to me as if PyErr_Display is some sort of internal debugging function. Does git blame tell you anything about why it was added to the stable ABI? |
Sorry, something went wrong.
|
It looks to me as if PyErr_Display is some sort of internal debugging function. It's what prints traceback when an uncaught exception occurs in the repl or in a script, (it's what the default sys.excepthook uses) so I'd hardly call it internal. It is the standard way of producing a standard formatted exception from C. |
Sorry, something went wrong.
There was a problem hiding this comment.
Nice cleanup!
Sorry, something went wrong.
| /*[clinic end generated code: output=18d99fdda21b6b5e input=ecf606fa826f19d9]*/ | ||
| { | ||
| PyErr_Display(exctype, value, traceback); | ||
| PyErr_Display(NULL, value, traceback); |
There was a problem hiding this comment.
So this will hit the case where PyErr_Display() stuffs the given traceback onto the exception if the latter doesn't already have one? (Else why not use PyErr_DisplayException(), right?)
Sorry, something went wrong.
There was a problem hiding this comment.
Exactly. This is sys.excepthook() which anyone can call so we need to deprecate the case where traceback != value.__traceback__ before we can use PyErr_DisplayException here. (And eventually go through some kind of migration exercise for excepthook's signature, but let's survive the __exit__ discussion first).
Sorry, something went wrong.
|
🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit ab84a68 🤖 If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
Sorry, something went wrong.
|
All good |
Sorry, something went wrong.
Fixes #102755.