Skip to content

Redact auth in wheel cache origin warnings - #14233

Open
carrerasdarren-cell wants to merge 1 commit into
pypa:mainfrom
carrerasdarren-cell:fix/cache-origin-redact-auth
Open

Redact auth in wheel cache origin warnings#14233
carrerasdarren-cell wants to merge 1 commit into
pypa:mainfrom
carrerasdarren-cell:fix/cache-origin-redact-auth

Conversation

@carrerasdarren-cell

Copy link
Copy Markdown

What does this PR do?

Fixes #14232.

record_download_origin() writes a credential-stripped PEP 610 URL to origin.json, but previously compared and logged the raw in-memory URL. Re-recording an authenticated origin therefore produced a false mismatch warning containing the username and password.

This change compares the same serialized URL representation that is written to disk and uses those stripped values in genuine mismatch warnings. It adds regression coverage for both behaviors.

PR Checklist:

  • I agree to follow the PSF Code of Conduct.
  • I have read and have followed the CONTRIBUTING.md file.
  • I have added a news file fragment.
  • I have read and followed the AI_POLICY.md file, and I take full ownership and responsibility for every line.

Assisted-by: OpenAI Codex

Tests

  • pytest -q tests/unit/test_cache.py: 10 passed
  • Black 26.5.1 passed
  • Ruff 0.15.20 passed
  • Mypy 2.1.0 passed for both changed Python files
  • git diff --check passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wheel cache origin mismatch warning exposes URL credentials

1 participant