Skip to content

Commit 2909e6b

Browse files
committed
make fasteners conditional import
1 parent 7fa5221 commit 2909e6b

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

zarr/sync.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,6 @@
55
import os
66

77

8-
import fasteners
9-
10-
11-
from zarr.core import Array
12-
from zarr.attrs import Attributes
13-
from zarr.storage import attrs_key
14-
15-
168
class ThreadSynchronizer(object):
179
"""Provides synchronization using thread locks."""
1810

@@ -48,6 +40,7 @@ def __init__(self, path):
4840
self.path = path
4941

5042
def __getitem__(self, item):
43+
import fasteners
5144
lock = fasteners.InterProcessLock(
5245
os.path.join(self.path, '%s.lock' % item)
5346
)

0 commit comments

Comments
 (0)