Tachyon's `pstats_collector` does not respect "no-color" modes
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 77.2k
- Forks
- 35.9k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
Bug report
Bug description:
The Tachyon sampling profiler always emits colored output when used with the pstats collector. For example, the NO_COLOR environment variable is currently not respected:
NO_COLOR=1 python -m profiling.sampling run --pstats test.py
Enabling this would be useful e.g. in cases where the output is redirected into a file for further processing, as it avoids including ANSI escape sequences in the file.
There is already a helper function available in the project that could be used to enable this functionality:
https://github.com/python/cpython/blob/main/Lib/_colorize.py#L564-L605
If you think this would be a useful addition/fix, I'd be happy to work on a patch PR.
Best, Peter
CPython versions tested on:
3.15
Operating systems tested on:
No response
Linked PRs
- gh-154344
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con el punto de entrada python -m profiling.sampling run --pstats test.py e inspecciona el helper que gestiona los colores en Lib/_colorize.py. Verifica que el recopilador de pstats respete NO_COLOR=1 y que la salida redirigida no contenga secuencias de escape ANSI.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- devtools
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100