From da3ba38bccb1b76577d63e499230c80d31b70ad9 Mon Sep 17 00:00:00 2001 From: Maximilian Knespel Date: Thu, 3 Oct 2024 23:37:01 +0200 Subject: [PATCH] Avoid use of _pygit2.Blob.hex, which has been removed in pygit2 >= 1.15 (#1703) --- fsspec/implementations/git.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fsspec/implementations/git.py b/fsspec/implementations/git.py index 7c34d93e0..fde671b8c 100644 --- a/fsspec/implementations/git.py +++ b/fsspec/implementations/git.py @@ -80,7 +80,7 @@ def ls(self, path, detail=True, ref=None, **kwargs): { "type": "directory", "name": "/".join([path, obj.name]).lstrip("/"), - "hex": obj.hex, + "hex": str(obj.id), "mode": f"{obj.filemode:o}", "size": 0, } @@ -90,7 +90,7 @@ def ls(self, path, detail=True, ref=None, **kwargs): { "type": "file", "name": "/".join([path, obj.name]).lstrip("/"), - "hex": obj.hex, + "hex": str(obj.id), "mode": f"{obj.filemode:o}", "size": obj.size, } @@ -101,7 +101,7 @@ def ls(self, path, detail=True, ref=None, **kwargs): { "type": "file", "name": obj.name, - "hex": obj.hex, + "hex": str(obj.id), "mode": f"{obj.filemode:o}", "size": obj.size, }