ó
    �2¨jÂ  ã                   óÒ  • % S r SSKJrJrJrJr  SSKJrJrJ	r	J
r
JrJrJr   SSKJr  \R"                  r\R$                  r\R&                  r\R(                  r\R*                  r\R,                  r\R.                  r\R0                  r\R2                  r\R4                  r\R6                  r\R8                  R:                  r\R8                  \S'   \R8                  R@                  r!\R8                  \S'   \R8                  RD                  r#\R8                  \S	'   \R8                  RH                  r%\R8                  \S
'   \R8                  r/ SQr&g! \ a     " S S5      r GN<f = f)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                   ó.   • \ rS rSrSrS\S\SS4S jrSrg)	r   é4   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                 ó   • [        S5      e)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      Ú¢C:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\portalocker/__init__.pyÚ__init__ÚRedisLock.__init__=   s   € ô ð3óð ó    © )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Úobjectr   Ú__static_attributes__r   r   r   r   r   4   s!   † ñ	ð	 &ð 	°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>r<      sS  ðò÷@ <Ó ;÷÷ ñ ð!Ý ðH ×-Ñ-Ð à×!Ñ!€
à×Ñ€	à×#Ñ#€à×+Ñ+€à
×
Ñ
€ð ×(Ñ(€à×(Ñ(€à×(Ñ(€ð ×Ñ€à	×	Ñ	€ð
  )×2Ñ2×<Ñ<€ˆ×	Ñ	Ó <ð
  )×2Ñ2×9Ñ9€ˆ×	Ñ	Ó 9ð  )×2Ñ2×?Ñ?€ˆ×	Ñ	Ó ?ð  )×2Ñ2×:Ñ:€ˆ×	Ñ	Ó :ð ×Ñ€	ò
�øði ó ÷ô ðús   £E ÅE&Å%E&