Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/tox-dev/filelock
/ functions
Functions
572 in github.com/tox-dev/filelock
⨍
Functions
572
◇
Types & classes
42
↳
Endpoints
7
↓ 1 callers
Method
acquire_write
Acquire an exclusive write lock. See :meth:`SoftReadWriteLock.acquire_write` for the two-phase writer-preferring semantics. The bloc
src/filelock/_soft_rw/_async.py:132
↓ 1 callers
Method
break_lock
Forcibly break the lock by removing the lock file, regardless of who holds it.
src/filelock/_soft.py:172
↓ 1 callers
Function
compute_next_version
(current: str, bump: str)
tasks/changelog.py:92
↓ 1 callers
Function
decorated_method
()
tests/test_filelock.py:564
↓ 1 callers
Function
entries
( gh_repo: GitHubRepository, git_repo: Repo, pr_number: int | None, base: str, excluded_authors: set[str]
tasks/changelog.py:101
↓ 1 callers
Method
is_thread_local
:returns: a flag indicating if this lock is thread local or not
src/filelock/_api.py:253
↓ 1 callers
Function
latest_tag_version
(git_repo: Repo)
tasks/changelog.py:82
↓ 1 callers
Function
parse_cli
()
tasks/changelog.py:72
↓ 1 callers
Function
run
()
tasks/changelog.py:39
↓ 1 callers
Method
write_lock
Context manager that acquires and releases an exclusive write lock. Falls back to instance defaults for *timeout* and *blocking* whe
src/filelock/_soft_rw/_sync.py:256
Method
__aenter__
(self)
src/filelock/_async_read_write.py:26
Method
__aenter__
(self)
src/filelock/asyncio.py:60
Method
__aenter__
Acquire the lock. :returns: the lock object
src/filelock/asyncio.py:347
Method
__aenter__
(self)
src/filelock/_soft_rw/_async.py:25
Method
__aexit__
( self, exc_type: type[BaseException] | None, exc_value: BaseException | None,
src/filelock/_async_read_write.py:29
Method
__aexit__
( # noqa: D105 self, exc_type: type[BaseException] | None, exc_value: BaseException |
src/filelock/asyncio.py:63
Method
__aexit__
Release the lock. :param exc_type: the exception type if raised :param exc_value: the exception value if raised :par
src/filelock/asyncio.py:357
Method
__aexit__
( self, exc_type: type[BaseException] | None, exc_value: BaseException | None,
src/filelock/_soft_rw/_async.py:28
Method
__call__
( # noqa: PLR0913 cls: type[_T], lock_file: str | os.PathLike[str], timeout: float =
src/filelock/_api.py:116
Method
__call__
( cls, lock_file: str | os.PathLike[str], timeout: float = -1, *, bloc
src/filelock/_read_write.py:71
Method
__call__
( # ty: ignore[invalid-method-override] # noqa: PLR0913 cls: type[_AT], # noqa: N805 lock_f
src/filelock/asyncio.py:76
Method
__call__
( # noqa: PLR0913 cls, lock_file: str | os.PathLike[str], timeout: float = -1,
src/filelock/_soft_rw/_sync.py:90
Method
__del__
Called when the lock object is deleted.
src/filelock/_api.py:610
Method
__del__
(self)
src/filelock/_async_read_write.py:206
Method
__del__
Release on deletion — safe to call during GC even when no event loop is running.
src/filelock/asyncio.py:373
Method
__enter__
(self)
src/filelock/_api.py:62
Method
__enter__
Acquire the lock. :returns: the lock object
src/filelock/_api.py:584
Method
__enter__
Sync context manager entry is not supported because lock acquisition is a coroutine.
src/filelock/asyncio.py:332
Method
__exit__
( self, exc_type: type[BaseException] | None, exc_value: BaseException | None,
src/filelock/_api.py:65
Method
__exit__
Release the lock. :param exc_type: the exception type if raised :param exc_value: the exception value if raised :par
src/filelock/_api.py:594
Method
__exit__
Sync context manager exit is not supported because lock release is a coroutine.
src/filelock/asyncio.py:337
Method
__getattr__
(self, name: str)
tests/test_read_write_unit.py:598
Method
__getattr__
(self, name: str)
tests/test_read_write_unit.py:643
Method
__init__
(self)
src/filelock/_api.py:45
Method
__init__
(self, lock: BaseFileLock | ReadWriteLock | SoftReadWriteLock)
src/filelock/_api.py:59
Method
__init__
( self, lock_file: str | os.PathLike[str], timeout: float = -1, *, blo
src/filelock/_read_write.py:141
Method
__init__
(self, lock_file: str)
src/filelock/_error.py:7
Method
__init__
(self, lock: AsyncReadWriteLock)
src/filelock/_async_read_write.py:23
Method
__init__
( # noqa: PLR0913 self, lock_file: str | os.PathLike[str], timeout: float = -1,
src/filelock/_async_read_write.py:60
Method
__init__
(self, lock: BaseAsyncFileLock)
src/filelock/asyncio.py:57
Method
__init__
Create a new lock object. :param lock_file: path to the file :param timeout: default timeout when acquiring the lock, in sec
src/filelock/asyncio.py:117
Method
__init__
( # noqa: PLR0913 self, lock_file: str | os.PathLike[str], timeout: float = -1,
src/filelock/_soft_rw/_sync.py:185
Method
__init__
( self, refresh: Callable[[], bool], interval: float, stop_event: threading.Ev
src/filelock/_soft_rw/_sync.py:734
Method
__init__
(self, lock: AsyncSoftReadWriteLock)
src/filelock/_soft_rw/_async.py:22
Method
__init__
( # noqa: PLR0913 self, lock_file: str | os.PathLike[str], timeout: float = -1,
src/filelock/_soft_rw/_async.py:59
Method
__init__
( self, lock_file: str | os.PathLike[str], timeout: float = -1,
tests/test_filelock.py:786
Method
__init__
( self, lock_file: str | os.PathLike[str], timeout: float = -1,
tests/test_filelock.py:803
Method
__init__
(self, file_path: str)
tests/test_filelock.py:919
Method
__init_subclass__
Setup unique state for lock subclasses.
src/filelock/_api.py:194
Method
__repr__
(self)
src/filelock/_error.py:17
Method
__str__
(self)
src/filelock/_error.py:14
Method
_acquire
(self)
src/filelock/_unix.py:21
Method
_acquire
(self)
src/filelock/_windows.py:59
Method
_acquire
(self)
src/filelock/_soft.py:35
Method
_acquire
(self)
tests/test_async_filelock.py:168
Function
_cleanup_all_instances
()
src/filelock/_soft_rw/_sync.py:911
Function
_clear_singleton_cache
()
tests/test_read_write_unit.py:32
Function
_clear_singleton_cache
()
tests/test_async_read_write.py:22
Function
_clear_singletons
()
tests/soft_rw/test_soft_rw_sync.py:99
Function
_clear_singletons
()
tests/soft_rw/test_soft_rw_async.py:19
Function
_close_eio
(fd: int)
tests/test_unix_fallback.py:106
Function
_reacquire_fresh_lock_in_child
(lock_file: str, child_path: str, result: EventType, failure: EventType)
tests/soft_rw/test_soft_rw_sync.py:974
Method
_release
(self)
src/filelock/_unix.py:24
Method
_release
(self)
src/filelock/_windows.py:88
Method
_release
(self)
src/filelock/_soft.py:177
Function
_release_inherited_lock
(lock_file: str, result: EventType, failure: EventType)
tests/soft_rw/test_soft_rw_sync.py:951
Function
_reset_all_after_fork
()
src/filelock/_soft_rw/_sync.py:901
Function
_reuse_inherited_lock
(lock_file: str, result: EventType, failure: EventType)
tests/soft_rw/test_soft_rw_sync.py:928
Function
_run
()
tests/test_async_filelock.py:343
Function
_sigkill_worker
( lock_file: str, mode: Literal["read", "write"], acquired_event: EventType, heartbeat_interva
tests/soft_rw/test_soft_rw_sync.py:65
Function
_worker
( lock_file: str, mode: Literal["read", "write"], acquired_event: EventType, release_event: Ev
tests/soft_rw/test_soft_rw_sync.py:33
Function
acquire_in_thread
()
tests/test_self_deadlock.py:86
Function
acquire_lock
( lock_file: str, mode: Literal["read", "write"], acquired_event: EventType, release_event: Ev
tests/test_read_write.py:22
Function
acquire_read_lock_and_crash
(lock_file: str, acquired_event: EventType)
tests/test_read_write.py:483
Function
acquire_write_in_thread
()
tests/test_read_write_unit.py:676
Function
acquire_write_lock_and_crash
(lock_file: str, acquired_event: EventType)
tests/test_read_write.py:449
Function
acquirer
()
tests/test_read_write_unit.py:607
Method
blocking
Whether the locking is blocking or not. .. versionadded:: 3.14.0
src/filelock/_api.py:293
Method
blocking
Whether blocking is enabled by default.
src/filelock/_async_read_write.py:86
Method
blocking
Whether ``acquire_*`` defaults to blocking; ``False`` makes contention raise immediately.
src/filelock/_soft_rw/_async.py:95
Function
boom
(name: str, *, fd: int | None = None)
tests/soft_rw/test_soft_rw_sync.py:665
Function
cancel_after_two
()
tests/test_filelock.py:1137
Function
chain_reader
( reader_index: int, lock_file: str, release_count: Synchronized[int], start_signal: EventType
tests/test_read_write.py:175
Function
child_entry
()
tests/soft_rw/test_soft_rw_sync.py:933
Method
close
Release any held lock and release the underlying filesystem resources. Idempotent.
src/filelock/_soft_rw/_async.py:201
Method
executor
The executor used for ``run_in_executor`` (a dedicated single-thread one if none was supplied).
src/filelock/_async_read_write.py:96
Method
executor
The executor.
src/filelock/asyncio.py:188
Method
executor
The executor used for ``run_in_executor``, or ``None`` for the default executor.
src/filelock/_soft_rw/_async.py:105
Function
fake_acquire
(blocking: bool = True, timeout: float = -1)
tests/test_read_write_unit.py:437
Function
fstat_unlinked_once
(fd: int)
tests/test_filelock.py:1032
Function
gated
(*, blocking: bool, timeout: float)
tests/test_read_write_unit.py:670
Method
get_lock
Return the singleton :class:`SoftReadWriteLock` for *lock_file*. :param lock_file: path to the lock file; sidecar state/write/reader
src/filelock/_soft_rw/_sync.py:435
Function
gone
(name: str, *, dir_fd: int | None = None)
tests/soft_rw/test_soft_rw_sync.py:685
Method
has_explicit_mode
Whether the file permissions were explicitly set.
src/filelock/_api.py:368
Function
hold_read
()
tests/test_read_write_unit.py:320
Function
hold_write
()
tests/test_read_write_unit.py:300
Function
hook
(seconds: float)
tests/soft_rw/test_soft_rw_sync.py:642
Method
is_lock_held_by_us
Whether this lock is held by the current process. :returns: ``True`` if the lock file exists and names the current process's PID and
src/filelock/_soft.py:158
Method
is_locked
A boolean indicating if the lock file is holding the lock currently. .. versionchanged:: 2.0.0 This was previously a me
src/filelock/_api.py:401
Method
is_singleton
A flag indicating if this lock is singleton or not. .. versionadded:: 3.13.0
src/filelock/_api.py:258
← previous
next →
101–200 of 572, ranked by callers