Skip to content

Commit c146e81

Browse files
committed
Rework user-facing messaging
1 parent 2808134 commit c146e81

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/pip/_internal/cli/cmdoptions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,7 @@ def check_list_path_option(options: Values) -> None:
10831083
dest="resume_retries",
10841084
type="int",
10851085
default=0,
1086-
help="Maximum number of resumption retries for incomplete downloads"
1086+
help="Maximum number of resumption attempts for incomplete downloads"
10871087
"(default %default times).",
10881088
)
10891089

src/pip/_internal/exceptions.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -824,8 +824,8 @@ def __init__(
824824

825825
download_status = f"{format_size(received)}/{format_size(expected)}"
826826
if retries:
827-
retry_status = f"after {retries} retries "
828-
hint = "Use --resume-retries to configure resume retry limit."
827+
retry_status = f"after {retries} attempts "
828+
hint = "Use --resume-retries to configure resume attempt limit."
829829
else:
830830
retry_status = ""
831831
hint = "Consider using --resume-retries to enable download resumption."

src/pip/_internal/network/download.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,10 @@ def _attempt_resume(
239239
attempts_left -= 1
240240

241241
logger.warning(
242-
"Attempting to resume download with bytes received: %s/%s",
242+
"Attempting to resume incomplete download (%s/%s, attempt %d)",
243243
format_size(bytes_received),
244244
format_size(total_length),
245+
(self._resume_retries - attempts_left),
245246
)
246247

247248
try:

0 commit comments

Comments
 (0)