Skip to content

Conversation

@choieastsea
Copy link

Overview

  • Accept negative stack_trace_limit value and pass through to traceback.format_tb() since it supports negative limits for collecting last frames.
  • Update stdlib formatter tests to cover both positive and negative limits.

Additional Context

  • Aligns with Python traceback behavior (limit < 0 means last N frames)

@cla-checker-service
Copy link

cla-checker-service bot commented Jan 22, 2026

💚 CLA has been signed

@github-actions
Copy link

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@github-actions
Copy link

github-actions bot commented Jan 22, 2026

🔍 Preview links for changed docs

@choieastsea
Copy link
Author

Hi, I’m using this library for production and would like to capture only the most recent error frames.

Since stdlibformatter passes the value through to Python’s traceback, which already supports negative limits to mean “last N frames,” it felt reasonable to allow a negative stack_trace_limit here as well. Please let me know if you’d prefer a different approach.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant