Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow disabling fcntl (and use softfilelock) with environment variable #289

Open
leoleoasd opened this issue Nov 24, 2023 · 2 comments
Open

Comments

@leoleoasd
Copy link

I'm using a cluster and the home directory is a network volume that has fcntl disabled.

else: # pragma: win32 no cover
try:
import fcntl
except ImportError:
pass
else:
has_fcntl = True

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.

@yulonghui
Copy link

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!

@leoleoasd
Copy link
Author

import filelock
filelock.FileLock = filelock.SoftFileLock

import other_thing_requires_filelock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants