Skip to content

pip accepts non-PEP440 version 0.1_1 in wheel file name #12914

Closed
@notatallshaw

Description

@notatallshaw

Description

I wanted to replace pip's custom wheel filename regex with the standard parse_wheel_filename.

However I found that the old regex accepts non-PEP440 syntax and it is even tested for.

The version 0.1_1 gets coerced by pip to 0.1-1, whose canonical form is 0.1.post1.

Expected behavior

Pip shouldn't implement its own wheel filename parsing.

Assuming that is accepted, does this need to go through a depreciation cycle?

pip version

24.2

Python version

3.12

OS

Linux

How to Reproduce

  1. Install a wheel named simple-0.1_1-py2-none-any.whl

Output

No response

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugA confirmed bug or unintended behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions