Skip to content

Commit

Permalink
Fix zarr sync (zarr-developers#1663)
Browse files Browse the repository at this point in the history
This patch removes fasteners and disables zarr.sync which uses process and thread

Co-authored-by: Wei Ouyang <[email protected]>
  • Loading branch information
hoodmane and oeway authored Feb 14, 2024
1 parent a81db07 commit 4f2ace4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ requires-python = ">=3.9"
dependencies = [
'asciitree',
'numpy>=1.21.1',
'fasteners',
'fasteners; sys_platform != "emscripten"',
'numcodecs>=0.10.0',
]
dynamic = [
Expand Down
4 changes: 2 additions & 2 deletions zarr/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
from threading import Lock
from typing import Protocol

import fasteners


class Synchronizer(Protocol):
"""Base class for synchronizers."""
Expand Down Expand Up @@ -49,6 +47,8 @@ def __init__(self, path):
self.path = path

def __getitem__(self, item):
import fasteners

path = os.path.join(self.path, item)
lock = fasteners.InterProcessLock(path)
return lock
Expand Down

0 comments on commit 4f2ace4

Please sign in to comment.