-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
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
gh-102406: replace exception chaining by PEP-678 notes in codecs #102407
Conversation
CC @Zac-HD |
I'm not sure why wrapping of the codec errors was added in the first place. IMHO the encoding name and codec operation should be clear enough from the stacktrace. However using exception notes for that is definitiely an improvement. I fear that I can't review the patch in detail, as I'm no longer familiar with Python's C API. |
🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit af91411 🤖 If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
Misc/NEWS.d/next/Core and Builtins/2023-03-03-23-21-16.gh-issue-102406.XLqYO3.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
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.
Excellent cleanup!
Fixes #102406.
This replaces exception wrapping in codecs by PEP-678 notes.
Simplifies the code and removes the restrictions that prevent wrapping of exceptions that we cannot safely create copies of (because they have args or
__init__
overrides, etc).