Skip to content

Normalize RECORD paths when writing#335

Closed
hansu650 wants to merge 1 commit into
pypa:mainfrom
hansu650:fix/normalize-record-paths
Closed

Normalize RECORD paths when writing#335
hansu650 wants to merge 1 commit into
pypa:mainfrom
hansu650:fix/normalize-record-paths

Conversation

@hansu650

Copy link
Copy Markdown

Fixes #158.

This normalizes Windows-style separators when writing RecordEntry rows, regardless of the platform doing the write.

That keeps written RECORD paths consistent even if a RecordEntry was created from a Windows-style path on another platform.

Tests:

python -m pytest tests/test_records.py -k "backslash_path or string_representation"
python -m pytest tests/test_records.py
python -m pytest --cov=installer --cov-fail-under=100 --cov-report=term-missing --cov-context=test -n auto tests
python -m ruff check src/installer/records.py tests/test_records.py
python -m ruff format --check src/installer/records.py tests/test_records.py
python -m pre_commit run --files src/installer/records.py tests/test_records.py
git diff --check

@hansu650 hansu650 closed this by deleting the head repository May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Always normalize RECORD files to forward-slash when writing

1 participant