-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to handle legacy specifiers? #12
Comments
Perhaps the latter approach with a "--strict" flag to turn off the fallback would work? That kind of compromise isn't uncommon as part of a transition like this. |
That could work, what would happen if you combine a |
For myself, Idon't think it's something that we're going to be able to realistically deprecate anytime soon. We might raise a warning on it but otherwise I don't know that we're going to be able to do anything about it because of the sheer mass of software out there that likely depends on at least one thing like this. To that effect I wonder if a Perhaps the answer is, enable The only thing I'm not sure about is what should happen if you do |
If the warning is "PendingDeprecationWarning", that could be an excellent |
That all sounds straightforward to me. |
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
andVersion
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 aSpecifier
instance and a dependency onfoo>=1.0.wat
which would be aLegacySpecifier
instance.The text was updated successfully, but these errors were encountered: