peps icon indicating copy to clipboard operation
peps copied to clipboard

PEP 9999: Add timestamps to exception tracebacks

Open gpshead opened this issue 4 months ago • 0 comments

This draft PEP proposes adding optional timestamps to Python exception objects that can be displayed in tracebacks. Based on CPython PR #129337 by Gregory P. Smith.

The feature adds a __timestamp_ns__ attribute to BaseException and allows configuration via environment variables or command-line options. This is particularly useful for debugging async applications with exception groups and distributed systems.

🤖 Generated with Claude Code (https://claude.ai/code)

[to be discussed at the ongoing cambridge core team sprint. discussed in room, now to go get some better motivation description and start a discuss thread to flesh this out] -gpshead


📚 Documentation preview 📚: https://pep-previews--4592.org.readthedocs.build/

gpshead avatar Sep 17 '25 09:09 gpshead