refactor: release tools read file_digest

core.hashing.file_digest is the streamed loop the release tools carried,
byte for byte: 1 MiB reads, read again each call. It replaces
compute_hashes with cache=False there.
This commit is contained in:
Abdessamad Derraz committed 2026-11-18 20:44:56 +01:00
1 parent 27bff61560
commit ba692da94f
4 files changed
+11 -9

No files matched your search

+2 -2
View File
@@ -7,7 +7,7 @@ import subprocess
from dataclasses import dataclass
from pathlib import Path
from core.hashing import compute_hashes
from core.hashing import file_digest
from release.assets import digests_of
from model.largefiles import LARGE_FILES_REPO
@@ -114,7 +114,7 @@ def compare_release(
def _sha256(path: Path) -> str:
return compute_hashes(path, frozenset({"sha256"}), cache=False)["sha256"]
return file_digest(path, "sha256")
def fetch_assets(tag: str) -> tuple[dict[str, Asset], bool]: