Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
_unix.cpython-313.pyc29 linesDownload Raw Back to __pycache__
1�

2�j���X�SSKJr SSKrSSKrSSKrSSKJr SSKJrJ	r	J3r4 SSKJr SSK
Jr SSKJr SS	KJr S5r\R(S:Xa"SS
\5rO@SSKr\R.\R0\R2\R44rSr"SS
\5rS
S/rg!\\4a Nf=f)�)�annotationsN)�suppress)�EAGAIN�ENOSYS�EWOULDBLOCK)�Path)�cast�)�BaseFileLock)�ensure_directory_existsF�win32c�,�\rSrSrSrSSjrSSjrSrg)�UnixFileLock�zHUses the :func:`fcntl.flock` to hard lock the lock file on unix systems.c��[e�N��NotImplementedError��selfs �@D:\code\apps\devtools\python\Lib\site-packages\filelock/_unix.py�_acquire�UnixFileLock._acquire���%�%�c��[errrs r�_release�UnixFileLock._releaserr�N��return�None)�__name__�6__module__�__qualname__�__firstlineno__�__doc__rr�__static_attributes__rrrrrs��V�	&�	&rrTc�6�\rSrSrSrSSjrSSjrSSjrSrg)	r�%a7Uses the :func:`fcntl.flock` to hard lock the lock file on unix systems.8 9Lock file cleanup: Unix and macOS delete the lock file reliably after release, even in10multi-threaded scenarios. Unlike Windows, Unix allows unlinking files that other processes11have open.12c�2�[UR5 [R[R-n[[SS5nUbX-nU[R-nUR5n[R"URX5nUR(aB[[5 [R "X@R"R$5 SSS5 [&R("U[&R*[&R,-5 [R."U5R0S:Xa[R2"U5 gX@R"lg![aG UR(a4[UR5RR5(age[as [UR5R5(de[R"URU[R)-U5nGN�![a gf=ff=f!,(df   GNa=f![6a�n[R2"U5 UR8[::Xar[[65 [UR5R=5 SSS5 O!,(df   O=fUR?5 URA5 SnAgUR8[B[D1;aeSnAgSnAff=f)N�13O_NOFOLLOWr)#r�	lock_file�os�O_RDWR�O_TRUNC�getattr�O_CREAT�14_open_mode�open�FileNotFoundErrorr�parent�exists�PermissionError�has_explicit_moder�fchmod�_context�mode�fcntl�flock�LOCK_EX�LOCK_NB�fstat�st_nlink�close�lock_file_fd�OSError�errnor�unlink�_fallback_to_soft_lockrrr)r�15open_flags�16o_nofollow�	open_mode�fd�	exceptions      rrr.s��#�D�N�N�3����R�Z�Z�/�J� ��\�4�8�J��%��(�17��"�*�*�$�J����)�I�
��W�W�T�^�^�Z�C��"�%�%��o�.��I�I�b�-�-�"4�"4�5�/�
4����B��
�
��
�
� =�>��8�8�B�<�(�(�A�-��H�H�R�L�13�M�M�.��K%�
��>�>�d�4�>�>�&:�&A�&A�&H�&H�&J�&J���"�
��D�N�N�+�2�2�4�4����������r�z�z�k�1I�9�U�B��(�����
��/�.���	
�������?�?�f�,�!�'�*��T�^�^�,�3�3�5�+�*�*���/�/�1��M�M�O���?�?�6�;�*?�?��@��	
�ss�3!E*�4+H9�(6I�*A
H6�93H6�-4H$�$18H2�.H6�1H2�2H6�919I�20L�9L�$J;�2	L�;21K		�'L�1L�Lc��SSKJn [R"SSS9 SSKJnJn [X5(aX lgUUlg)Nr22)�SoftFileLockzDflock not supported on this filesystem, falling back to SoftFileLock�)�23stacklevel)�AsyncSoftFileLock�BaseAsyncFileLock)	�_softrO�warnings�warn�asynciorRrS�24isinstance�	__class__)rrOrRrSs    rrH�#UnixFileLock._fallback_to_soft_lock_s/��+��M�M�`�mn�o�E�2<�T�2U�2U�.�N�[g�D�Nrc���[SURR5nSURl[[5 [UR5R5 SSS5 [R"U[R5 [[5 [R"U5 SSS5 g!,(df   Nb=f!,(df   g=f)N�int)
r	r;rDrrErr-rGr=r>�LOCK_UNr.rC)rrLs  rrrgs����e�T�]�]�7�7�8�B�)-�D�M�M�&��'�"��T�^�^�$�+�+�-�#��K�K��E�M�M�*��'�"������#�"�#�"��#�"�s�$C�!C�25C�26C )rYNr )	r#r$r%r&r'rrHrr(rrrrr%s��	�/	4�b	h�	r�	has_fcntl)�27__future__rr.�sysrU�28contextlibrrFrrr�pathlibr�typingr	�_apir�_utilrr^�platformrr=r>r?r@r]�_�ImportError�AttributeError�__all__rrr�<module>rks���"�	�29���-�-����*�
�	��<�<�7��&�|�&���
�[�[�%�-�-�����
�
�F���	�I�|�I�Z�����c
��(�
��
�s�2B�B)�(B)
codekingpro/portable-devtools · Team Ai