Skip to content

Commit a80ae45

Browse files
committed
Fix ZipStore serialization
1 parent 312c298 commit a80ae45

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/zarr/storage/_zip.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ async def _open(self) -> None:
108108
self._sync_open()
109109

110110
def __getstate__(self) -> dict[str, Any]:
111-
state = self.__dict__
111+
# We need a copy to not modify the state of the original store
112+
state = self.__dict__.copy()
112113
for attr in ["_zf", "_lock"]:
113114
state.pop(attr, None)
114115
return state

0 commit comments

Comments
 (0)