Visitar URL original
An empty `SpecifierSet` accepts pre-releases if they are the only option available, but a non-empty `SpecifierSet` does not · Issue #917 · pypa/packaging · GitHub
Skip to content

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

Closed

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions