Skip to content

Strip ANSI colors from reported tracebacks - #827

Merged
zware merged 1 commit into
python:mainfrom
StanFromIreland:ansi-tb
Nov 3, 2026
Merged

zware merged 1 commit into
python:mainfrom
StanFromIreland:ansi-tb

Conversation

@StanFromIreland

Copy link
Copy Markdown
Member

For example, see this report:

image

I suggest we strip the ANSI colors to make it readable.

@zware
zware merged commit 264e7ed into python:main Nov 3, 2026
1 check passed
@StanFromIreland
StanFromIreland deleted the ansi-tb branch November 3, 2026 17:50
@vstinner

vstinner commented Nov 3, 2026

Copy link
Copy Markdown
Member

I was annoyed by ANSI sequence, so thanks for the fix. I wasn't able to review the PR, I don't know the ANSI sequence format. I will check how logs are now rendered in buildbots after this change!

Does the change remove colors in the web interface as well?

@StanFromIreland

Copy link
Copy Markdown
Member Author

Does the change remove colors in the web interface as well?

No this does not touch the displayed logs, they should stay the same.

@vstinner

vstinner commented Nov 3, 2026

Copy link
Copy Markdown
Member

I'm fine with colors in the web UI, but ANSI sequence in downloaded logs was super annoying so I wrote a script to strip them. It's good that it's now stripped directly on download!

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.

3 participants