GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Empty values of FORCE_COLOR and NO_COLOR are not ignored · Issue #129061 · python/cpython

Empty values of FORCE_COLOR and NO_COLOR are not ignored #129061

New issue
Copy link
New issue
Copy link
Closed
termcolor/termcolor
#92
termcolor/termcolor#92
Closed
Empty values of FORCE_COLOR and NO_COLOR are not ignored#129061
termcolor/termcolor
#92
Copy link
Labels
3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixestopic-replRelated to the interactive shellRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@serhiy-storchaka
serhiy-storchaka
opened on Jan 20, 2025
Issue body actions

Bug report

Bug description:

https://no-color.org/

Command-line software which adds ANSI color to its output by default should check for a NO_COLOR environment variable that, when present and not an empty string (regardless of its value), prevents the addition of ANSI color.

https://force-color.org/

Command-line software which outputs colored text should check for a FORCE_COLOR environment variable. When this variable is present and not an empty string (regardless of its value), it should force the addition of ANSI color.

Both "standards" state that these environment variables has only effect if their value is not an empty string. But Python currently only tests that the environment variables are defined.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

  • gh-129061: Fix FORCE_COLOR and NO_COLOR when empty strings #129140
  • [3.13] gh-129061: Fix FORCE_COLOR and NO_COLOR when empty strings (GH-129140) #129360
Reacted by Erlend E. Aasland and Hugo van Kemenade

Activity

  1. serhiy-storchaka
    added
    3.13only security fixesonly security fixes
    3.14bugs and security fixesbugs and security fixes
    topic-replRelated to the interactive shellRelated to the interactive shell
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Jan 20, 2025
  2. serhiy-storchaka commented on Jan 20, 2025

    @serhiy-storchaka
    serhiy-storchaka
    on Jan 20, 2025
    MemberAuthor
    More actions

    cc @hugovk

  3. erlend-aasland commented on Jan 20, 2025

    @erlend-aasland
    erlend-aasland
    on Jan 20, 2025
    Contributor
    More actions

    See also earlier discussion: #128318 (comment)

    Reacted by Hugo van Kemenade
  4. hugovk commented on Jan 23, 2025

    @hugovk
    hugovk
    on Jan 23, 2025
    Member
    More actions

    Please see PR #129140.

  5. hugovk
    added a commit that references this issue on Jan 27, 2025

    gh-129061: Fix `FORCE_COLOR` and `NO_COLOR` when empty strings (#129140)

    9546fe2
  6. miss-islington
    added a commit that references this issue on Jan 27, 2025

    pythongh-129061: Fix `FORCE_COLOR` and `NO_COLOR` when empty strings (p…

    a8eeea9
  7. hugovk
    added a commit that references this issue on Jan 27, 2025

    [3.13] gh-129061: Fix `FORCE_COLOR` and `NO_COLOR` when empty strings (…

    c7f9e74
  8. hugovk
    closed this as completedon Jan 27, 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 fixesonly security fixes3.14bugs and security fixesbugs and security fixestopic-replRelated to the interactive shellRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.