Description
From setuptools issue.
Currently if someone has a legacy specifier anywhere in their dependency chain it will raise a InvalidSpecifier
exception. This is fine if you want strict adherence to PEP 440, however it doesn't help much if you have existing specifiers anywhere.
The question is, how should we handle this?
We could just allow anything in the specifier fields and let the fact that LegacyVersion
and Version
are now directory comparable to each other handle things. The problem with this is that something like >=1.1.5.jaraco.20140924
would essentially mean "any PEP 440 compatible version, and then anything >=1.1.5.jaraco.20140924
using the old style scheme.
Another solution is to add a LegacySpecifier
which implements the old style of behavior. Projects like setuptools then would do a similar thing as is done now with versions where they first attempt to use the new behavior, and if it fails to parse it falls back to the old behavior. The problem with this one is, it's going to end up adding mixed specifier syntax where you might have some dependencies using the PEP 440 syntax and some dependencies using the old style. It also has issues with combining multiple specifiers, what do we do if two projects have a dependency on "foo>=1.0", which will be a Specifier
instance and a dependency on foo>=1.0.wat
which would be a LegacySpecifier
instance.