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 1919
2020from pip ._internal .cli .progress_bars import BarType , get_download_progress_renderer
2121from pip ._internal .exceptions import IncompleteDownloadError , NetworkConnectionError
22- from pip ._internal .models .index import PyPI
2322from pip ._internal .models .link import Link
2423from pip ._internal .network .cache import SafeFileCache , is_from_cache
2524from pip ._internal .network .session import CacheControlAdapter , PipSession
@@ -51,10 +50,10 @@ def _log_download(
5150 total_length : int | None ,
5251 range_start : int | None = 0 ,
5352) -> Iterable [bytes ]:
54- if link .netloc == PyPI .file_storage_domain :
55- url = link .show_url
56- else :
53+ if logger .getEffectiveLevel () > logging .INFO :
5754 url = link .url_without_fragment
55+ else :
56+ url = link .show_url
5857
5958 logged_url = redact_auth_from_url (url )
6059
Original file line number Diff line number Diff line change 3030 {},
3131 False ,
3232 None ,
33- "Downloading http://example.com/ foo.tgz" ,
33+ "Downloading foo.tgz" ,
3434 ),
3535 (
3636 "http://example.com/foo.tgz" ,
3737 {"content-length" : "2" },
3838 False ,
3939 None ,
40- "Downloading http://example.com/ foo.tgz (2 bytes)" ,
40+ "Downloading foo.tgz (2 bytes)" ,
4141 ),
4242 (
4343 "http://example.com/foo.tgz" ,
4444 {"content-length" : "2" },
4545 True ,
4646 None ,
47- "Using cached http://example.com/ foo.tgz (2 bytes)" ,
47+ "Using cached foo.tgz (2 bytes)" ,
4848 ),
4949 (
5050 "https://files.pythonhosted.org/foo.tgz" ,
7272 {"content-length" : "200" },
7373 False ,
7474 100 ,
75- "Resuming download http://example.com/ foo.tgz (100 bytes/200 bytes)" ,
75+ "Resuming download foo.tgz (100 bytes/200 bytes)" ,
7676 ),
7777 ],
7878)
You can’t perform that action at this time.
0 commit comments