Skip to content

Gentoo/Alpine version doesn't implement <= or >= correctly #172

@michaelkedar

Description

@michaelkedar

I've noticed an issue with the comparisons with GentooVersion and AlpineVersion:

>>> from univers.versions import GentooVersion
>>> v1 = GentooVersion('1.2.0-r0')
>>> v2 = GentooVersion('1.10.0-r0')
>>>
>>> v1 < v2
True  # correct
>>> v1 <= v2
False  # wrong
>>> v1 > v2
False  # correct
>>> v1 >= v2
True  # wrong

It seems like it's falling back to a string comparison for the __ge__/__le__ methods

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions