Skip to content

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

@hugovk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixesstdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy