소스 검색

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.
Thomas Waldmann 3 주 전
부모
커밋
dbf7cc864e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/borg/helpers/msgpack.py

+ 1 - 1
src/borg/helpers/msgpack.py

@@ -182,7 +182,7 @@ def is_slow_msgpack():
 def is_supported_msgpack():
     # DO NOT CHANGE OR REMOVE! See also requirements and comments in setup.py.
     import msgpack
-    return (0, 5, 6) <= msgpack.version <= (1, 1, 1) and \
+    return (0, 5, 6) <= msgpack.version[:3] <= (1, 1, 1) and \
            msgpack.version not in [(1, 0, 1), ]  # < add bad releases here to deny list