diff --git a/src/borg/algorithms/msgpack/_version.py b/src/borg/algorithms/msgpack/_version.py index d28f0deb8..7bd3b0dd5 100644 --- a/src/borg/algorithms/msgpack/_version.py +++ b/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') + diff --git a/src/borg/helpers.py b/src/borg/helpers.py index f61e15b71..e7abf6e31 100644 --- a/src/borg/helpers.py +++ b/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', )