Skip to content

Change Logic for Finding Latest Version #59

Description

@George-D-S

In xml_validate.py we have...

SUPPORTED_VERSIONS = ["3.3.0", "3.3.1", "3.4.5", "4.0.0", "4.1.0", "4.2.0"]

And in utils.py

CURRENT_SCHEMA = max(SUPPORTED_VERSIONS)

I think this will have problems if the middle section reaches two digits.

The AI Overlord suggests

from packaging import version

versions = ["1.5.1", "1.10.1", "1.2.3", "2.0.0", "2.0.0b1", "1.10.1rc1"]
sorted_versions = sorted(versions, key=version.parse)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions