Correctly handle tracebackhide for chained exceptions#10772
Merged
nicoddemus merged 8 commits intopytest-dev:mainfrom Mar 15, 2023
Merged
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
nicoddemus
requested changes
Mar 11, 2023
Member
nicoddemus
left a comment
There was a problem hiding this comment.
Great work on digging up that old issue! 😁
I left a comment, in addition to that could you also please:
-
Add yourself to the
AUTHORSfile. -
Add a changelog entry by creating a new file
changelog/1904.bugfix.rstand describe the problem at the user level, for example:Correctly handle ``__tracebackhide__`` for chained exceptions.
Thanks!
Co-authored-by: Bruno Oliveira <[email protected]>
Member
|
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
nicoddemus
approved these changes
Mar 13, 2023
Member
nicoddemus
left a comment
There was a problem hiding this comment.
Thanks!
I will leave this open for a few days in case others want to review.
bluetech
added a commit
to bluetech/pytest
that referenced
this pull request
Apr 12, 2023
…-dev#10772)" This reverts commit 431ec6d. Fix pytest-dev#10903. Reopen pytest-dev#1904.
bluetech
added a commit
that referenced
this pull request
Apr 13, 2023
Revert "Correctly handle tracebackhide for chained exceptions (#10772)"
bluetech
added a commit
that referenced
this pull request
Apr 13, 2023
[7.3.x] Revert "Correctly handle tracebackhide for chained exceptions (#10772)"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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