Skip to content

If no prerelease value is explicitly set, Specifier[Set].contains should default to prerelease=True. #895

@notatallshaw

Description

@notatallshaw

The spec says:

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

Now, the spec never elucidates on what "remotely" means, but this is already implemented for filter:

list(Specifier("<=2.0").filter(["1.0b0"]))
['1.0b0']

However it is not implemented for contains which can only receive one version and therefore there is no other version that could satisfy it:

>>> Specifier("<=2.0").contains("1.0b0")
False

The contradiction being: how can 1.0b0 pass the <=2.0 filter when <=2.0 does not "contain" 1.0b0?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions