From 5724cf9934c41cb867125bef7e531c7abfa54815 Mon Sep 17 00:00:00 2001 From: IAlibay Date: Sun, 13 Oct 2024 06:24:26 +0100 Subject: [PATCH] fix version pinning --- utils/mdakit.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/mdakit.py b/utils/mdakit.py index 3d166ac5..93892351 100644 --- a/utils/mdakit.py +++ b/utils/mdakit.py @@ -261,9 +261,11 @@ def get_matching_version(self, max_ver: str = "3.11", min_ver: str = "3.8", while (current_version.to_version() >= min_version.to_version()): for spec in pin_specifiers: + # Fetch the pin version string and convert it for comparison + pin_ver = version.TargetVersion.from_str(spec.version) compatible_version = version._operators[spec.operator]( - current_version.to_string(), - spec.version, + current_version.to_version(), + pin_ver.to_version(), ) if compatible_version: