403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/filelock/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/filelock/__pycache__/_api.cpython-311.pyc
�

Mj�"����ddlmZddlZddlZddlZddlZddlZddlmZm	Z	ddl
mZddlm
Z
ddlmZddlmZejd	��ZGd
�d��ZGd�d
eej��Zd
dgZdS)�)�annotationsN)�ABC�abstractmethod)�Lock)�
TracebackType)�Any�)�Timeout�filelockc�*�eZdZdZdd�Zdd�Zdd�ZdS)�AcquireReturnProxyzDA context aware object that will release the lock file when exiting.�lock�BaseFileLock�return�Nonec��||_dS�N�r)�selfrs  �//usr/lib/python3/dist-packages/filelock/_api.py�__init__zAcquireReturnProxy.__init__s
����	�	�	�c��|jSrr�rs r�	__enter__zAcquireReturnProxy.__enter__s
���y�r�exc_type�type[BaseException] | None�	exc_value�BaseException | None�	traceback�TracebackType | Nonec�8�|j���dSr)r�release�rrrr s    r�__exit__zAcquireReturnProxy.__exit__s��	
�	�������rN)rrrr�rr�rrrrr r!rr)�__name__�
__module__�__qualname__�__doc__rrr%�rrr
r
sV������N�N��������������rr
c���eZdZdZd*d+d	�Zed,d���Zed-d���Zejd.d���Ze	d/d���Z
e	d/d���Zed0d���Z		d1ddd�d2d�Z
d3d4d �Zd5d!�Zd6d(�Zd/d)�ZdS)7rz+Abstract base class for a file lock object.����	lock_file�str | os.PathLike[Any]�timeout�floatrrc��tj|��|_d|_||_t��|_d|_dS)a�
        Create a new lock object.

        :param lock_file: path to the file
        :param timeout: default timeout when acquiring the lock, in seconds. It will be used as fallback value in
        the acquire method, if no timeout value (``None``) is given. If you want to disable the timeout, set it
        to a negative value. A timeout of 0 means, that there is exactly one attempt to acquire the file lock.
        Nr)�os�fspath�
_lock_file�
_lock_file_fd�_timeoutr�_thread_lock�
_lock_counter)rr/r1s   rrzBaseFileLock.__init__*sF�� "�y��3�3���*.��� '��
�#'�&�&���#$����r�strc��|jS)z:return: path to the lock file)r6rs rr/zBaseFileLock.lock_fileDs����rc��|jS)za
        :return: the default timeout value, in seconds

        .. versionadded:: 2.0.0
        )r8rs rr1zBaseFileLock.timeoutIs���}�r�value�float | strc�.�t|��|_dS)zd
        Change the default timeout value.

        :param value: the new value, in seconds
        N)r2r8)rr>s  rr1zBaseFileLock.timeoutRs���e����
�
�
rc��t�)zbIf the file lock could be acquired, self._lock_file_fd holds the file descriptor of the lock file.��NotImplementedErrorrs r�_acquirezBaseFileLock._acquire[�
��"�!rc��t�)z6Releases the lock and sets self._lock_file_fd to None.rBrs r�_releasezBaseFileLock._release`rEr�boolc��|jduS)z�

        :return: A boolean indicating if the lock file is holding the lock currently.

        .. versionchanged:: 2.0.0

            This was previously a method and is now a property.
        N)r7rs r�	is_lockedzBaseFileLock.is_lockedes���!��-�-rN皙�����?T)�poll_intervall�blocking�float | None�
poll_intervalrLrMr
c�2�|�|j}|� d}tj|td���|}|j5|xjdz
c_ddd��n#1swxYwYt
|��}|j}tj	��}		|j5|j
s0t�d||��|�
��ddd��n#1swxYwY|j
rt�d||��n�|d	ur0t�d
||��t|j���d|cxkrtj	��|z
kr3nn0t�d||��t|j���d
}t�||||��tj|����7nK#t $r>|j5t#d|jdz
��|_ddd��n#1swxYwY�wxYwt%|���S)a^
        Try to acquire the file lock.

        :param timeout: maximum wait time for acquiring the lock, ``None`` means use the default :attr:`~timeout` is and
         if ``timeout < 0``, there is no timeout and this method will block until the lock could be acquired
        :param poll_interval: interval of trying to acquire the lock file
        :param poll_intervall: deprecated, kept for backwards compatibility, use ``poll_interval`` instead
        :param blocking: defaults to True. If False, function will return immediately if it cannot obtain a lock on the
         first attempt. Otherwise this method will block until the timeout expires or the lock is acquired.
        :raises Timeout: if fails to acquire lock within the timeout period
        :return: a context object that will unlock the file when the context is exited

        .. code-block:: python

            # You can use this method in the context manager (recommended)
            with lock.acquire():
                pass

            # Or use an equivalent try-finally construct:
            lock.acquire()
            try:
                pass
            finally:
                lock.release()

        .. versionchanged:: 2.0.0

            This method returns now a *proxy* object instead of *self*,
            so that it can be used in a with statement without side effects.

        Nz+use poll_interval instead of poll_intervall�)�
stacklevelr	Tz#Attempting to acquire lock %s on %szLock %s acquired on %sFz+Failed to immediately acquire lock %s on %srz"Timeout on acquiring lock %s on %sz2Lock %s not acquired on %s, waiting %s seconds ...r)r1�warnings�warn�DeprecationWarningr9r:�idr6�time�	monotonicrJ�_LOGGER�debugrDr
�sleep�
BaseException�maxr
)	rr1rOrLrM�msg�lock_id�
lock_filename�
start_times	         r�acquirezBaseFileLock.acquireqs	��P�?��l�G��%�?�C��M�#�1�a�@�@�@�@�*�M��
�	$�	$����!�#���	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$����	$�	$�	$�	$��T�(�(����
��^�%�%�
�	�
.��&�(�(��>�(��
�
�&K�W�Vc�d�d�d��
�
����(�(�(�(�(�(�(�(�(�(�(����(�(�(�(�
�>�.��M�M�":�G�]�S�S�S����&�&��M�M�"O�QX�Zg�h�h�h�!�$�/�2�2�2��'�A�A�A�A�D�N�$4�$4�z�$A�A�A�A�A�A��M�M�"F��Q^�_�_�_�!�$�/�2�2�2�N�C��M�M�#�w�
�}�M�M�M��J�}�-�-�-�%
.����	�	�	��"�
D�
D�%(��D�,>��,B�%C�%C��"�
D�
D�
D�
D�
D�
D�
D�
D�
D�
D�
D����
D�
D�
D�
D��	����"�t�,�,�,�,sf�A�A�A�F>�
8C�F>�C�F>�C�C$F>�>H�G9�-H�9G=	�=H�G=	�HF�forcec�`�|j5|jr�|xjdzc_|jdks|rit|��|j}}t
�d||��|���d|_t
�d||��ddd��dS#1swxYwYdS)a*
        Releases the file lock. Please note, that the lock is only completely released, if the lock counter is 0. Also
        note, that the lock file itself is not automatically deleted.

        :param force: If true, the lock counter is ignored and the lock is released in every case/
        r	rz#Attempting to release lock %s on %szLock %s released on %sN)r9rJr:rVr6rYrZrG)rrcr_r`s    rr#zBaseFileLock.release�s���
�	T�	T��~�	
T��"�"�a�'�"�"��%��*�*�e�*�-/��X�X�t��]�G��M�M�"G��R_�`�`�`��M�M�O�O�O�)*�D�&��M�M�":�G�]�S�S�S�	T�	T�	T�	T�	T�	T�	T�	T�	T�	T�	T�	T����	T�	T�	T�	T�	T�	Ts�BB#�#B'�*B'c�.�|���|S)zE
        Acquire the lock.

        :return: the lock object
        )rbrs rrzBaseFileLock.__enter__�s��	
�������rrrrrr r!c�.�|���dS)z�
        Release the lock.

        :param exc_type: the exception type if raised
        :param exc_value: the exception value if raised
        :param traceback: the exception traceback if raised
        N�r#r$s    rr%zBaseFileLock.__exit__�s��	
�������rc�2�|�d���dS)z'Called when the lock object is deleted.T)rcNrgrs r�__del__zBaseFileLock.__del__�s�����4�� � � � � r)r.)r/r0r1r2rr)rr;)rr2)r>r?rr)rr)rrH)NrK)
r1rNrOr2rLrNrMrHrr
)F)rcrHrrr&r')r(r)r*r+r�propertyr/r1�setterrrDrGrJrbr#rr%rir,rrrr's�������5�5�$�$�$�$�$�4�����X�������X��
�^�%�%�%��^�%��"�"�"��^�"��"�"�"��^�"��	.�	.�	.��X�	.�!%�#�O-�
(,��
O-�O-�O-�O-�O-�O-�bT�T�T�T�T�(����
�
�
�
�!�!�!�!�!�!rr)�
__future__r�
contextlib�loggingr4rWrS�abcrr�	threadingr�typesr�typingr�_errorr
�	getLoggerrYr
�ContextDecoratorr�__all__r,rr�<module>rws,��"�"�"�"�"�"���������	�	�	�	���������#�#�#�#�#�#�#�#�������������������������
�'�
�J�
'�
'����������$I!�I!�I!�I!�I!�3�
�3�I!�I!�I!�Z�����r

Youez - 2016 - github.com/yon3zu
LinuXploit