Skip to content

An empty SpecifierSet accepts pre-releases if they are the only option available, but a non-empty SpecifierSet does not #917

@notatallshaw

Description

@notatallshaw

Fixed by #897

Current behavior:

>>> list(SpecifierSet("").filter(["1.0a1"]))
['1.0a1']
>>> list(SpecifierSet("<=4").filter(["1.0a1"]))
[]

This is because empty SpecifierSets correctly implement this line from the spec:

accept remotely available pre-releases for version specifiers where there is no final or post release that satisfies the version specifier

But non-empty SpecifierSets do not.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions