FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Colorize `timeit` error traceback · Issue #139374 · python/cpython · GitHub

Repository navigation

Colorize timeit error traceback #139374

Closed
Closed

Description

Feature or enhancement

Proposal:

./python.exe -m timeit '1/0'

maybe better

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

Activity

  1. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Sep 27, 2025
  2. changed the title [-]timeit when raise error the traceback not color[/-] [+]timeit: add color to traceback[/+] on Sep 27, 2025
  3. changed the title [-]timeit: add color to traceback[/-] [+]Colorize error traceback in `timeit`[/+] on Sep 27, 2025
  4. changed the title [-]Colorize error traceback in `timeit`[/-] [+]Colorize `timeit` error traceback[/+] on Sep 27, 2025
  5. mpkocher commented on Sep 28, 2025

    Contributor

    This would be creating an inconsistency with the tool.

    The command line interface doesn't support color (because it's using getopt). It's a bit odd if there isn't parity between the out and err cases.

  6. added a commit that references this issue on Sep 28, 2025
  7. picnixz commented on Sep 28, 2025

    Member

    This inconsistency already exists for python itself. For instance python3.14 -c 'import ok' shows a colored traceback while python --help doesn't. I don't think it's a real issue here.

  8. mpkocher commented on Sep 28, 2025

    Contributor

    This inconsistency already exists for python itself. For instance python3.14 -c 'import ok' shows a colored traceback while python --help doesn't. I don't think it's a real issue here.

    I'm suggesting that within a single tool, there should be consistency.

  9. picnixz commented on Sep 28, 2025

    Member

    But it is consistent? python displays tracebacks with colors, so it doesn't matter here. python --help doesn't have colors while python -c "some_error" will render the tracaeback with colors.

    For others, only --help could be colorized, but not all CLI tools are actually using argparse. I would say that it's fine to have the help not supporting colors.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL