馃寪 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

馃悰 fix(seed): reject invalid and archive-like versions - #3403

Merged
gaborbernat merged 3 commits into
pypa:mainfrom
gaborbernat:fix/seed-version-validation
Oct 16, 2026
Merged

gaborbernat merged 3 commits into
pypa:mainfrom
gaborbernat:fix/seed-version-validation

Conversation

@gaborbernat

Copy link
Copy Markdown
Contributor

Malformed seed versions could reach pip and produce a local-file error instead of a version-validation error. 馃悰 Virtualenv now validates version syntax before downloading and rejects requirements ending in archive suffixes.

Validate meaning as well as characters

The previous check allowed a set of characters without parsing a version. The fix also uses packaging's specifier parser. A separate check rejects archive suffixes because a valid local version can still make the assembled requirement look like an archive to pip.

Behavior changes

Invalid versions fail before pip starts. Local versions ending in an archive suffix are also rejected, including case variants; other local version labels remain supported. The existing supported operators and rejection of whitespace remain unchanged.

@gaborbernat
gaborbernat merged commit 233359c into pypa:main Oct 16, 2026
76 checks passed
@gaborbernat
gaborbernat deleted the fix/seed-version-validation branch October 17, 2026 10:41
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.

1 participant