You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> from univers.versions import PypiVersion
>>> v = PypiVersion("10.0.2-10.1.0")
Traceback (most recent call last):
File "<python-input-1>", line 1, in <module>
v = PypiVersion("10.0.2-10.1.0")
File "<attrs generated init univers.versions.Version>", line 7, in __init__
self.__attrs_post_init__()
~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\lenovo\Documents\GitHub\web dev\univers\src\univers\versions.py", line 87, in __attrs_post_init__
raise InvalidVersion(f"{self.string!r} is not a valid {self.__class__!r}")
univers.versions.InvalidVersion: '10.0.2-10.1.0' is not a valid <class 'univers.versions.PypiVersion'>
it is expected in output. @pombredanne what we expect in output, also this is happened due to
@classmethod
def build_value(cls, string):
"""
Return a packaging.version.LegacyVersion or packaging.version.Version
"""
return packaging_version.Version(string)
univers.versions.InvalidVersion: '10.0.2-1.1' is not a valid <class 'univers.versions.PypiVersion'>
See issues:
The text was updated successfully, but these errors were encountered: