-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
What's the problem this feature will solve?
Links are sometimes logged via their __str__
method (cf
pip/src/pip/_internal/operations/prepare.py
Line 480 in 81f0572
"HTTP error %s while getting %s", exc.response.status_code, link, |
pip/src/pip/_internal/operations/prepare.py
Lines 135 to 140 in 81f0572
if link.netloc == PyPI.file_storage_domain: | |
url = link.show_url | |
else: | |
url = link.url_without_fragment | |
redacted_url = redact_auth_from_url(url) |
And on top of that we have a special case for PyPI downloads.
Like Chris pointed out in #7384 (comment) this special case (reintroduced via #7225) doesn't help with debugging.
Describe the solution you'd like
Always use the same logic (a Link
property (or __str__
) when logging a link, ideally with identical logic when dealing wih filepath or VCS urls.
This could involve always using link.show_url
for info logs and provide the full (redacted) url in --verbose
mode.
Alternative Solutions
Statu quo.