Skip to content

🐛 fix(seed): skip special metadata on reseed - #3640

Merged
gaborbernat merged 1 commit into
pypa:mainfrom
gaborbernat:fix/3627-seed-metadata-special-files
Nov 20, 2026
Merged

gaborbernat merged 1 commit into
pypa:mainfrom
gaborbernat:fix/3627-seed-metadata-special-files

Conversation

@gaborbernat

Copy link
Copy Markdown
Contributor

On reseed, the old metadata reads opened an existing top_level.txt or RECORD without checking its file type. A FIFO at either path could leave virtualenv waiting for a writer. The seeder now skips non-regular metadata and finishes replacing the seed package. Fixes #3627.

Existing metadata could block replacement

The old top_level.txt check and RECORD check used Path.exists(). That method accepts an existing FIFO, while opening a FIFO for reading waits for a writer. Both reads now use one file-type check before opening metadata. Path.is_file() follows symlinks, so metadata linked to a regular file remains readable.

Behavior changes

The app-data seeder warns and skips top_level.txt or RECORD when the path is a FIFO, device, directory, or link to one. It still replaces the old seed package. A large regular metadata file remains subject to the existing full-file read.

Reported by oss-scanner: ANT-2026-GY26H3A6.

@gaborbernat
gaborbernat merged commit 15b1789 into pypa:main Nov 20, 2026
76 of 80 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reseeding hangs when an existing RECORD is a FIFO

1 participant