You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The traceback module does not colorize by default, contrary to its documentation #159661
This is incorrect. When the APIs documented in the traceback module documentation page are used as documented, the output is never colorized.
Bizarrely, this note was added in #127223, which had nothing to do with changing the behavior of the traceback module, and did not make any changes to it.
@pablogsal, in #142896 you stated that this functionality is intentionally not yet exposed to users of the traceback module. It has now been almost 3 years since this functionality landed for exceptions that reach the interpreter. Please explain why the module functionality is still private and what you intend to do to fix this.
Please explain why the module functionality is still private and what you intend to do to fix this.
Because I don't think color should be part of the public API of the traceback module. The interpreter uses it so it needs to deal with it but that doesn't mean we want to make it leak to the public API.
I don't intend to do anything to "fix" it because there isn't anything to fix. We can reconsider the decision (I don't think we should) but this is not a bug
Right. As I suspected, you don't have an actual reason. The few words you said here could be applied to anything.
I am not going to engage more with this argument.
Please keep this discussion respectful. Dismissing another contributor in this way is inappropriate. The PSF Code of Conduct asks us to respect others and their efforts, and to remain courteous when we disagree. You are welcome to challenge a technical decision, but please address the technical points without personal remarks.
The documentation mismatch you reported is valid, and I will correct it. Thank you for flagging it.
The cost of maintenance and backwards compatibility is a very important point. Locking this as you've already been asked to keep things civil and this isn't going anywhere.
Corrected the documentation in #159668, with backports merged for Python 3.15 in #159670 and Python 3.14 in #159671. The Python 3.13 documentation does not contain the incorrect note.
Activity
pablogsal commentedon Oct 18, 2026
Because I don't think color should be part of the public API of the traceback module. The interpreter uses it so it needs to deal with it but that doesn't mean we want to make it leak to the public API.
I don't intend to do anything to "fix" it because there isn't anything to fix. We can reconsider the decision (I don't think we should) but this is not a bug
atrigent commentedon Oct 18, 2026
Ok... Why?
pablogsal commentedon Oct 18, 2026
Because is not the trackback module concern and will be more difficult for us to maintain and change.
atrigent commentedon Oct 18, 2026
Right. As I suspected, you don't have an actual reason. The few words you said here could be applied to anything.
pablogsal commentedon Oct 18, 2026
I am not going to engage more with this argument.
Please keep this discussion respectful. Dismissing another contributor in this way is inappropriate. The PSF Code of Conduct asks us to respect others and their efforts, and to remain courteous when we disagree. You are welcome to challenge a technical decision, but please address the technical points without personal remarks.
The documentation mismatch you reported is valid, and I will correct it. Thank you for flagging it.
gh-159661: Remove incorrect traceback colorization documentation (#15…
atrigent commentedon Oct 18, 2026
Not a single thing you have said here even remotely resembles a "technical point", my dude.
[3.15] gh-159661: Remove incorrect traceback colorization documentati…
[3.14] gh-159661: Remove incorrect traceback colorization documentati…
hugovk commentedon Oct 18, 2026
The cost of maintenance and backwards compatibility is a very important point. Locking this as you've already been asked to keep things civil and this isn't going anywhere.
pablogsal commentedon Oct 18, 2026
Corrected the documentation in #159668, with backports merged for Python 3.15 in #159670 and Python 3.14 in #159671. The Python 3.13 documentation does not contain the incorrect note.