From 188e96c60b540904f0f4a2a7299c8acf81d59f9a Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Fri, 6 Jun 2025 18:38:10 +0200 Subject: [PATCH] msgpack version check: ignore "rc" or other version elements Only compare the main version number, e.g. 1.1.1 (first 3 elements of the version tuple). Without this change, it would not accept 1.1.1rc1 because that is not "<= (1, 1, 1)" in that simplistic version comparison. --- src/borg/helpers/msgpack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/borg/helpers/msgpack.py b/src/borg/helpers/msgpack.py index 5c0d1a02b..8dd07c5b4 100644 --- a/src/borg/helpers/msgpack.py +++ b/src/borg/helpers/msgpack.py @@ -137,7 +137,7 @@ def is_slow_msgpack(): def is_supported_msgpack(): # DO NOT CHANGE OR REMOVE! See also requirements and comments in pyproject.toml. import msgpack - return (1, 0, 3) <= msgpack.version <= (1, 1, 1) and \ + return (1, 0, 3) <= msgpack.version[:3] <= (1, 1, 1) and \ msgpack.version not in [] # < add bad releases here to deny list