>>> from univers.versions import SemverVersion
>>> SemverVersion("2.0.0")
SemverVersion(string='2.0.0')
>>> str(SemverVersion("2.0.0"))
'2.0.0'
After converting a Version to string, it is impossible to switch back as the type (SemverVersion) information is lost. This will cause problems when saving and retrieving versions from a database.
One possible solution is to store the class name SemverVersion and the string representation both in the database.
Even so, would it make sense to have a vers like (but tiny) specification for versions ?
It could be something along the lines
I'm not even sure if this representation is required at all, comments please.
After converting a
Versionto string, it is impossible to switch back as the type (SemverVersion) information is lost. This will cause problems when saving and retrieving versions from a database.One possible solution is to store the class name
SemverVersionand the string representation both in the database.Even so, would it make sense to have a vers like (but tiny) specification for versions ?
It could be something along the lines
I'm not even sure if this representation is required at all, comments please.