-
Notifications
You must be signed in to change notification settings - Fork 254
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
Legacy versions aren't in SpecifierSets if the specifier is PEP 440-compatible #74
Labels
Comments
I think this seems like a reasonable idea, although I think I would call it |
jimporter
pushed a commit
to jimporter/packaging
that referenced
this issue
Jan 25, 2017
jimporter
pushed a commit
to jimporter/packaging
that referenced
this issue
Jan 25, 2017
Closed
jimporter
pushed a commit
to jimporter/packaging
that referenced
this issue
Nov 1, 2017
jimporter
added a commit
to jimporter/packaging
that referenced
this issue
Dec 23, 2019
jimporter
added a commit
to jimporter/packaging
that referenced
this issue
Dec 23, 2019
jimporter
added a commit
to jimporter/packaging
that referenced
this issue
Dec 23, 2019
jimporter
added a commit
to jimporter/packaging
that referenced
this issue
Jul 10, 2020
jimporter
added a commit
to jimporter/packaging
that referenced
this issue
Jul 10, 2020
Closing this as we've deprecated |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Suppose you have a version and a specifier, both as strings. The version is not PEP 440-compatible, but the specifier is. Creating version/specifier objects for each results in the version never meeting specifier:
Presumably, this is because
LegacyVersion
s "will always sort as less than aVersion
instance."While some people can just switch to PEP 440-compatible versions, not everyone can. In particular, I'm using this to parse non-Python versions for some tools. I could write my own code for this, but since I already need the
packaging
package for other stuff, I figured I should just use what already exists.For my particular issue, I can think of the following solutions:
legacy=False
argument toSpecifierSet
that will force all the specifiers it creates to beLegacySpecifier
s. That way, if you know you need to handle legacy versions, you can enable it.Version
s andLegacyVersion
s more compatible so thatLegacyVersion
s don't always count as older.Thoughts?
The text was updated successfully, but these errors were encountered: