Repository navigation
Conversation
Config._load logs the mirror value before main separates URL credentials. Hide the value in diagnostics while preserving the parsed configuration and Basic authentication behavior. Add regression coverage for normal and verbose config loading and a localhost mirror that still receives its Authorization header. Document the output change in README.rst and the unreleased changelog. Follow-up to ekalinin#426. Co-Authored-By: GPT-6.1 Sol High
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Config._load(..., verbose=True)prints the configured mirror value beforemain()separates URL credentials. When the mirror contains a password or token, captured verbose output can expose it to readers who cannot access the original configuration. #426 protects request and download-error handling, but this earlier configuration message still contains the original value.This change displays
<redacted>for the mirror without changing the value stored inConfig.mirror. Request authentication and other configuration diagnostics keep their existing behavior. With synthetic credentials, the output changes from:to:
The whole mirror value is hidden rather than parsed again for logging. This also covers query-string tokens, scheme-less values and malformed URLs. The tradeoff is that the verbose configuration message no longer shows the mirror host or path.
The regression tests cover normal and verbose loading, including quotes, percent encoding, IPv6 and query tokens. A localhost HTTP test checks that the request still receives its Basic Authorization header while captured output contains neither the credential nor the encoded header.
README.rstand the unreleased changelog document the output change.Follow-up to #426. There is no separate issue to close.
Validation
Tested on macOS 27.2 / arm64 with CPython 3.14.7:
tox -e py314passed, including coverage and flake8: 473 passed, 71 skipped and 11 deselected, with 2 existing TLS deprecation warnings.git diff --checkpassed.The authentication test uses synthetic credentials and a server bound to
127.0.0.1. The skips are fish and Windows cases. The external-download integration tests and other Python/OS combinations were not run locally.This PR addresses verbose mirror configuration output only; it does not change other diagnostic paths.
toxpasses: the tests and flake8 (localpy314environment)CHANGEShas an entry underVersion [unreleased], if nodeenv'sbehavior changes
README.rstis updated, if the change affects what it documentstype(scope): subjectAI-assisted implementation and review with OpenAI Codex with GPT-6.1 Sol High.