Use string representation for comparing
More robust with weird requirements that can't be directly compared for
some reason (like markers).
@@ -66,10 +66,13 @@ def check_package_set(package_set):
if version not in req.specifier:
conflicting_deps.add((name, version, req))
+ def str_key(x):
+ return str(x)
+
if missing_deps:
- missing[package_name] = sorted(missing_deps)
+ missing[package_name] = sorted(missing_deps, key=str_key)
if conflicting_deps:
- conflicting[package_name] = sorted(conflicting_deps)
+ conflicting[package_name] = sorted(conflicting_deps, key=str_key)
return missing, conflicting
