File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ dependencies:
11
11
- compilers
12
12
- numpy>=1.17.0
13
13
- scipy>=0.14
14
- - filelock
14
+ - filelock>=3.15
15
15
- etuples
16
16
- logical-unification
17
17
- miniKanren
@@ -27,7 +27,6 @@ dependencies:
27
27
- coveralls
28
28
- diff-cover
29
29
- mypy
30
- - types-filelock
31
30
- types-setuptools
32
31
- pytest
33
32
- pytest-cov
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ dependencies = [
49
49
" setuptools>=59.0.0" ,
50
50
" scipy>=0.14" ,
51
51
" numpy>=1.17.0,<2" ,
52
- " filelock" ,
52
+ " filelock>=3.15 " ,
53
53
" etuples" ,
54
54
" logical-unification" ,
55
55
" miniKanren" ,
Original file line number Diff line number Diff line change 6
6
import os
7
7
import threading
8
8
from contextlib import contextmanager
9
+ from pathlib import Path
9
10
10
11
import filelock
11
12
@@ -35,7 +36,7 @@ def force_unlock(lock_dir: os.PathLike):
35
36
Path to a directory that was locked with `lock_ctx`.
36
37
"""
37
38
38
- fl = filelock .FileLock (os . path . join (lock_dir , ".lock" ) )
39
+ fl = filelock .FileLock (Path (lock_dir ) / ".lock" )
39
40
fl .release (force = True )
40
41
41
42
dir_key = f"{ lock_dir } -{ os .getpid ()} "
@@ -72,7 +73,7 @@ def lock_ctx(
72
73
73
74
if dir_key not in local_mem ._locks :
74
75
local_mem ._locks [dir_key ] = True
75
- fl = filelock .FileLock (os . path . join (lock_dir , ".lock" ) )
76
+ fl = filelock .FileLock (Path (lock_dir ) / ".lock" )
76
77
fl .acquire (timeout = timeout )
77
78
try :
78
79
yield
You can’t perform that action at this time.
0 commit comments