-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Correctly handle tracebackhide for chained exceptions #10772
Correctly handle tracebackhide for chained exceptions #10772
Conversation
* The test still assumed that Traceback.getcrashentry would return the last element from the traceback when all elements were hidden. However, that was erroneous behavior which was fixed in a583c68
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.
Great work on digging up that old issue! 😁
I left a comment, in addition to that could you also please:
-
Add yourself to the
AUTHORS
file. -
Add a changelog entry by creating a new file
changelog/1904.bugfix.rst
and describe the problem at the user level, for example:Correctly handle ``__tracebackhide__`` for chained exceptions.
Thanks!
for more information, see https://pre-commit.ci
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Thanks! Can you take a look at the mypy failures please? |
* that this was not possible caused test_config.test_parse_warning_filter_failure to fail
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.
Thanks!
I will leave this open for a few days in case others want to review.
…-dev#10772)" This reverts commit 431ec6d. Fix pytest-dev#10903. Reopen pytest-dev#1904.
Revert "Correctly handle tracebackhide for chained exceptions (#10772)"
[7.3.x] Revert "Correctly handle tracebackhide for chained exceptions (#10772)"
Closes #1904.
Fixes a bug that causes the last entry of a traceback to always be shown, even if it supposed to be hidden.
Also includes a unit test based on the suggestion from the issue discussion.
AUTHORS:
Felix Hofstätter