-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
TracebackException
swallows attributes of falsey Exception and falsey ExceptionGroup.
#132308
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
Comments
Output is:
As below, a wrong test must be change. Line 1159 in 255eb37
|
TracebackException
swallows __cause__
and __context__
attributes of falsey exceptions.TracebackException
swallows attributes of falsey Exception and falsey ExceptionGroup.
Thank you. Would you like to make a PR? |
picnixz
pushed a commit
that referenced
this issue
Apr 19, 2025
…lsey `Exception` or `ExceptionGroup` (#132363)
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Apr 19, 2025
…f a falsey `Exception` or `ExceptionGroup` (pythonGH-132363) (cherry picked from commit 69cda31) Co-authored-by: Duprat <yduprat@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug description:
Description
Ouptput is:
The Cause or Context descriptions are not printed as expected.
Where Does it from ?
These following tests are wrong.
cpython/Lib/traceback.py
Line 1123 in 255eb37
It should be:
if (e is not None and e.__cause__ is not None
cpython/Lib/traceback.py
Line 1144 in 255eb37
It should be:
if (e is not None and and e.__context__ is not None
Linked Issues
See: #132129
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
Linked PRs
TracebackException
swallows attributes of falseyException
and falseyExceptionGroup
#132363TracebackException
swallowing attributes of a falseyException
orExceptionGroup
(GH-132363) #132725The text was updated successfully, but these errors were encountered: