Skip to content

Feature implementation: Option to truncate suppressed(aka "boring") frames in printed stack.#75

Open
tepedersen wants to merge 1 commit intocknd:masterfrom
tepedersen:truncate_boring
Open

Feature implementation: Option to truncate suppressed(aka "boring") frames in printed stack.#75
tepedersen wants to merge 1 commit intocknd:masterfrom
tepedersen:truncate_boring

Conversation

@tepedersen
Copy link
Copy Markdown

Implemented an option truncate_suppressed_frames for format_stack() which truncates any sequence of stack frames matching suppressed_paths into a minimal formatted entry for the first and last frame in the contiguous sequence of "boring"/suppressed frames, with a count of how many frames were suppressed inbetween. Created tests/source_boring.py and source_interesting.py to enable both a demo and tests of the new functionality.

…hich truncates any sequence of stack frames matching suppressed_paths into a minimal formatted entry for the first and last frame in the contiguous sequence of "boring"/suppressed frames, with a count of how many frames were suppressed inbetween. Created tests/source_boring.py and source_interesting.py to enable both a demo and tests of the new functionality.
Copy link
Copy Markdown
Author

@tepedersen tepedersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, found a bug while trying to use my fork in my current project. Looks like format_stack() also needs to take truncate_suppressed_frames=False as a kwarg. Will run some more tests to double check that it works with the python logging framework not just isolated using stackprinter.format()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant