filelock
filelock copied to clipboard
A platform-independent file lock for Python.
The creation of a lockfile with … `lock = FileLock("/var/lock/foo.lock")` … leads to these file permissions: `-rwxr-xr-x` Is there any way to prevent that the lock file becomes an executable...
I ran into a strange bug when trying to lock a file on a network file-system mounted inside a container, where the lock file was created but for some reason...
I have some code that uses filelock, and is annotated something like this: ```python3 from typing import Optional from filelock import FileLock reveal_type(FileLock) lock: Optional[FileLock] = None ``` `mypy` previously...
It would block other coroutines when acquiring locks now. Hope it can use unblocking ways to wait for the lock. Such as `asyncio.sleep` By the way, in the meantime, I'm...
To avoid the case where lock files accidentally get left and lock things forever, we could have the process that acquires the lock set an expiration time on the lock....
The [API documentation of `filelock.FileLock`](https://py-filelock.readthedocs.io/en/latest/api.html#filelock.FileLock) simply reads: > alias of `filelock._unix.UnixFileLock` Naturally, this is only true on platforms supporting `fcntl.flock`, else it might be a `WindowsFileLock` or `SoftFileLock`. I assume...
Can be seen with test_threaded_lock_different_lock_obj, see https://github.com/tox-dev/py-filelock/runs/3777329793?check_suite_focus=true
Hi, On Windows 10.0.19041.687 Pro x64. Python 3.7.0: x64. Here is a test script: ``` import tempfile import pathlib import threading from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor from filelock import FileLock...
Hey For lock file in network attached `afpfs` lock was created for every python process I ran and didn't prevent parallel execution. I expected to receive a warning or error...
I was wondering if you had any recommendations of using this package in a multi user environment. We are trying to lock an abstract resource (well a user-land device driver)...