Skip to content

Default to stdout isatty for colour detection instead of stderr #128595

Closed

Description

@hugovk

Bug report

Bug description:

The terminal colour detection defaults to checking stderr's isatty, rather than stdout.

As suggested at #128317 (comment), let's default to checking stdout's isatty rather than stderr's.

Here some example output, plus when piping it:

NowProposal
image image
image image
image image
image image

CPython versions tested on:

3.13, CPython main branch

Operating systems tested on:

macOS

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    3.13only security fixes
    3.14bugs and security fixes
    on Jan 7, 2025
  2. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Jan 10, 2025
  3. added 6 commits that reference this issue on Jan 13, 2025
  4. added a commit that references this issue on Jan 21, 2025
  5. added 3 commits that reference this issue on Jan 21, 2025
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

    3.13only security fixes3.14bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions