File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,9 @@ Bugs fixed
4747 package (triggered if using ``fontenc `` with ``T2A `` option and document
4848 language is not a Cyrillic one).
4949 Patch by Jean-François B.
50+ * #11675: Fix rendering of progression bars in environments that do not support
51+ ANSI control sequences.
52+ Patch by Bénédikt Tran.
5053
5154Testing
5255-------
Original file line number Diff line number Diff line change 55
66from sphinx .locale import __
77from sphinx .util import logging
8- from sphinx .util .console import bold # type: ignore[attr-defined]
8+ from sphinx .util .console import bold , color_terminal # type: ignore[attr-defined]
99
1010if False :
1111 from collections .abc import Iterable , Iterator
@@ -33,7 +33,8 @@ def status_iterator(
3333 verbosity : int = 0 ,
3434 stringify_func : Callable [[Any ], str ] = display_chunk ,
3535) -> Iterator [T ]:
36- single_line = verbosity < 1
36+ # printing on a single line requires ANSI control sequences
37+ single_line = verbosity < 1 and color_terminal ()
3738 bold_summary = bold (summary )
3839 if length == 0 :
3940 logger .info (bold_summary , nonl = True )
You can’t perform that action at this time.
0 commit comments