§
    ´¯¸jÂ  ã                   óè  — U d Z ddlmZmZmZmZ ddlmZmZm	Z	m
Z
mZmZmZ 	 ddlmZ n# e$ r  G d„ d¦  «        ZY nw xY wej        Zej        Zej        Zej        Zej        Zej        Zej        Zej        Zej        Zej        Zej        Zej        j        Zej        ed<   ej        j         Z!ej        ed<   ej        j"        Z#ej        ed	<   ej        j$        Z%ej        ed
<   ej        Zg d¢Z&dS )a8  Cross-platform file locking, with optional Redis-backed distributed locks.

This is the public entry point of the ``portalocker`` package. Most of what
you need lives directly on this module:

- `Lock` and `RLock` open a file and hold an OS-level advisory lock on it
  for the lifetime of the ``with`` block; `RLock` additionally allows the
  same thread to re-enter the lock.
- `BoundedSemaphore` and `NamedBoundedSemaphore` cap the number of
  processes that may hold a lock concurrently, using a directory of lock
  files rather than a single one.
- `PidFileLock` writes the current process ID into the lock file, so a
  stale lock left behind by a crashed process can be recognised.
- `TemporaryFileLock` is a short-lived variant of `Lock` intended for
  small, throwaway critical sections.
- `RedisLock` is a distributed lock built on Redis pubsub, for
  coordinating processes that do not share a filesystem. It requires the
  optional ``redis`` dependency; when that package is not installed,
  `RedisLock` is still importable - as a stub class whose constructor
  raises ``ImportError`` - so that ``import portalocker`` never fails
  and the missing dependency is only reported at use time. Install it
  with ``pip install "portalocker[redis]"``.
- `lock` and `unlock` are the low-level, platform-specific primitives that
  the classes above are built on; reach for them only if the context
  managers do not fit your use case.

Example:
    >>> import portalocker
    >>> with portalocker.Lock('somefile', timeout=1) as fh:
    ...     _ = fh.write('writing some stuff to my cache')
é   )Ú	__about__Ú	constantsÚ
exceptionsÚportalocker)ÚBoundedSemaphoreÚLockÚNamedBoundedSemaphoreÚPidFileLockÚRLockÚTemporaryFileLockÚopen_atomic)Ú	RedisLockc                   ó&   — e Zd ZdZdededdfd„ZdS )r   a*  Stub for the optional Redis-backed lock.

        Bound to ``portalocker.RedisLock`` only when the optional
        ``redis`` package is not installed. Constructing it names the
        missing dependency and how to install it, instead of failing
        with an inscrutable ``TypeError``.
        ÚargsÚkwargsÚreturnNc                 ó    — t          d¦  «        ‚)aŸ  Report the missing optional dependency.

            Args:
                args: Ignored, accepted for signature compatibility.
                kwargs: Ignored, accepted for signature compatibility.

            Raises:
                ImportError: Always. ``RedisLock`` needs the optional
                    redis dependency, installable with
                    ``pip install "portalocker[redis]"``.
            zoportalocker.RedisLock requires the optional redis dependency. Install it with: pip install "portalocker[redis]")ÚImportError)Úselfr   r   s      úd/root/private/project/pallet_detection_v2/.venv/lib/python3.11/site-packages/portalocker/__init__.pyÚ__init__zRedisLock.__init__=   s   € õ ð3ñô ð ó    )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úobjectr   © r   r   r   r   4   sG   € € € € € ð	ð 	ð	 &ð 	°Fð 	¸tð 	ð 	ð 	ð 	ð 	ð 	r   r   ÚLOCK_EXÚLOCK_SHÚLOCK_NBÚLOCK_UN)r   r!   r    r"   ÚAlreadyLockedr   r   ÚLockExceptionÚ	LockFlagsÚLockLostErrorr	   r
   r   r   r   Úlockr   ÚunlockN)'r   Ú r   r   r   r   Úutilsr   r   r	   r
   r   r   r   Úredisr   r   Ú__package_name__Ú
__author__Ú	__email__Ú__version__Ú__description__Ú__url__r#   r$   r&   r'   r(   r%   Ú	EXCLUSIVEr   Ú__annotations__ÚSHAREDr    ÚNON_BLOCKINGr!   ÚUNBLOCKr"   Ú__all__r   r   r   ú<module>r8      sç  ððð ð ð@ <Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð!Ø Ð Ð Ð Ð Ð Ð øØð ð ð ðð ð ð ð ñ ô ð ð ð ðøøøðF Ô-Ð àÔ!€
àÔ€	àÔ#€àÔ+€à
Ô
€ð Ô(€àÔ(€àÔ(€ð Ô€à	Ô	€ð
  )Ô2Ô<€ˆÔ	Ð <Ð <Ñ <ð
  )Ô2Ô9€ˆÔ	Ð 9Ð 9Ñ 9ð  )Ô2Ô?€ˆÔ	Ð ?Ð ?Ñ ?ð  )Ô2Ô:€ˆÔ	Ð :Ð :Ñ :ð Ô€	ð
ð ð €€€s   £* ª?¾?