mirror of
https://github.com/borgbackup/borg.git
synced 2026-07-15 13:06:55 -04:00
Merge pull request #9790 from ThomasWaldmann/support-msgpack121-1.4
Some checks failed
CI / lint (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
Windows CI / msys2-ucrt64 (push) Has been cancelled
CI / asan_ubsan (push) Has been cancelled
CI / native_tests (push) Has been cancelled
CI / vm_tests (Haiku, false, haiku, r1beta5) (push) Has been cancelled
CI / vm_tests (NetBSD, false, netbsd, 10.1) (push) Has been cancelled
CI / vm_tests (OpenBSD, false, openbsd, 7.7) (push) Has been cancelled
CI / vm_tests (borg-freebsd-14-x86_64-gh, FreeBSD, true, freebsd, 14.3) (push) Has been cancelled
Some checks failed
CI / lint (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
Windows CI / msys2-ucrt64 (push) Has been cancelled
CI / asan_ubsan (push) Has been cancelled
CI / native_tests (push) Has been cancelled
CI / vm_tests (Haiku, false, haiku, r1beta5) (push) Has been cancelled
CI / vm_tests (NetBSD, false, netbsd, 10.1) (push) Has been cancelled
CI / vm_tests (OpenBSD, false, openbsd, 7.7) (push) Has been cancelled
CI / vm_tests (borg-freebsd-14-x86_64-gh, FreeBSD, true, freebsd, 14.3) (push) Has been cancelled
support msgpack 1.2.1
This commit is contained in:
commit
5bfbfacf16
4 changed files with 25 additions and 12 deletions
|
|
@ -473,7 +473,7 @@ Note: Many of the fixed issues listed below relate to rather rare or theoretical
|
|||
|
||||
Other changes:
|
||||
|
||||
- msgpack: allow 1.2.0
|
||||
- msgpack: also allow 1.2.0 and 1.2.1
|
||||
- use F_FULLFSYNC on macOS for SyncFile data durability, #9383
|
||||
- mount: improve error msg when uid/gid cannot be resolved, #9574
|
||||
- docs:
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ dependencies = [
|
|||
# Please note:
|
||||
# Using any other msgpack version is not supported by Borg development and
|
||||
# any feedback related to issues caused by this will be ignored.
|
||||
"msgpack >=1.0.3, <=1.2.0",
|
||||
"msgpack >=1.0.3, <=1.2.1",
|
||||
"packaging",
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -1035,22 +1035,35 @@ Utilization of max. archive size: {csize_max:.0%}
|
|||
data = self.key.decrypt(items_id, data)
|
||||
unpacker.feed(data)
|
||||
chunk_decref(items_id, stats)
|
||||
try:
|
||||
for item in unpacker:
|
||||
while True:
|
||||
try:
|
||||
item = next(unpacker)
|
||||
except StopIteration:
|
||||
# no more (complete) items in the buffer, feed the next chunk
|
||||
break
|
||||
except msgpack.UnpackException:
|
||||
# items metadata corrupted. the unpacker can't be reused after an
|
||||
# unpacking failure, so create a fresh one and skip the rest of this chunk.
|
||||
if forced == 0:
|
||||
raise
|
||||
error = True
|
||||
unpacker = msgpack.Unpacker(use_list=False)
|
||||
break
|
||||
try:
|
||||
item = Item(internal_dict=item)
|
||||
if 'chunks' in item:
|
||||
part = not self.consider_part_files and 'part' in item
|
||||
for chunk_id, size, csize in item.chunks:
|
||||
chunk_decref(chunk_id, stats, part=part)
|
||||
except (TypeError, ValueError):
|
||||
# if items metadata spans multiple chunks and one chunk got dropped somehow,
|
||||
# it could be that unpacker yields bad types
|
||||
if forced == 0:
|
||||
raise
|
||||
error = True
|
||||
except (TypeError, ValueError):
|
||||
# if items metadata spans multiple chunks and one chunk got dropped somehow,
|
||||
# it could be that unpacker yields bad types
|
||||
if forced == 0:
|
||||
raise
|
||||
error = True
|
||||
if progress:
|
||||
pi.finish()
|
||||
except (msgpack.UnpackException, Repository.ObjectNotFound):
|
||||
except Repository.ObjectNotFound:
|
||||
# items metadata corrupted
|
||||
if forced == 0:
|
||||
raise
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ def is_supported_msgpack():
|
|||
version_check = os.environ.get('BORG_MSGPACK_VERSION_CHECK', 'yes').strip().lower()
|
||||
|
||||
return version_check == 'no' or (
|
||||
(1, 0, 3) <= msgpack.version[:3] <= (1, 2, 0) and
|
||||
(1, 0, 3) <= msgpack.version[:3] <= (1, 2, 1) and
|
||||
msgpack.version not in []
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue