Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve pooled progress output for BatchDownloader #12925

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/12925.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use very rich progress output for batch downloading. Use ``ProgressBarType`` enum class for ``--progress-bar`` choices.
11 changes: 8 additions & 3 deletions src/pip/_internal/cli/cmdoptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from pip._vendor.packaging.utils import canonicalize_name

from pip._internal.cli.parser import ConfigOptionParser
from pip._internal.cli.progress_bars import ProgressBarType
from pip._internal.exceptions import CommandError
from pip._internal.locations import USER_CACHE_DIR, get_src_prefix
from pip._internal.models.format_control import FormatControl
Expand Down Expand Up @@ -226,11 +227,15 @@ class PipOption(Option):
"--progress-bar",
dest="progress_bar",
type="choice",
choices=["on", "off", "raw"],
default="on",
help="Specify whether the progress bar should be used [on, off, raw] (default: on)",
choices=ProgressBarType.choices(),
default=ProgressBarType.ON.value,
help=(
"Specify whether the progress bar should be used"
f" {ProgressBarType.help_choices()} (default: %default)"
),
)


log: Callable[..., Option] = partial(
PipOption,
"--log",
Expand Down
Loading