From 0b8652f5266bf23a13b24a49f6f85b14e8c43a79 Mon Sep 17 00:00:00 2001 From: Thomas JANVIER Date: Tue, 14 Jan 2025 11:16:18 +0100 Subject: [PATCH] BUG: Support PEP440 style alpha and beta versions Support alpha and beta version syntax from PEP440 for python plugins see https://peps.python.org/pep-0440/ --- python/pyplugin_installer/version_compare.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/pyplugin_installer/version_compare.py b/python/pyplugin_installer/version_compare.py index 2871062e2bc1..cb2ee9e13d8e 100644 --- a/python/pyplugin_installer/version_compare.py +++ b/python/pyplugin_installer/version_compare.py @@ -126,9 +126,9 @@ def compareElements(s1, s2): return 2 # if the strings aren't numeric or start from 0, compare them as a strings: # but first, set ALPHA < BETA < PREVIEW < RC < TRUNK < [NOTHING] < [ANYTHING_ELSE] - if s1 not in ["ALPHA", "BETA", "PREVIEW", "RC", "TRUNK"]: + if s1 not in ["A", "ALPHA", "B", "BETA", "PREVIEW", "RC", "TRUNK"]: s1 = "Z" + s1 - if s2 not in ["ALPHA", "BETA", "PREVIEW", "RC", "TRUNK"]: + if s2 not in ["A", "ALPHA", "B", "BETA", "PREVIEW", "RC", "TRUNK"]: s2 = "Z" + s2 # the final test: if s1 > s2: