Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
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
gh-132308:TracebackException swallows attributes of falseyException and falseyExceptionGroup#132363
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Misc/NEWS.d/next/Library/2025-04-10-13-06-42.gh-issue-132308.1js5SI.rst OutdatedShow resolvedHide resolved
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.
Misc/NEWS.d/next/Library/2025-04-10-13-06-42.gh-issue-132308.1js5SI.rst OutdatedShow resolvedHide resolved
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.
Misc/NEWS.d/next/Library/2025-04-10-13-06-42.gh-issue-132308.1js5SI.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Misc/NEWS.d/next/Library/2025-04-10-13-06-42.gh-issue-132308.1js5SI.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
69cda31 intopython:mainUh oh!
There was an error while loading.Please reload this page.
@picnixz backport to 3.13? |
Yes, I forgot about it :') Thanks for the reminder |
…f a falsey `Exception` or `ExceptionGroup` (pythonGH-132363)(cherry picked from commit69cda31)Co-authored-by: Duprat <yduprat@gmail.com>
GH-132725 is a backport of this pull request to the3.13 branch. |
No it's fine. I'm on my way to the airport, I'll merge it in a few hours. Thanks for the reminder! |
Uh oh!
There was an error while loading.Please reload this page.
Summary
An
xis falsey iflen(x)returns 0 orbool(x)returns FalseTracebackExceptionclass swallows the following attributes of falsey Exception:__cause____context__TracebackExceptionswallows all sub-exceptions of falsey ExceptionGroupThe fix is located in the
__init__method of theTracebackExceptionclass.TracebackExceptionswallows attributes of falsey Exception and falsey ExceptionGroup. #132308