From 997a6e0dc56fe3c3ffabf4d3bd8cc2b417f5febe Mon Sep 17 00:00:00 2001 From: David Kegley Date: Thu, 1 Oct 2026 13:36:25 -0400 Subject: [PATCH 1/2] fix: encode multifile hash as utf8 --- pins/tests/test_versions.py | 9 +++++++++ pins/versions.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/pins/tests/test_versions.py b/pins/tests/test_versions.py index 6432108b..a731c7c3 100644 --- a/pins/tests/test_versions.py +++ b/pins/tests/test_versions.py @@ -51,3 +51,12 @@ def test_version_from_files(bytes_): assert v.hash == digest assert v.created == EXAMPLE_DATE + + +def test_version_from_files_multiple(): + files = [BytesIO(b"123"), BytesIO(b"456")] + v = Version.from_files(files, EXAMPLE_DATE) + + combined = xxhash.xxh64(b"123").hexdigest() + xxhash.xxh64(b"456").hexdigest() + assert v.hash == xxhash.xxh64(combined.encode("utf-8")).hexdigest() + assert v.created == EXAMPLE_DATE diff --git a/pins/versions.py b/pins/versions.py index c05babcf..d618e8b8 100644 --- a/pins/versions.py +++ b/pins/versions.py @@ -109,7 +109,7 @@ def from_files( combined_hashes = "".join(hashes) # Create an xxh64 hash of the combined string - hashes = [xxh64(combined_hashes).hexdigest()] + hashes = [xxh64(combined_hashes.encode("utf-8")).hexdigest()] return cls(created, hashes[0]) From 9b0caa693596c5a095d2b27face40ac044ff5ba9 Mon Sep 17 00:00:00 2001 From: David Kegley Date: Thu, 1 Oct 2026 14:03:25 -0400 Subject: [PATCH 2/2] fix pyright errors in CI --- pins/rsconnect/fs.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pins/rsconnect/fs.py b/pins/rsconnect/fs.py index f16a34d9..2f519c95 100644 --- a/pins/rsconnect/fs.py +++ b/pins/rsconnect/fs.py @@ -3,7 +3,6 @@ from collections.abc import Sequence from dataclasses import asdict, dataclass, field, fields from pathlib import Path -from typing import ClassVar from fsspec import AbstractFileSystem @@ -108,7 +107,7 @@ class BundleFilePath(BundlePath): class RsConnectFs(AbstractFileSystem): - protocol: ClassVar[str | tuple[str, ...]] = "rsc" + protocol = "rsc" def __init__(self, server_url, **kwargs): if isinstance(server_url, RsConnectApi):