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-132308:TracebackException swallows attributes of falseyException and falseyExceptionGroup#132363

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

Conversation

@YvesDup
Copy link
Contributor

@YvesDupYvesDup commentedApr 10, 2025
edited by bedevere-appbot
Loading

Summary

Anx is falsey iflen(x) returns 0 orbool(x) returns False

TracebackException class swallows the following attributes of falsey Exception:

  • __cause__
  • __context__

TracebackException swallows all sub-exceptions of falsey ExceptionGroup

The fix is located in the__init__ method of theTracebackException class.

@picnixzpicnixz self-assigned thisApr 19, 2025
@picnixzpicnixzenabled auto-merge (squash)April 19, 2025 08:50
@picnixzpicnixz merged commit69cda31 intopython:mainApr 19, 2025
39 checks passed
@brianschubert
Copy link
Member

@picnixz backport to 3.13?

@picnixzpicnixz added the needs backport to 3.13bugs and security fixes labelApr 19, 2025
@miss-islington-app
Copy link

Thanks@YvesDup for the PR, and@picnixz for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@picnixz
Copy link
Member

Yes, I forgot about it :') Thanks for the reminder

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestApr 19, 2025
…f a falsey `Exception` or `ExceptionGroup` (pythonGH-132363)(cherry picked from commit69cda31)Co-authored-by: Duprat <yduprat@gmail.com>
@bedevere-app
Copy link

GH-132725 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelApr 19, 2025
@YvesDup
Copy link
ContributorAuthor

@picnixz FYI the backportGH-132725 is not merged. Do I wait for to delete my branch ?

@picnixz
Copy link
Member

No it's fine. I'm on my way to the airport, I'll merge it in a few hours. Thanks for the reminder!

YvesDup reacted with thumbs up emoji

picnixz pushed a commit that referenced this pull requestApr 30, 2025
…of a falsey `Exception` or `ExceptionGroup` (GH-132363) (#132725)gh-132308: prevent `TracebackException` swallowing attributes of a falsey `Exception` or `ExceptionGroup` (GH-132363)(cherry picked from commit69cda31)Co-authored-by: Duprat <yduprat@gmail.com>
@YvesDupYvesDup deleted the TracebackException-swallows-cause-context-flasey-exception branchMay 22, 2025 17:02
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@picnixzpicnixzpicnixz approved these changes

@brianschubertbrianschubertbrianschubert left review comments

Assignees

@picnixzpicnixz

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@YvesDup@brianschubert@picnixz

[8]ページ先頭

©2009-2025 Movatter.jp