Closed podhmo closed 7 years ago
i see. <=1.2
is treated as <SemVer Comparator "<=1.2.0-0">
. so 1.2 is rejected.
some tests are broken, need to fix
Sure, no worries. I have tried to have a look to your fix proposal, seems you are also doing other improvements and I couldn't follow, sorry I couldn't help further.
Just another check: when you compare with <=1.2.0
explicit, the prerelease -0
is not added in that case, and it works
wanted = "1.2"
cands = ["1.1.1", "1.2", "1.1.1-111", "1.1.1-21"]
result = max_satisfying(cands, "<=1.2.0", loose=True)
assert wanted == result, "result is %s" % result #Works
tests are passed. (and implementation is changed, for catch-up current node's implementation)
not impelemented features
These tests are passed, so original issue is solved, maybe. https://github.com/podhmo/python-semver/pull/8/files#diff-4841ac9d81b28247dd3e303936222e7b
5