From 0323c2f987a646c2c8595f48e4f0394f27fd369c Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 18 Nov 2024 01:48:01 +0100 Subject: [PATCH] adapt to and require borghash 0.1.0 --- pyproject.toml | 2 +- src/borg/hashindex.pyx | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c4acda6c9..0c0e0f5f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ classifiers = [ ] license = {text="BSD"} dependencies = [ - "borghash ~= 0.0.1", + "borghash ~= 0.1.0", "borgstore ~= 0.1.0", "msgpack >=1.0.3, <=1.1.0", "packaging", diff --git a/src/borg/hashindex.pyx b/src/borg/hashindex.pyx index 75b3b4a85..97fc213f1 100644 --- a/src/borg/hashindex.pyx +++ b/src/borg/hashindex.pyx @@ -35,6 +35,8 @@ class HTProxyMixin: ChunkIndexEntry = namedtuple('ChunkIndexEntry', 'flags size') +ChunkIndexEntryFormatT = namedtuple('ChunkIndexEntryFormatT', 'flags size') +ChunkIndexEntryFormat = ChunkIndexEntryFormatT(flags="I", size="I") class ChunkIndex(HTProxyMixin, MutableMapping): @@ -57,7 +59,8 @@ class ChunkIndex(HTProxyMixin, MutableMapping): else: if usable is not None: capacity = usable * 2 # load factor 0.5 - self.ht = HashTableNT(key_size=32, value_format="