GeezerVison is showing github.com — gh-139374: colorize `timeit` error traceback by yihong0618 · Pull Request #139375 · python/cpython
Conversation
yihong0618
commented
Sep 27, 2025
•
edited by bedevere-app
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
after this patch

Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
picnixz
changed the title
gh-139374: make timeit traceback can with color
gh-139374: colorize timeit error traceback
Sep 27, 2025
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Is this worth writing into what's new in 3.15? Maybe we can do it later
Yes. And we should add it in this PR not in a separate one.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Is this worth writing into what's new in 3.15? Maybe we can do it later
Yes. And we should add it in this PR not in a separate one.
will try to learn how to add it...
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
You can look at existing entries for inspiration, e.g.:
Unraisable exceptions are now highlighted with color by default. This can be controlled by environment variables. (Contributed by Peter Bierma in gh-134170.)
In this case, under "timeit", something along the lines of:
Error tracebacks are now colourised by default. This can be controlled by environment variables. (Contributed by YOU in gh-PRNO.)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
You can look at existing entries for inspiration, e.g.:
Unraisable exceptions are now highlighted with color by default. This can be controlled by environment variables. (Contributed by Peter Bierma in gh-134170.)
In this case, under "timeit", something along the lines of:
Error tracebacks are now colourised by default. This can be controlled by environment variables. (Contributed by YOU in gh-PRNO.)
Thank you very much!
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for my back-and-forth suggestions but it's to ease future maintenance.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Sorry for my back-and-forth suggestions but it's to ease future maintenance.
I enjoyed learning, thank you very much for the hint. really, changing now
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now this is good. Thanks for the patch!
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
yihong0618 reacted with heart emoji
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
yihong0618 reacted with heart emoji
Uh oh!
There was an error while loading. Please reload this page.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot AMD64 CentOS9 NoGIL Refleaks 3.x (tier-1) has failed when building commit e18dda9.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1610/builds/2134) and take a look at the build logs.
- Check if the failure is related to this commit (e18dda9) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/1610/builds/2134
Failed tests:
Test leaking resources:
- test_free_threading: file descriptors
Summary of the results of the build (if available):
==
Click to see traceback logs
remote: Enumerating objects: 15, done.
remote: Counting objects: 8% (1/12)
remote: Counting objects: 16% (2/12)
remote: Counting objects: 25% (3/12)
remote: Counting objects: 33% (4/12)
remote: Counting objects: 41% (5/12)
remote: Counting objects: 50% (6/12)
remote: Counting objects: 58% (7/12)
remote: Counting objects: 66% (8/12)
remote: Counting objects: 75% (9/12)
remote: Counting objects: 83% (10/12)
remote: Counting objects: 91% (11/12)
remote: Counting objects: 100% (12/12)
remote: Counting objects: 100% (12/12), done.
remote: Compressing objects: 11% (1/9)
remote: Compressing objects: 22% (2/9)
remote: Compressing objects: 33% (3/9)
remote: Compressing objects: 44% (4/9)
remote: Compressing objects: 55% (5/9)
remote: Compressing objects: 66% (6/9)
remote: Compressing objects: 77% (7/9)
remote: Compressing objects: 88% (8/9)
remote: Compressing objects: 100% (9/9)
remote: Compressing objects: 100% (9/9), done.
remote: Total 15 (delta 3), reused 3 (delta 3), pack-reused 3 (from 2)
From https://github.com/python/cpython
* branch main -> FETCH_HEAD
Note: switching to 'e18dda96c967911fe387ed93c7efe105e7cc1274'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at e18dda96c96 gh-139374: colorize traceback when using `timeit` command-line interface (#139375)
Switched to and reset branch 'main'
configure: WARNING: no system libmpdec found; falling back to pure-Python version for the decimal module
make: *** [Makefile:2487: buildbottest] Error 2
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|