Skip to content

Is an empty string a valid LegacyVersion? #382

@uranusjr

Description

@uranusjr

From pypa/pip#9405 (comment)

Current pip allows a user to specify requirements like packaging==. packaging parses the part after == as a LegacyVersion containing an empty string. Whether this is a bug or not, depending on how far the “LegacyVersion can contain anything” idea is taken, but the behaviour is quite confusing to both users.

Since distutils and setuptools both use 0.0.0 if a package is built without specifying a version (or an empty one), it is reasonable to disallow LegacyVersion("") IMO.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions