Skip to content

[3.15] gh-154335: Allow disabling terminal colors in Tachyon's pstats_collector module (GH-154344) - #158122

Merged
pablogsal merged 1 commit into
python:3.15from
miss-islington:backport-0546b5f-3.15
Sep 24, 2026
Merged

pablogsal merged 1 commit into
python:3.15from
miss-islington:backport-0546b5f-3.15

Conversation

@miss-islington

Copy link
Copy Markdown
Contributor
  • Use _colorize.get_colors() to allow disabling ANSI escape codes through environment variables

  • add news entry

  • use get_colors() instead of ANSIColors enum also in Lib/profiling/sampling/sample.py

  • fix data_lines collection of pstats lines for no-color mode

  • preserve lazy import of _colorize

  • Tachyon's pstats_collector does not respect "no-color" modes #154335: Cover profiler color policy and update NEWS


(cherry picked from commit 0546b5f)

Co-authored-by: Peter Fackeldey fackeldey.peter@gmail.com
Co-authored-by: Pablo Galindo Salgado pablogsal@gmail.com

…_collector` module (pythonGH-154344)

* Use _colorize.get_colors() to allow disabling ANSI escape codes through environment variables

* add news entry

* use get_colors() instead of ANSIColors enum also in Lib/profiling/sampling/sample.py

* fix data_lines collection of pstats lines for no-color mode

* preserve lazy import of _colorize

* pythongh-154335: Cover profiler color policy and update NEWS

---------
(cherry picked from commit 0546b5f)

Co-authored-by: Peter Fackeldey <fackeldey.peter@gmail.com>
Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
@pablogsal
pablogsal enabled auto-merge (squash) September 24, 2026 16:49
@pablogsal
pablogsal merged commit 3b259b9 into python:3.15 Sep 24, 2026
56 checks passed
@miss-islington
miss-islington deleted the backport-0546b5f-3.15 branch September 24, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants