Make link logging more consistent #7390
Labels
C: logging
Information Logging
state: awaiting PR
Feature discussed, PR is needed
type: refactor
Refactoring code
What's the problem this feature will solve?
Links are sometimes logged via their
__str__
method (cfpip/src/pip/_internal/operations/prepare.py
Line 480 in 81f0572
pip/src/pip/_internal/operations/prepare.py
Lines 135 to 140 in 81f0572
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.
The text was updated successfully, but these errors were encountered: