MCPcopy Create free account

hub / github.com/tox-dev/filelock / functions

Functions117 in github.com/tox-dev/filelock

↓ 21 callersMethodacquire
Try to acquire the file lock. :param timeout: maximum wait time for acquiring the lock, ``None`` means use the default :attr:`~timeo
src/filelock/_api.py:271
↓ 15 callersMethodrelease
Releases the file lock. Please note, that the lock is only completely released, if the lock counter is 0. Also note, that the lock fi
src/filelock/_api.py:350
↓ 4 callersMethodjoin
(self, timeout: float | None = None)
tests/test_filelock.py:235
↓ 3 callersMethod__init__
(self, target: Callable[[], None], name: str)
tests/test_filelock.py:225
↓ 3 callersFunctionensure_directory_exists
Ensure the directory containing the file exists (create it if necessary). :param filename: file.
src/filelock/_util.py:39
↓ 3 callersMethodrelease
Releases the file lock. Please note, that the lock is only completely released, if the lock counter is 0. Also note, that the lock fi
src/filelock/asyncio.py:248
↓ 2 callersMethod_run_internal_method
(self, method: Callable[[], Any])
src/filelock/asyncio.py:267
↓ 2 callersFunctionmake_ro
(path: Path)
tests/test_filelock.py:59
↓ 2 callersFunctionraise_on_not_writable_file
Raise an exception if attempting to open the file for writing would fail. This is done so files that will never be writable can be separated
src/filelock/_util.py:10
↓ 1 callersMethod_acquire
If the file lock could be acquired, self._context.lock_file_fd holds the file descriptor of the lock file.
src/filelock/_api.py:245
↓ 1 callersFunction_check_file_read_write
(txt_file: Path)
tests/test_filelock.py:614
↓ 1 callersMethod_release
Releases the lock and sets self._context.lock_file_fd to None.
src/filelock/_api.py:250
↓ 1 callersMethod_release
(self)
tests/test_async_filelock.py:170
↓ 1 callersMethodacquire
Try to acquire the file lock. :param timeout: maximum wait time for acquiring the lock, ``None`` means use the default :
src/filelock/asyncio.py:180
↓ 1 callersFunctiondecorated_method
()
tests/test_filelock.py:504
↓ 1 callersMethodis_thread_local
:return: a flag indicating if this lock is thread local or not
src/filelock/_api.py:191
↓ 1 callersMethodrun_in_executor
::return: whether run in executor.
src/filelock/asyncio.py:155
Method__aenter__
(self)
src/filelock/asyncio.py:58
Method__aenter__
Acquire the lock. :return: the lock object
src/filelock/asyncio.py:288
Method__aexit__
( # noqa: D105 self, exc_type: type[BaseException] | None, exc_value: BaseException |
src/filelock/asyncio.py:61
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:298
Method__call__
( # noqa: PLR0913 cls, lock_file: str | os.PathLike[str], timeout: float = -1,
src/filelock/_api.py:82
Method__call__
( # type: ignore[override] # noqa: PLR0913 cls, # noqa: N805 lock_file: str | os.PathLike[st
src/filelock/asyncio.py:71
Method__del__
Called when the lock object is deleted.
src/filelock/_api.py:395
Method__del__
Called when the lock object is deleted.
src/filelock/asyncio.py:314
Method__enter__
(self)
src/filelock/_api.py:39
Method__enter__
Acquire the lock. :return: the lock object
src/filelock/_api.py:369
Method__enter__
Replace old __enter__ method to avoid using it. NOTE: DO NOT USE `with` FOR ASYNCIO LOCKS, USE `async with` INSTEAD. :retur
src/filelock/asyncio.py:276
Method__exit__
( self, exc_type: type[BaseException] | None, exc_value: BaseException | None,
src/filelock/_api.py:42
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:379
Method__init__
(self, lock: BaseFileLock)
src/filelock/_api.py:36
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/_api.py:152
Method__init__
(self, lock_file: str)
src/filelock/_error.py:9
Method__init__
(self, lock: BaseAsyncFileLock)
src/filelock/asyncio.py:55
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:104
Method__init__
( self, lock_file: str | os.PathLike[str], timeout: float = -1,
tests/test_filelock.py:683
Method__init__
( self, lock_file: str | os.PathLike[str], timeout: float = -1,
tests/test_filelock.py:699
Method__init__
(self, file_path: str)
tests/test_filelock.py:809
Method__init_subclass__
Setup unique state for lock subclasses.
src/filelock/_api.py:147
Method__reduce__
(self)
src/filelock/_error.py:13
Method__repr__
(self)
src/filelock/_error.py:19
Method__str__
(self)
src/filelock/_error.py:16
Method_acquire
(self)
src/filelock/_unix.py:20
Method_acquire
(self)
src/filelock/_windows.py:19
Method_acquire
(self)
src/filelock/_soft.py:16
Method_acquire
(self)
tests/test_async_filelock.py:165
Method_release
(self)
src/filelock/_unix.py:23
Method_release
(self)
src/filelock/_windows.py:42
Method_release
(self)
src/filelock/_soft.py:37
Methodblocking
:return: whether the locking is blocking or not
src/filelock/_api.py:225
Methodexecutor
::return: the executor.
src/filelock/asyncio.py:160
Methodis_locked
:return: A boolean indicating if the lock file is holding the lock currently. .. versionchanged:: 2.0.0 This was previ
src/filelock/_api.py:255
Methodis_singleton
:return: a flag indicating if this lock is singleton or not
src/filelock/_api.py:196
Methodlock_counter
:return: The number of times this lock has been acquired (but not yet released).
src/filelock/_api.py:267
Methodlock_file
:return: path to the lock file
src/filelock/_api.py:201
Methodlock_file
:return: The path of the file lock.
src/filelock/_error.py:23
Methodloop
::return: the event loop.
src/filelock/asyncio.py:176
Functionmess_with_file
(lock_: BaseFileLock)
tests/test_filelock.py:623
Methodmode
:return: the file permissions for the lockfile
src/filelock/_api.py:240
Methodresolve_xref
( # noqa: PLR0913, PLR0917 self, env: BuildEnvironment, fromdocname: str,
docs/conf.py:58
Methodrun
(self)
tests/test_filelock.py:229
Functionsetup
Setup app. :param app: the app
docs/conf.py:49
Functiont_1
()
tests/test_filelock.py:268
Functiont_2
()
tests/test_filelock.py:274
Functiontest_acquire
( lock_type: type[BaseAsyncFileLock], path_type: type[str | Path], filename: str, tmp_path: Pa
tests/test_async_filelock.py:47
Functiontest_acquire_release_on_exc
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:435
Functiontest_bad_lock_file
( lock_type: type[BaseFileLock], expected_error: type[Exception], match: str, bad_lock_file: s
tests/test_filelock.py:129
Functiontest_cleanup_soft_lock
(tmp_path: Path)
tests/test_filelock.py:474
Functiontest_context_decorator
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:499
Functiontest_context_release_on_exc
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:420
Functiontest_coroutine_function
(tmp_path: Path)
tests/test_async_filelock.py:161
Functiontest_default_timeout
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:388
Functiontest_del
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:451
Functiontest_file_lock_positional_argument
(tmp_path: Path)
tests/test_filelock.py:807
Functiontest_flock_not_implemented_unix
(tmp_path: Path, mocker: MockerFixture)
tests/test_filelock.py:602
Functiontest_lock_can_be_non_thread_local
( tmp_path: Path, lock_type: type[BaseFileLock], )
tests/test_filelock.py:665
Functiontest_lock_mode
(tmp_path: Path)
tests/test_filelock.py:512
Functiontest_lock_mode_soft
(tmp_path: Path)
tests/test_filelock.py:531
Functiontest_nested_acquire
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:165
Functiontest_nested_context_manager
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:142
Functiontest_nested_contruct
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:205
Functiontest_nested_forced_release
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:188
Functiontest_non_blocking
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:319
Functiontest_non_blocking
(lock_type: type[BaseAsyncFileLock], tmp_path: Path)
tests/test_async_filelock.py:77
Functiontest_non_executor
(lock_type: type[BaseAsyncFileLock], thread_local: bool, tmp_path: Path)
tests/test_async_filelock.py:151
Functiontest_poll_intervall_deprecated
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:484
Functiontest_ro_file
(lock_type: type[BaseFileLock], tmp_file_ro: Path)
tests/test_filelock.py:97
Functiontest_ro_folder
(lock_type: type[BaseFileLock], tmp_path_ro: Path)
tests/test_filelock.py:78
Functiontest_simple
( lock_type: type[BaseFileLock], path_type: type[str | Path], filename: str, tmp_path: Path,
tests/test_filelock.py:30
Functiontest_simple
( lock_type: type[BaseAsyncFileLock], path_type: type[str | Path], filename: str, tmp_path: Pa
tests/test_async_filelock.py:15
Functiontest_singleton_and_non_singleton_locks_are_distinct
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:715
Functiontest_singleton_instance_tracking_is_unique_per_subclass
(lock_type: type[BaseFileLock])
tests/test_filelock.py:778
Functiontest_singleton_locks_are_deleted_when_no_external_references_exist
( lock_type: type[BaseFileLock], tmp_path: Path, )
tests/test_filelock.py:764
Functiontest_singleton_locks_are_distinct_per_lock_file
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:735
Functiontest_singleton_locks_are_the_same
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:726
Functiontest_singleton_locks_must_be_initialized_with_the_same_args
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:745
Functiontest_singleton_locks_when_inheriting_init_is_called_once
(tmp_path: Path)
tests/test_filelock.py:790
Functiontest_soft_errors
(tmp_path: Path, mocker: MockerFixture)
tests/test_filelock.py:608
Functiontest_subclass_compatibility
(tmp_path: Path)
tests/test_filelock.py:681
Functiontest_thrashing_with_thread_pool_global_lock
(tmp_path: Path, lock_type: type[BaseFileLock])
tests/test_filelock.py:635
next →1–100 of 117, ranked by callers