-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move PyErr_NormalizeException()
up a few lines
#3971
Move PyErr_NormalizeException()
up a few lines
#3971
Conversation
PyErr_NormalizeException()
up a few lines
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
|
Close-opening to re-trigger CI, hoping the GHA infrastructure failure was resolved in the meantime. |
@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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rwgk Is this still a draft PR?
No sorry, I keep forgetting to click the Ready for review button. |
LGTM, merge it. |
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.