Allow disabling fcntl (and use softfilelock) with environment variable
leoleoasd opened this issue · comments
I'm using a cluster and the home directory is a network volume that has fcntl
disabled.
filelock/src/filelock/_unix.py
Lines 25 to 31 in 481daa4
filelock
currently selects fcntl
whenever the library is available, ignoring its availability on the file system.
NotImplementedError: FileSystem does not appear to support flock; user SoftFileLock instead
Adding an environment or some other way to control this behavior would be better.
Hi~, @leoleoasd
I also met this problem, Do you know how to solve this problem, or how can I use SoftFileLock instead of FileLock in the system?
Thanks!
import filelock
filelock.FileLock = filelock.SoftFileLock
import other_thing_requires_filelock