The offending code is:
https://github.com/nexB/univers/blob/63bd5aec16ec95b5b811ede638ac225f3ab1f6c6/src/univers/version_specifier.py#L147-L153
Further
self.ranges is a VersionRange object and is converted to str by the following block
https://github.com/nexB/univers/blob/63bd5aec16ec95b5b811ede638ac225f3ab1f6c6/src/univers/version_range.py#L84-L85
the self.version is of type BaseVersion and is converted to str by
https://github.com/nexB/univers/blob/63bd5aec16ec95b5b811ede638ac225f3ab1f6c6/src/univers/versions.py#L51-L52
Which yields a string like
<=semver:1.20.0,>=semver:0.6.18 with multiple schemes which is incompatible to be converted back via
https://github.com/nexB/univers/blob/63bd5aec16ec95b5b811ede638ac225f3ab1f6c6/src/univers/version_specifier.py#L100-L104
Possible [dirty] fix:
ranges = ",".join([f"{rng.operator}{rng.version.value}" for rng in self.version_specifier.ranges])
return f"{self.scheme}:{ranges}"
The offending code is:
https://github.com/nexB/univers/blob/63bd5aec16ec95b5b811ede638ac225f3ab1f6c6/src/univers/version_specifier.py#L147-L153
Further
self.rangesis aVersionRangeobject and is converted to str by the following blockhttps://github.com/nexB/univers/blob/63bd5aec16ec95b5b811ede638ac225f3ab1f6c6/src/univers/version_range.py#L84-L85
the
self.versionis of type BaseVersion and is converted to str byhttps://github.com/nexB/univers/blob/63bd5aec16ec95b5b811ede638ac225f3ab1f6c6/src/univers/versions.py#L51-L52
Which yields a string like
<=semver:1.20.0,>=semver:0.6.18with multiple schemes which is incompatible to be converted back viahttps://github.com/nexB/univers/blob/63bd5aec16ec95b5b811ede638ac225f3ab1f6c6/src/univers/version_specifier.py#L100-L104
Possible [dirty] fix: