Skip to content

Normalize RECORD paths when writing - #353

Open
PNHD wants to merge 1 commit into
pypa:mainfrom
PNHD:fix/158-normalize-record-paths-v2
Open

Normalize RECORD paths when writing#353
PNHD wants to merge 1 commit into
pypa:mainfrom
PNHD:fix/158-normalize-record-paths-v2

Conversation

@PNHD

@PNHD PNHD commented Sep 2, 2026

Copy link
Copy Markdown

Fixes #158.

RecordEntry.to_row() currently normalizes backslashes only when running on Windows. A RecordEntry can also contain a path read from a Windows-generated RECORD while installer itself is running on another platform, so the serialized path must be normalized independently of the host OS.

Normalize backslashes to forward slashes unconditionally in to_row(), matching the existing normalization performed when parsing RECORD rows.

A regression test constructs a Windows-style path and verifies that to_row() emits a forward-slash RECORD path on every platform.

Validation:

  • clean one-commit branch on current upstream main at preparation time
  • full fork GitHub Actions matrix passes on head 9ef6a9f

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