File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
src/pip/_internal/network Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 19
19
20
20
from pip ._internal .cli .progress_bars import BarType , get_download_progress_renderer
21
21
from pip ._internal .exceptions import IncompleteDownloadError , NetworkConnectionError
22
- from pip ._internal .models .index import PyPI
23
22
from pip ._internal .models .link import Link
24
23
from pip ._internal .network .cache import SafeFileCache , is_from_cache
25
24
from pip ._internal .network .session import CacheControlAdapter , PipSession
@@ -51,10 +50,10 @@ def _log_download(
51
50
total_length : int | None ,
52
51
range_start : int | None = 0 ,
53
52
) -> Iterable [bytes ]:
54
- if link .netloc == PyPI .file_storage_domain :
55
- url = link .show_url
56
- else :
53
+ if logger .getEffectiveLevel () > logging .INFO :
57
54
url = link .url_without_fragment
55
+ else :
56
+ url = link .show_url
58
57
59
58
logged_url = redact_auth_from_url (url )
60
59
Original file line number Diff line number Diff line change 30
30
{},
31
31
False ,
32
32
None ,
33
- "Downloading http://example.com/ foo.tgz" ,
33
+ "Downloading foo.tgz" ,
34
34
),
35
35
(
36
36
"http://example.com/foo.tgz" ,
37
37
{"content-length" : "2" },
38
38
False ,
39
39
None ,
40
- "Downloading http://example.com/ foo.tgz (2 bytes)" ,
40
+ "Downloading foo.tgz (2 bytes)" ,
41
41
),
42
42
(
43
43
"http://example.com/foo.tgz" ,
44
44
{"content-length" : "2" },
45
45
True ,
46
46
None ,
47
- "Using cached http://example.com/ foo.tgz (2 bytes)" ,
47
+ "Using cached foo.tgz (2 bytes)" ,
48
48
),
49
49
(
50
50
"https://files.pythonhosted.org/foo.tgz" ,
72
72
{"content-length" : "200" },
73
73
False ,
74
74
100 ,
75
- "Resuming download http://example.com/ foo.tgz (100 bytes/200 bytes)" ,
75
+ "Resuming download foo.tgz (100 bytes/200 bytes)" ,
76
76
),
77
77
],
78
78
)
You can’t perform that action at this time.
0 commit comments