Add check for prerelease and further clean up error message.
Change-Id: I3b29dd606e76c7855ff34decf29caf9417f1cf44
This commit is contained in:
parent
18480cc7cf
commit
7d6051949f
@ -92,11 +92,12 @@ def check_compatible(global_reqs, constraints):
|
||||
tested = []
|
||||
for constraint, _ in reqs[name]:
|
||||
spec = specifiers.SpecifierSet(constraint.specifiers)
|
||||
if spec.contains(version):
|
||||
# pre-releases are allowed by policy but discouraged
|
||||
if spec.contains(version, prereleases=True):
|
||||
return True
|
||||
tested.append(constraint.specifiers)
|
||||
failures.append('Constraint for %s==%s does not match requirement %s' %
|
||||
(name, version, tested))
|
||||
failures.append('Constraint %s for %s does not match requirement %s' %
|
||||
(version, name, tested))
|
||||
return False
|
||||
failures = []
|
||||
for pkg_constraints in constraints.values():
|
||||
|
Loading…
Reference in New Issue
Block a user