mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
[3.13] gh-128595: Default to stdout isatty for colour detection instead of stderr (GH-128498) (#129057)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> Fix `test__colorize` unexpected keyword argument 'file' on buildbots (#129070)
This commit is contained in:
parent
972d95313c
commit
383af395af
6 changed files with 19 additions and 10 deletions
|
@ -135,7 +135,7 @@ BUILTIN_EXCEPTION_LIMIT = object()
|
|||
|
||||
def _print_exception_bltin(exc, /):
|
||||
file = sys.stderr if sys.stderr is not None else sys.__stderr__
|
||||
colorize = _colorize.can_colorize()
|
||||
colorize = _colorize.can_colorize(file=file)
|
||||
return print_exception(exc, limit=BUILTIN_EXCEPTION_LIMIT, file=file, colorize=colorize)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue