Ver código fonte

version 0.5.6+borg1 for the locally modified msgpack

also: adapt version check to only check major.minor.patch.
Thomas Waldmann 4 anos atrás
pai
commit
dddba68e6e
2 arquivos alterados com 9 adições e 3 exclusões
  1. 6 1
      src/borg/algorithms/msgpack/_version.py
  2. 3 2
      src/borg/helpers.py

+ 6 - 1
src/borg/algorithms/msgpack/_version.py

@@ -1 +1,6 @@
-version = (0, 5, 6)
+# This is a bundled msgpack 0.5.6 with local modifications.
+# Changes:
+# +borg1: drop support for old buffer protocol to be compatible with py310
+#         (backport of commit 9ae43709e42092c7f6a4e990d696d9005fa1623d)
+version = (0, 5, 6, '+borg1')
+

+ 3 - 2
src/borg/helpers.py

@@ -1359,8 +1359,9 @@ def is_slow_msgpack():
 
 def is_supported_msgpack():
     # DO NOT CHANGE OR REMOVE! See also requirements and comments in setup.py.
-    return (0, 4, 6) <= msgpack.version <= (0, 5, 6) and \
-           msgpack.version not in [(0, 5, 0), (0, 5, 2), (0, 5, 3), (0, 5, 5)]
+    v = msgpack.version[:3]
+    return (0, 4, 6) <= v <= (0, 5, 6) and \
+           v not in [(0, 5, 0), (0, 5, 2), (0, 5, 3), (0, 5, 5)]
 
 
 FALSISH = ('No', 'NO', 'no', 'N', 'n', '0', )