Uh oh!
There was an error while loading. Please reload this page.
Move PyErr_NormalizeException() up a few lines - #3971
Conversation
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.
PyErr_NormalizeException() up a few linesrwgk
commented
May 25, 2022
Looks like a GHA infrastructure bug popped up in the few minutes between the last two CI runs. I'll try again a little later, but the only thing that changed was the extra |
rwgk
commented
May 25, 2022
Close-opening to re-trigger CI, hoping the GHA infrastructure failure was resolved in the meantime. |
rwgk
commented
May 25, 2022
@Skylion007 thanks for your suggestions, they are applied now. I also answered the question about the PyPy segfault (yes, even without the production code change). The CI is green again. Could you please take another look? |
Skylion007
left a comment
There was a problem hiding this comment.
@rwgk Is this still a draft PR?
rwgk
commented
May 26, 2022
No sorry, I keep forgetting to click the Ready for review button. |
Skylion007
commented
May 26, 2022
LGTM, merge it. |
rwgk
commented
May 26, 2022
Thanks, done! I'll work on updating #1895 (I assume there will be merge conflicts). |
Description
The only production code change is to move
PyErr_NormalizeException()up a few lines indetail::error_string().The 1st commit (e564142) purely adds test coverage, without making changes to the production code. This effectively documents the current
error_already_set::what()behavior.The 2nd commit (254bfeb) moves
PyErr_NormalizeException()up a few lines indetail::error_string()and adjusts the new tests accordingly, effectively documenting the behavior change, which can be summarized as:Note that all existing tests pass as-is! Only the newly added tests need adjustments.
Background: The production code change was adopted from PR #3964. The new tests are based on similar code under PR #1895. PR #1895 has several behavior changes. This PR handles one behavior change in isolation, for easier review and a clearer development history.
Suggested changelog entry:
``error_already_set::what()`` now handles non-normalized exceptions correctly.