Page MenuHomeSoftware Heritage

D584.id1834.diff
No OneTemporary

D584.id1834.diff

diff --git a/debian/control b/debian/control
--- a/debian/control
+++ b/debian/control
@@ -14,7 +14,7 @@
python3-psycopg2,
python3-setuptools,
python3-swh.core (>= 0.0.44~),
- python3-swh.model (>= 0.0.18~),
+ python3-swh.model (>= 0.0.27~),
python3-swh.objstorage (>= 0.0.17~),
python3-swh.scheduler (>= 0.0.26~),
python3-swh.storage (>= 0.0.108~),
@@ -25,7 +25,7 @@
Package: python3-swh.vault
Architecture: all
Depends: python3-swh.core (>= 0.0.44~),
- python3-swh.model (>= 0.0.18~),
+ python3-swh.model (>= 0.0.27~),
python3-swh.objstorage (>= 0.0.17~),
python3-swh.scheduler (>= 0.0.26~),
python3-swh.storage (>= 0.0.108~),
diff --git a/requirements-swh.txt b/requirements-swh.txt
--- a/requirements-swh.txt
+++ b/requirements-swh.txt
@@ -1,5 +1,5 @@
swh.core >= 0.0.44
-swh.model >= 0.0.18
+swh.model >= 0.0.27
swh.objstorage >= 0.0.17
swh.scheduler >= 0.0.26
swh.storage >= 0.0.106
diff --git a/swh/vault/tests/vault_testing.py b/swh/vault/tests/vault_testing.py
--- a/swh/vault/tests/vault_testing.py
+++ b/swh/vault/tests/vault_testing.py
@@ -60,5 +60,15 @@
def hash_content(content):
- obj_id = hashutil.hash_data(content)['sha1']
- return content, obj_id
+ """Hash the content's id (sha1).
+
+ Args:
+ content (bytes): Content to hash
+
+ Returns:
+ The tuple (content, content's id as bytes)
+
+ """
+ hashes = hashutil.MultiHash.from_data(
+ content, hash_names=['sha1']).digest()
+ return content, hashes['sha1']

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 30, 11:37 AM (14 h, 47 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3216722

Event Timeline