Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-102406: replace exception chaining by PEP-678 notes in codecs#102407

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
iritkatriel merged 7 commits intopython:mainfromiritkatriel:codecs-exc
Mar 21, 2023

Conversation

iritkatriel
Copy link
Member

@iritkatrieliritkatriel commentedMar 3, 2023
edited
Loading

Fixes#102406.

This replaces exception wrapping in codecs byPEP-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).

@iritkatrieliritkatriel added type-featureA feature request or enhancement interpreter-core(Objects, Python, Grammar, and Parser dirs) 3.12only security fixes labelsMar 3, 2023
@iritkatrieliritkatriel changed the titlegh-102406: replace exception wrapping by PEP-678 notesgh-102406: replace exception wrapping by PEP-678 notes in codecsMar 3, 2023
@iritkatriel
Copy link
MemberAuthor

CC@Zac-HD

Zac-HD reacted with thumbs up emojiZac-HD reacted with heart emojiZac-HD reacted with rocket emoji

@iritkatrieliritkatriel changed the titlegh-102406: replace exception wrapping by PEP-678 notes in codecsgh-102406: replace exception chaining by PEP-678 notes in codecsMar 3, 2023
@doerwalter
Copy link
Contributor

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.

iritkatriel and malemburg reacted with thumbs up emoji

@iritkatrieliritkatriel added the 🔨 test-with-refleak-buildbotsTest PR w/ refleak buildbots; report in status section labelMar 21, 2023
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@iritkatriel for commitaf91411 🤖

If you want to schedule another build, you need to add the🔨 test-with-refleak-buildbots label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-refleak-buildbotsTest PR w/ refleak buildbots; report in status section labelMar 21, 2023
@gpsheadgpshead self-requested a reviewMarch 21, 2023 20:06
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Copy link
Member

@gpsheadgpshead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Excellent cleanup!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@erlend-aaslanderlend-aaslanderlend-aasland approved these changes

@gpsheadgpsheadgpshead approved these changes

@markshannonmarkshannonAwaiting requested review from markshannon

@malemburgmalemburgAwaiting requested review from malemburg

@doerwalterdoerwalterAwaiting requested review from doerwalter

@serhiy-storchakaserhiy-storchakaAwaiting requested review from serhiy-storchaka

@ncoghlanncoghlanAwaiting requested review from ncoghlan

Assignees
No one assigned
Labels
3.12only security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

codecs can use PEP-678 notes instead of wrapping/chaining exceptions
5 participants
@iritkatriel@doerwalter@bedevere-bot@gpshead@erlend-aasland

[8]ページ先頭

©2009-2025 Movatter.jp