Skip to content

Commit 61acf01

Browse files
make rich progress bars write to stderr
1 parent edf297c commit 61acf01

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/pip/_internal/cli/progress_bars.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
Type,
1414
)
1515

16+
from pip._vendor.rich.console import Console
1617
from pip._vendor.rich.live import Live
1718
from pip._vendor.rich.panel import Panel
1819
from pip._vendor.rich.progress import (
@@ -88,7 +89,7 @@ def _rich_progress_bar(
8889
total = size
8990
columns = _known_size_columns()
9091

91-
progress = Progress(*columns, refresh_per_second=5)
92+
progress = Progress(*columns, console=Console(stderr=True), refresh_per_second=5)
9293
task_id = progress.add_task(_progress_task_prefix(), total=total)
9394
with progress:
9495
for chunk in iterable:
@@ -327,7 +328,7 @@ def __enter__(self) -> "BatchedRichProgressBar":
327328
padding=(0, 0),
328329
)
329330
)
330-
self._live = Live(table, refresh_per_second=5)
331+
self._live = Live(table, console=Console(stderr=True), refresh_per_second=5)
331332
self._task_progress.start_task(self._total_task_id)
332333
self._progress.start_task(self._total_bytes_task_id)
333334
self._live.__enter__()

0 commit comments

Comments
 (0)