Skip to content

Fully cover handling arbitrary equality (===) in Specifier and SpecifierSet. #943

@notatallshaw

Description

@notatallshaw

As part of implementing #940 I am finding a lot of gaps in SpecifierSet for arbitrary equality.

For example are any of these valid SpecifierSets:

  • ===1.0
  • ===1.0,===1.0
  • ===1.0,===1.0.0
  • >=1.0,===1.0.0
  • ===foo
  • >=1.0,===foo

The problem is _coerce_version has to be used as part of filter to properly implement PEP 440, but it will break if arbitrary strings are used validly as part of ===foo.

I believe the first step is to accept #932, and then add many edge cases tests for arbitrary equality and review if their output looks reasonable or not.

I am not yet working on a PR for this, I will wait until #932 is accepted or rejected.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions