-
Notifications
You must be signed in to change notification settings - Fork 9
Versioning comparison #491
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
The problem
A version "1.0" is not considered equivalent to "1.0.0".
@ludeeus : They are not equal so technically correct, but their meaning is the same.
Operating system
Debian
Python version
3.11
Problem-relevant code
>>> from awesomeversion import AwesomeVersion, AwesomeVersionStrategy
>>> version = AwesomeVersion("1.6.1", ensure_strategy=AwesomeVersionStrategy.PEP440)
>>> version2 = AwesomeVersion("1.6.1", ensure_strategy=AwesomeVersionStrategy.SIMPLEVER)
>>> version == version2
True
>>> version = AwesomeVersion("1.0", ensure_strategy=AwesomeVersionStrategy.SIMPLEVER)
>>> version2 = AwesomeVersion("1.0.0", ensure_strategy=AwesomeVersionStrategy.SIMPLEVER)
>>> version == version2
False
>>> version > version2
False
>>> version < version2
FalseTraceback/Error logs
Additional information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working