Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
unix_events.cpython-314.pyc227 linesDownload Raw Back to __pycache__
1+
2��i����R�Rt^RIt^RIt^RIt^RIt^RIt^RIt^RIt^RIt^RI	t	^RI3t4^RIt^RIt^RI
Ht^RI
Ht^RI
Ht^RI
Ht^RI
Ht^RI
Ht^RI
Ht^R	I
Ht^R5I
Ht^RI
Ht^RIHtR t]6P6R
8Xd	]!R4hRtRt!RR]P>4t !RR]PB4t"!RR]PF]PH4t%!RR]PL4t'!RR4t(!RR4t)Rt*!RR]PV4t,] t-],t.]-t/R#)!z2Selector event loop for Unix with signal handling.N)�base_events)�base_subprocess)�	constants)�7coroutines)�events)�8exceptions)�futures)�selector_events)�tasks)�9transports)�logger�win32z+Signals are not really supported on Windowsc��R#)zDummy signal handler.N�)�signum�frames&&�Lib\asyncio\unix_events.py�_sighandler_noopr's���c�V�\P!V4# \dTu#i;i�N)�os�waitstatus_to_exitcode�10ValueError)�statuss&rrr,s.����(�(��0�0�����
�	�s��
(�(c��aa�]tRt^6toRtRV3RlltV3RltRtRtRt	Rt11R	tR R12ltR Rlt
RRltR
tRRRRRRRRRRR/RlltRRRR^dRRRRRRRRRR/RlltRtRtRtRtV3RltRtVtV;t#)!�_UnixSelectorEventLoopz\Unix event loop.13 14Adds signal handling and UNIX Domain Socket support to SelectorEventLoop.15Nc�<�\SV`V4/Vn/Vn\	4'd\4VnR#\4VnR#r)�super�__init__�_signal_handlers�_unix_server_sockets�
can_use_pidfd�_PidfdChildWatcher�_watcher�_ThreadedChildWatcher)�self�selector�	__class__s&&�rr�_UnixSelectorEventLoop.__init__<s;���
����"� "���$&��!��?�?�.�0�D�M�1�3�D�Mrc�X<�\SV`4\P!4'g0\	VP164FpVP
V4K	R#VP17'd?\P!RV:R2\VR7VP18P4R#R#)zClosing the loop z@ on interpreter shutdown stage, skipping signal handlers removal��sourceN)r�close�sys�
is_finalizing�listr �remove_signal_handler�warnings�warn�ResourceWarning�clear)r&�sigr(s& �rr-�_UnixSelectorEventLoop.closeEs����
��
��� � �"�"��D�1�1�2���*�*�3�/�3��$�$�$��
�
� 1�$��:H�I�.�%)�	+�19�%�%�+�+�-�
%rc�N�VFpV'gK
VPV4K 	R#r)�_handle_signal)r&�datars&& r�_process_self_data�)_UnixSelectorEventLoop._process_self_dataSs ���F�������'�	rc��\P!V4'g\P!V4'd\R4hVP	V4VP4\P!VPP44\P!Y#TR4pYPP T&\P!T\"4\P$!TR4R# \\3dp\\T44hRp?ii;i \d�pTP TTP 'gN\P!R4M5 \\3d"p\&P(!RT4Rp?MRp?ii;iTP*\*P,8Xd\RTR24hhRp?ii;i)z�Add a handler for a signal.  UNIX only.20 21Raise ValueError if the signal number is invalid or uncatchable.22Raise RuntimeError if there is a problem setting up the handler.23z3coroutines cannot be used with add_signal_handler()NF�set_wakeup_fd(-1) failed: %s�sig � cannot be caught�����)r�iscoroutine�_iscoroutinefunction�	TypeError�
_check_signal�
_check_closed�signal�
set_wakeup_fd�_csock�filenor�OSError�RuntimeError�strr�Handler r�siginterruptr�info�errno�EINVAL)r&r6�callback�args�exc�handle�nexcs&&&*   r�add_signal_handler�)_UnixSelectorEventLoop.add_signal_handlerZsv��
�"�"�8�,�,��/�/��9�9��8�9�
9����3������	)�24
� � ����!3�!3�!5�6����x�t�T�:��%+���c�"�	�
�M�M�#�/�0�
����U�+���G�$�	)��s�3�x�(�(��	)���	��%�%�c�*��(�(�(�F��(�(��,��"�G�,�F��K�K� >��E�E��F���y�y�E�L�L�(�"�T�#��.?�#@�A�A���	�sZ�&.C/�;2D�/D�D�D�G�'G�E�G�F�/F�G�F�2G�Gc��VPPV4pVfR#VP'dVPV4R#VP	V4R#)z2Internal helper that is the actual signal handler.N)r �get�25_cancelledr1�_add_callback_signalsafe)r&r6rVs&& rr9�%_UnixSelectorEventLoop._handle_signal�sH���&�&�*�*�3�/���>�������&�&�s�+��)�)�&�1rc�H�VPV4VPVT\P8Xd\P26pM\Pp\P!Y4TP'g\P!R4R#R# \dR#i;i \d5pTP\P8Xd\RTR24hhRp?ii;i \\3d#p\P!RT4Rp?R#Rp?ii;i)zgRemove a handler for a signal.  UNIX only.27 28Return True if a signal handler was removed, False if not.29Fr?r@Nr>TrA)rEr �KeyErrorrG�SIGINT�default_int_handler�SIG_DFLrKrQrRrLrHrrrP)r&r6�handlerrUs&&  rr1�,_UnixSelectorEventLoop.remove_signal_handler�s���30	
���3��	��%�%�c�*��&�-�-���0�0�G��n�n�G�	��M�M�#�'��$�$�$�
A��$�$�R�(���-�	��	���	��y�y�E�L�L�(�"�T�#��.?�#@�A�A���		����(�
A����:�C�@�@���
A�sA�
B�B,�C.�B)�(B)�,C+�7/C&�&C+�.D!�?D�D!c��\V\4'g\RV:24hV\P!49d\RV24hR#)z�Internal helper to validate a signal.31 32Raise ValueError if the signal number is invalid or uncatchable.33Raise RuntimeError if there is a problem setting up the handler.34zsig must be an int, not zinvalid signal number N)�35isinstance�intrDrG�
valid_signalsr)r&r6s&&rrE�$_UnixSelectorEventLoop._check_signal�sM���#�s�#�#��6�s�g�>�?�?��f�*�*�,�,��5�c�U�;�<�<�-rc��\WW#V4#r)�_UnixReadPipeTransport�r&�pipe�protocol�waiter�extras&&&&&r�_make_read_pipe_transport�0_UnixSelectorEventLoop._make_read_pipe_transport�s��%�d�(�E�J�Jrc��\WW#V4#r)�_UnixWritePipeTransportrms&&&&&r�_make_write_pipe_transport�1_UnixSelectorEventLoop._make_write_pipe_transport�s��&�t�8�U�K�Krc	36��p"�VPp37VP4p\WW#WEWg3RVRV/V	BpV38PVP	4VP39V4VGRjx�L40V#L \\3dh\d,TP4TP4GRjx�L41hi;i5i)rprqN)r$�
create_future�_UnixSubprocessTransport�add_child_handler�get_pid�_child_watcher_callback�42SystemExit�KeyboardInterrupt�
BaseExceptionr-�_wait)
r&rorT�shell�stdin�stdout�stderr�bufsizerq�kwargs�watcherrp�transps
&&&&&&&&&,   r�_make_subprocess_transport�1_UnixSelectorEventLoop._make_subprocess_transport�s�����-�-���#�#�%��)�$�$�(-�v�2�/5�2�=B�2�+1�2��	�!�!�&�.�.�"2� $� <� <�f�	F�	��L�L��
�
���-�.�	���	��L�L�N��,�,�.� � ��	�sB�AB6�A,�#A*�$A,�(B6�*A,�,B3�$B3�+B.�,B3�3B6c�>�VPVPV4R#r)�call_soon_threadsafe�_process_exited)r&�pid�43returncoder�s&&&&rr}�._UnixSelectorEventLoop._child_watcher_callback�s���!�!�&�"8�"8�*�Er�ssl�sock�server_hostname�ssl_handshake_timeout�ssl_shutdown_timeoutc	��0"�Ve\V\4'gQhV'dVf\R4hM-Ve\R4hVe\R4hVe\R4hVe�Ve\R4h\P!V4p\44P45!\46P\47P^4pVPR4VPWB4GRjx�L48MmVf\R4hVP\49P8wg VP\50P8wd\RV:24hVPR4VPWAW5VVR	7GRjx�L51wr�W�3#L� TP4h;iL!5i)52Nz/you have to pass server_hostname when using sslz+server_hostname is only meaningful with ssl�1ssl_handshake_timeout is only meaningful with ssl�0ssl_shutdown_timeout is only meaningful with ssl�3path and sock can not be specified at the same timeFzno path and sock were specified�.A UNIX Domain Stream Socket was expected, got )r�r�)rgrMrr�fspath�socket�AF_UNIX�SOCK_STREAM�setblocking�sock_connectr-�family�type�_create_connection_transport)53r&�protocol_factory�pathr�r�r�r�r��	transportros54&&&$$$$$  r�create_unix_connection�-_UnixSelectorEventLoop.create_unix_connection�s�����&�*�_�c�*J�*J�J�J���&� �E�G�G�'��*� �!N�O�O�$�0� �G�I�I�#�/� �F�H�H����� �I�K�K��9�9�T�?�D��=�=�����1C�1C�Q�G�D�
�� � ��'��'�'��3�3�3��|� �!B�C�C����v�~�~�-��I�I��!3�!3�3� �D�T�H�M�O�O����U�#�$(�$E�$E��C�"7�!5�%F�%7�7��	��"�"�%4��
��55�56����7�sB�$F�BF�%E>�'E<�(E>�,BF�2F�3	F�<E>�>F�F�backlog�
start_servingT�cleanup_socketc	���"�\V\4'd\R4hVeV'g\R4hVeV'g\R4hVe�Ve\R4h\P57!V4p\P!\P\P4pV^,R9dR\P!\P!V4P4'd\P!V4VP#V4M\Vf\R4hVP*\P8wg VP,\P8wd\R	V:24hV	'dMVP/4pV^,R9d/\P!V4P0VP2V&VP5R584\6P8!W.VWTVV4p
V'd/V
P;4\<P>!^4GRjx�L59V
# \dEL5\d#p60\P !RY*4Rp61?62EL\Rp63?64ii;i \dXpTP%4TP&\&P(8Xd#RT:R2p\\&P(T4RhhRp?iTP%4h;i \dEL%i;iL�5i)z*ssl argument must be an SSLContext or NoneNr�r�r�z2Unable to check or remove stale UNIX socket %r: %rzAddress z is already in usez-path was not specified, and no sock specifiedr�F)��) rg�boolrDrrr�r�r�r��stat�S_ISSOCK�st_mode�remove�FileNotFoundErrorrKr�error�bindr-rQ�65EADDRINUSEr�r��getsockname�st_inor!r�r�Server�_start_servingr66�sleep)r&r�r�r�r�r�r�r�r�r��errrU�msg�servers&&&$$$$$$$    r�create_unix_server�)_UnixSelectorEventLoop.create_unix_servers�����c�4� � ��H�I�I� �,�S��C�E�
E� �+�C��B�D�
D����� �I�K�K��9�9�T�?�D��=�=�����1C�1C�D�D��A�w�k�)�6��}�}�R�W�W�T�]�%:�%:�;�;��	�	�$��

��	�	�$���|� �C�E�E����v�~�~�-��I�I��!3�!3�3� �D�T�H�M�O�O���#�#�%�D��A�w�k�)��68�g�g�d�m�6J�6J�D�-�-�d�3�	
������#�#�D�&�2B�$'�2G�$8�:����!�!�#��+�+�a�.� � ��
��e)����6��L�L�"*�+/�6�6��6���
��67�68���9�9�� 0� 0�0�%�T�H�,>�?�C�!�%�"2�"2�C�8�d�B���
��69�70����")�����
!�s��-K;�K;�A5K;�=9H4�7H4�I1�A$K;�K;�#-K'�AK;�-K9�.K;�4I.�?K;�I.�I.�I)�#K;�)I.�.K;�1K$�<AK�K$�$K;�'K6�2K;�5K6�6K;c71��&"�\PTP4p\P!T4PpT'dTMTpT'g^#TP4p	TPT	RYY4T^4T	GRjx�L72# \d\P!R4hi;i \\P3dp\P!R4hRp?ii;i \d\P!R4hi;iL�5i)zos.sendfile() is not availableznot a regular fileN)
r�sendfile�AttributeErrorr�SendfileNotAvailableErrorrJ�io�UnsupportedOperation�fstat�st_sizerKry�_sock_sendfile_native_impl)73r&r��file�offset�countrJr��fsize�	blocksize�futs74&&&&&     r�_sock_sendfile_native�,_UnixSelectorEventLoop._sock_sendfile_nativebs����	2��K�K�	M��[�[�]�F�	M��H�H�V�$�,�,�E�#�E��	���� � �"���'�'��T�4�(.�y�!�	E��y���%�	2��6�6�0�2�
2�	2��75�� 7� 7�8�	M��6�6�7K�L�L��	M���	M��6�6�7K�L�L�	M���sb�D�B�B1� C*�D�D�-D�D�D�"B.�.D�1C'�C"�"C'�'D�*"D�Dc	
�R�VP4p	VeVPV4VP4'dVPWEV4R#V'd5Wh,76pV^8:d&VPWEV4VP	V4R#\V\P^,^,4p\P!W�WW4p77V78^8Xd&VPWEV4VP	V4R#WZ,
pW�,
pVfVPW4VPW�PVW�VWVWx479R# \\3d:TfTPY4TPY�PTY�TYVYx480R#\d�pTeUTP \ P"8Xd6\%T4\&Jd#\'R\ P"4pY�nTpT^8Xd@\*P,!R4p
TPYET4TP/T
4Rp?R#TPYET4TP/T4Rp?R#Rp?i\0\23dh\4d/pTPYET4TP/T4Rp?R#Rp?ii;i)Nzsocket is not connectedzos.sendfile call failed)rJ�
remove_writer�	cancelled�_sock_sendfile_update_filepos�81set_result�minr.�maxsizerr��_sock_add_cancellation_callback�82add_writerr��BlockingIOError�InterruptedErrorrKrQ�ENOTCONNr��ConnectionError�	__cause__rr��
set_exceptionr~rr�)r&r��
registered_fdr�rJr�r�r��83total_sent�fd�sentrU�new_excr�s&&&&&&&&&     rr��1_UnixSelectorEventLoop._sock_sendfile_native_implysA��
�[�[�]���$�84
���}�-��=�=�?�?��.�.�v�z�J����*�I��A�~��2�2�6�:�N����z�*���	�3�;�;��>�A�#5�6�	�1	F��;�;�r�6�=�D�J�q�y��2�2�6�:�N����z�*�����"�85� �(��8�8��C�����$C�$C�S� "�&� &�y�F��[ �!1�2�	B��$��4�4�S�?��O�O�B� ?� ?���f�"�9�
B��	'��)��I�I����/���I�_�4�86*�-�u�~�~�?��$'�!����Q��87!�:�:�-�/���2�2�6�:�N��!�!�#�&�&��2�2�6�:�N��!�!�#�&�&���-�.�	���	#��.�.�v�z�J����c�"�"��	#�sD�5D?�?AJ&�J&�J&�BI�0#I�J&�,88J&�7J&�8#J!�!J&c�b�V^8�d(\P!W\P4R#R#�r�N)r�lseek�SEEK_SET)r&rJr�r�s&&&&rr��4_UnixSelectorEventLoop._sock_sendfile_update_filepos�s ����>��H�H�V�R�[�[�1�rc�:aa�VV3RlpVPV4R#)c�<�VP4'd-SP4pVR8wdSPV4R#R#R#)�NrA)r�rJr�)r�r�r&r�s& ��r�cb�B_UnixSelectorEventLoop._sock_add_cancellation_callback.<locals>.cb�s8����}�}����[�[�]����8��&�&�r�*��rN)�add_done_callback)r&r�r�r�sf&f rr��6_UnixSelectorEventLoop._sock_add_cancellation_callback�s���	+�89	���b�!rc�<�WP9dVP4pMRp\SV`
V4VeaVPV,pVPV\P90!V4PV8Xd\P!V4R#R#R# \dR#\d#p\P!RY$4Rp?R#Rp?ii;i)Nz/Unable to clean up listening UNIX socket %r: %r)r!r�r�
_stop_servingrr�r��unlinkr�rKrr�)r&r�r��prev_inor�r(s&&   �rr��$_UnixSelectorEventLoop._stop_serving�s�����,�,�,��#�#�%�D��D�
���d�#����0�0��6�H��)�)�$�/�
2��7�7�4�=�'�'�8�3��I�I�d�O�4�	��%�
���
2����&�'+�2�2��
2�s$�;B�C�(C�1C�2C�C)r r!r$r�NN)�__name__�91__module__�__qualname__�__firstlineno__�__doc__rr-r;rXr9r1rErrrvr�r}r�r�r�r�r�r�r��__static_attributes__�__classdictcell__�
__classcell__�r(�
__classdict__s@@rrr6s������924�.�(�+�Z2��@93=�K�L��,F�0#��0#��0#�!�0#�#'�	0#�94"&�0#�dP��P�"�P�(,�P�#'�P�"&�	P�95�P�9604�P�d�.GF�R2�"�2�2rrc�aa�]tRtRtoRtRV3RlltRtRtRtRt	Rt97RtR	tR98t
RtRt]P"3R
ltRRltRtRtRtVtV;t#)rli�c�b<�\SV`V4W PR&WnW nVP4VnW0nRVnRVn	\P!VP4Pp\P!V4'gY\P!V4'g=\P !V4'g!RVnRVnRVn\#R4h\P$!VPR4VPP'VPP(V4VPP'VP*VPVP,4Ve.VPP'\.P0VR4R#R#)rnFNz)Pipe transport is for pipes/sockets only.)rr�_extra�_loop�_piperJ�_fileno�	_protocol�_closing�_pausedrr�r�r��S_ISFIFOr��S_ISCHRr�set_blocking�	call_soon�connection_made�_add_reader�_read_readyr�_set_result_unless_cancelled)r&�looprnrorprq�moder(s&&&&&& �rr�_UnixReadPipeTransport.__init__�s/���
�����"���F���99��100��{�{�}���!����
�����x�x����%�-�-���
�
�d�#�#��
�
�d�#�#����T�"�"��D�J��D�L�!�D�N��H�I�I�101������e�,��102�103���T�^�^�;�;�T�B��104�105���T�-�-�!�\�\�4�+;�+;�	=����J�J� � ��!E�!E�!'��
/�rc�l�VP4'gR#VPPW4R#r)�106is_readingrr)r&r�rSs&&&rr�"_UnixReadPipeTransport._add_readers$����� � ���107�108���r�,rc�V�VP'*;'dVP'*#r)r
r�r&s&rr�!_UnixReadPipeTransport.is_readings���<�<��5�5��
�
�$5�5rc��VPP.pVPfVPR4M#VP'dVPR4VPRVP10924\
VPRR4pVPe`Ve\\P!W P110\P4pV'dVPR4MCVPR4M1VPeVPR4MVPR4RPR	PV44#)111N�closed�closing�fd=�	_selector�polling�idle�open�<{}>� )r(r�r	�appendrr112�getattrrr	�_test_selector_event�	selectors�113EVENT_READ�format�join)r&rPr'r$s&   r�__repr__�_UnixReadPipeTransport.__repr__s������'�'�(���:�:���K�K��!�
�]�]�]��K�K�	�"����c�$�,�,��(�)��4�:�:�{�D�9���:�:�!�h�&:�%�:�:��,�,�	�(<�(<�>�G�����I�&����F�#�
�Z�Z�
#��K�K����K�K��!��}�}�S�X�X�d�^�,�,rc��\P!VPVP4pV'dVPPV4R#VPP4'd\P!RV4RVn114VPPVP4VPPVPP4VPPVPR4R# \\ 3dR#\"dpTP%TR4Rp?R#Rp?ii;i)�%r was closed by peerTNz"Fatal read error on pipe transport)r�readr115�max_sizer�
data_receivedr�	get_debugrrPr�_remove_readerr�eof_received�_call_connection_lostr�r�rK�_fatal_error)r&r:rUs&  rr�"_UnixReadPipeTransport._read_ready#s���	G��7�7�4�<�<����7�D�����,�,�T�2��:�:�'�'�)�)��K�K� 7��>� $��
��116�117�)�)�$�,�,�7��118�119�$�$�T�^�^�%@�%@�A��120�121�$�$�T�%?�%?��F�� �!1�2�	���	I����c�#G�H�H��	I�s#�+D�E� E�)E�*E�Ec��VP4'gR#RVnVPPVP4VPP4'd\P!RV4R#R#)NTz%r pauses reading)rr
rr8r122r7r�debugrs&r�
pause_reading�$_UnixReadPipeTransport.pause_reading5sV����� � ������123�124�!�!�$�,�,�/��:�:���!�!��L�L�,�d�3�"rc�2�VP'gVP'gR#RVnVPPVPVP1254VPP
4'd\P!RV4R#R#)NFz%r resumes reading)	rr
rrr126rr7rr>rs&r�resume_reading�%_UnixReadPipeTransport.resume_reading=sb���=�=�=����������127�128���t�|�|�T�-=�-=�>��:�:���!�!��L�L�-�t�4�"rc��WnR#r�r�r&ros&&r�set_protocol�#_UnixReadPipeTransport.set_protocolE���!�rc��VP#rrErs&r�get_protocol�#_UnixReadPipeTransport.get_protocolH����~�~�rc��VP#r�rrs&r�129is_closing�!_UnixReadPipeTransport.is_closingK����}�}�rc�P�VP'gVPR4R#R#r)r�_closers&rr-�_UnixReadPipeTransport.closeNs���}�}�}��K�K���rc��VPe0V!RV:2\VR7VPP4R#R#�Nzunclosed transport r+�r	r4r-�r&�_warns&&r�__del__�_UnixReadPipeTransport.__del__R�5���:�:�!��'��x�0�/�$�O��J�J����"rc130�`�\V\4'dZVP\P8Xd;VPP4'd\P!RWRR7M-VPPRVRVRVRVP/4VPV4R#�z%r: %sT)�exc_info�message�	exceptionr�roN)rgrKrQ�EIOrr7rr>�call_exception_handlerrrT�r&rUras&&&rr;�#_UnixReadPipeTransport._fatal_errorWs���s�G�$�$����e�i�i�)?��z�z�#�#�%�%����X�t�t�D���J�J�-�-��7��S��T��D�N�N�	/�
�	
���C�rc��RVnVPPVP4VPP	VP131V4R#�TN)rrr8r132rr:�r&rUs&&rrT�_UnixReadPipeTransport._closees9����
��133�134�!�!�$�,�,�/��135�136���T�7�7��=rc��VPPV4VPP4RVnRVnRVnR# TPP4RTnRTnRTni;ir�r�connection_lostr	r-rris&&rr:�,_UnixReadPipeTransport._call_connection_lostj�g��	��N�N�*�*�3�/��J�J�����D�J�!�D�N��D�J��
�J�J�����D�J�!�D�N��D�J���A�1A?)rr137rr
r	rir��zFatal error on pipe transport)r�r�r�r�r5rrrr0rr?rBrGrKrPr-r2r3r[r;rTr:rrrrs@@rrlrl�sd�����H�/�<-�1386�-�*G�$4�5�"����%�M�M��139�>�140�rrlc�aa�]tRtRtoRV3RlltRtRtRtRtRt	Rt141R	tR142tRt
RtR
t]P"3RltRtRRltRRltRtRtVtV;t#)ruitc��<�\S143V`WQ4W PR&W nVP	4VnW0n\4Vn^Vn	RVn144\P!VP1454Pp\P!V4p\P !V4p\P"!V4p	V'g1V'g)V	'g!RVnRVnRVn\%R4h\P&!VP146R4VP(P+VPP,V4V	'g.V'dk\.P0P3R4'gFVP(P+VP(P4VP147VP64Ve.VP(P+\8P:VR4R#R#)rnFNz?Pipe transport is only for pipes, sockets and character devices�aix)rrrr	rJr148r�	bytearray�_buffer�149_conn_lostrrr�r�r�rrr�rrrrrr.�platform�150startswithrrrr)r&rrnrorprqr�is_char�is_fifo�	is_socketr(s&&&&&&    �rr� _UnixWritePipeTransport.__init__wsd���
����%�"���F���151��{�{�}���!�� �{��������
��x�x����%�-�-���,�,�t�$���-�-��%���M�M�$�'�	��7�i��D�J��D�L�!�D�N��D�E�
E�	������e�,��152�153���T�^�^�;�;�T�B�154�����)@�)@��)G�)G��J�J� � ����!7�!7�!%���t�/?�/?�
A����J�J� � ��!E�!E�!'��
/�rc���VPP.pVPfVPR4M#VP'dVPR4VPRVP15524\
VPRR4pVPe�Ve�\P!W P156\P4pV'dVPR4MVPR4VP4pVPRV24M1VPeVPR4MVPR4R	PR157PV44#)Nr r!r"r#r$r%zbufsize=r&r'r()r(r�r	r)rr158r*rr	r+r,�EVENT_WRITE�get_write_buffer_sizer.r/)r&rPr'r$r�s&    rr0� _UnixWritePipeTransport.__repr__�s�����'�'�(���:�:���K�K��!�
�]�]�]��K�K�	�"����c�$�,�,��(�)��4�:�:�{�D�9���:�:�!�h�&:�%�:�:��,�,�	�(=�(=�?�G�����I�&����F�#��0�0�2�G��K�K�(�7�)�,�-�
�Z�Z�
#��K�K����K�K��!��}�}�S�X�X�d�^�,�,rc�,�\VP4#r)�lenrvrs&rr��-_UnixWritePipeTransport.get_write_buffer_size�s���4�<�<� � rc���VPP4'd\P!RV4VP'dVP\
44R#VP4R#)r3N)rr7rrPrvrT�BrokenPipeErrorrs&rr�#_UnixWritePipeTransport._read_ready�sE���:�:���!�!��K�K�/��6��<�<�<��K�K��)�*��K�K�Mrc���\V\\\34'gQ\	V44h\V\4'd\V4pV'gR#VP159'gVP'dQVP160\P8�d\P!R4V;P161^,
unR#VP'gz\P!VPV4pT\+T48XdR#T^8�d\T4TRpTP,P/TPTP04V;PV,
unVP34R# \\ 3d^pL�\"\$3dh\&d7pT;P162^,
unTP)TR4Rp?R#Rp?ii;i)Nz=pipe closed by peer or os.write(pipe, data) raised exception.�#Fatal write error on pipe transport)rg�bytesru�163memoryview�reprrwrr�!LOG_THRESHOLD_FOR_CONNLOST_WRITESr�warningrvr�writer164r�r�r~rr�r;r�r�_add_writer�_write_ready�_maybe_pause_protocol)r&r:�nrUs&&  rr��_UnixWritePipeTransport.write�sc���$��	�:� >�?�?�K��d��K�?��d�I�&�&��d�#�D����?�?�?�d�m�m�m����)�"M�"M�M���� H�I��O�O�q� �O���|�|�|�	
��H�H�T�\�\�4�0���C��I�~���Q��!�$�'���+���J�J�"�"�4�<�<��1B�1B�C��������"�"�$��$�%5�6�
���� 1�2�
�� �
����1�$���!�!�#�'L�M���
�s*�$!F�G-�G-�+165G-�6G-�7+G(�(G-c�t�VP'gQR4h\P!VPVP4pV\	VP48Xd�VPP4VPPVP4VP4VP'd7VPPVP4VPR4R#V^8�dVPRV1R#R# \\3dR#\\3dh\ dvpTPP4T;P"^,
unTPPTP4TP%TR4Rp?R#Rp?ii;i)zData should not be emptyNr�)rvrr�r166r�r5r�_remove_writer�_maybe_resume_protocolrr8r:r�r�r~rr�rwr;)r&r�rUs&  rr��$_UnixWritePipeTransport._write_ready�sD���|�|�|�7�7�7�|�	%�������t�|�|�4�A��C����%�%����"�"�$��167�168�)�)�$�,�,�7��+�+�-��=�=�=��J�J�-�-�d�l�l�;��.�.�t�4���Q���L�L��!��$���) �!1�2�	���-�.�	���	J��L�L��� ��O�O�q� �O�
�J�J�%�%�d�l�l�3����c�#H�I�I��
	J�s*�+D�F7�'F7�6169F7�F7�A*F2�2F7c��R#)Trrs&r�
can_write_eof�%_UnixWritePipeTransport.can_write_eof�s��rc�"�VP'dR#VP'gQhRVnVP'gNVPP	VP1704VPP
VPR4R#R#)NT)rr	rvrr8r171rr:rs&r�	write_eof�!_UnixWritePipeTransport.write_eofsa���=�=�=���z�z�z��z���
��|�|�|��J�J�%�%�d�l�l�3��J�J� � ��!;�!;�T�B�rc��WnR#rrErFs&&rrG�$_UnixWritePipeTransport.set_protocolrIrc��VP#rrErs&rrK�$_UnixWritePipeTransport.get_protocolrMrc��VP#rrOrs&rrP�"_UnixWritePipeTransport.is_closingrRrc�n�VPe'VP'gVP4R#R#R#r)r	rr�rs&rr-�_UnixWritePipeTransport.closes&���:�:�!�$�-�-�-��N�N��+8�!rc��VPe0V!RV:2\VR7VPP4R#R#rWrXrYs&&rr[�_UnixWritePipeTransport.__del__r]rc�(�VPR4R#r)rTrs&r�abort�_UnixWritePipeTransport.aborts�����D�rc172�"�\V\4'd;VPP4'd\P173!RWRR7M-VPP
RVRVRVRVP/4VPV4R#r_)	rgrKrr7rr>rdrrTres&&&rr;�$_UnixWritePipeTransport._fatal_error!sp���c�7�#�#��z�z�#�#�%�%����X�t�t�D���J�J�-�-��7��S��T��D�N�N�	/�
�	
���C�rc�L�RVnVP'd&VPPVP4VPP4VPP
VP4VPPVPV4R#rh)	rrvrr�r174r5r8rr:ris&&rrT�_UnixWritePipeTransport._close/sh����
��<�<�<��J�J�%�%�d�l�l�3��������175�176�!�!�$�,�,�/��177�178���T�7�7��=rc��VPPV4VPP4RVnRVnRVnR# TPP4RTnRTnRTni;irrlris&&rr:�-_UnixWritePipeTransport._call_connection_lost7rorp)rvrrwr179rr	rr�rqr)r�r�r�r�rr0r�rr�r�r�r�rGrKrPr-r2r3r[r�r;rTr:rrrrs@@rrurutsk����#/�J-�0!��!%�F%�8�C�"����180%�M�M��181��>��rruc�&a�]tRtRtoRtRtVtR#)rziAc� �RpV\P8Xd=\PP	R4'd\182P!4wr8\P!V3RVRVRVRVRRRV/VBVnVe>VP4\VP4R	VR1837VPnRpVe#VP4VP4R#R# Te"TP4TP4ii;i)Nrtr�r�r�r��universal_newlinesFr��wb)�	buffering)
�184subprocess�PIPEr.rxryr��185socketpair�Popen�_procr-r&�detachr�)	r&rTr�r�r�r�r�r��stdin_ws	&&&&&&&, r�_start�_UnixSubprocessTransport._startCs�����J�O�O�#����(?�(?��(F�(F�186$�.�.�0�N�E�	 �#�)�)��E�!�E�).�E�7=�E�FL�E�#(�E�29�E�=C�E�D�J��"����
�#'����(8�$�'�#R��187�188� ����"����
��
�
��#��w�"����
��
�
��#�s
�A)C&�&'D
)r�N)r�r�r�r�r�rr�rs@rrzrzAs���� � rrzc�0a�]tRtRtoRtRtRtRtVtR#)r#iYaChild watcher implementation using Linux's pid file descriptors.189 190This child watcher polls process file descriptors (pidfds) to await child191process termination. In some respects, PidfdChildWatcher is a "Goldilocks"192child watcher implementation. It doesn't require signals or threads, doesn't193interfere with any processes launched outside the event loop, and scales194linearly with the number of subprocesses launched by the event loop. The195main disadvantage is that pidfds are specific to Linux, and only work on196recent (5.3+) kernels.197c��\P!4p\P!V4pVP	WPP198WW#4R#r)r�get_running_loopr�199pidfd_openr�_do_wait)r&r�rSrTr�pidfds&&&*  rr{�$_PidfdChildWatcher.add_child_handleres4���&�&�(���
�
�c�"������
�
�s�8�Jrc�0�\P!4pVPV4\P!V^4wrg\V4p\P!V4V!W.VO5!R# \d^�p\P!RT4LHi;i)r�zJchild process pid %d exit status already read:  will report returncode 255N)200rr�r8r�waitpidr�ChildProcessErrorrr�r-)	r&r�r�rSrTr�_rr�s	&&&&&    rr��_PidfdChildWatcher._do_waitjs����&�&�(�����E�"�	8��201�202�3��*�I�A�0��7�J�203�������(�4�(��!�	��J��N�N�.��
�		�s�A.�.$B�BrN)	r�r�r�r�r�r{r�rrr�s@rr#r#Ys����	�K�204)�)rr#c�Va�]tRtRtoRtRt]P3RltRt	Rt205RtVtR#)	r%i}a%Threaded child watcher implementation.206 207The watcher uses a thread per process208for waiting for the process finish.209 210It doesn't require subscription on POSIX signal211but a thread creation is not free.212 213The watcher has O(1) complexity, its performance doesn't depend214on amount of spawn processes.215c�J�\P!^4Vn/VnR#r�)�	itertoolsr��_pid_counter�_threadsrs&rr�_ThreadedChildWatcher.__init__�s��%�O�O�A�.�����
rc���\VPP44Uu.uFpVP4'gKVNK	ppV'dV!VPR2\216VR7R#R#uupi)z0 has registered but not finished child processesr+N)r0r��values�is_aliver(r4)r&rZ�thread�threadss&&  rr[�_ThreadedChildWatcher.__del__�sg��(,�T�]�]�-A�-A�-C�(D�)�(D�f��o�o�'��6�(D��)���T�^�^�$�$T�U�!��
���)s�A3�A3c���\P!4p\P!VPR\VP42WAW#3RR7pWPPV&VP4R#)zasyncio-waitpid-T)�target�namerT�daemonN)	rr��	threading�Thread�_do_waitpid�nextr�r��start)r&r�rSrTrr�s&&&*  rr{�'_ThreadedChildWatcher.add_child_handler�s`���&�&�(���!�!��)9�)9�)9�$�t�?P�?P�:Q�9R�'S�(,�8�'B�)-�/��$�
�
�c�����rc���V^8�gQh\P!V^4wrV\V4pVP4'd\P217!RW'4TP4'd\P!RY4MTP!Y5T.TO5!TPPT4R# \dTp^�p\P!RT4L�i;i)r�z$process %s exited with returncode %sz8Unknown child process pid %d, will report returncode 255z%Loop %r that handles pid %r is closedN)rr�rr7rr>r�r��	is_closedr�r��pop)r&r�expected_pidrSrTr�rr�s&&&&&   rr��!_ThreadedChildWatcher._do_waitpid�s����a����	7��*�*�\�1�5�K�C�0��7�J��~�~������C�)�7��>�>����N�N�B�D�N��%�%�h�Z�G�$�G��
�
���,�'��'!�	��C��J��N�N�J��
�	�s�B<�<&C%�$C%)r�r�N)
r�r�r�r�r�rr2r3r[r{r�rrr�s@rr%r%}s,����218��%�M�M���(�(rr%c���\\R4'gR#\P!4p\P!\P!V^44R# \219dR#i;i)r�FT)�hasattrr�getpidr-r�rK)r�s rr"r"�sR���2�|�$�$����i�i�k��220������s�A�&�'�������s�AA�A+�*A+c��]tRtRtRt]tRtR#)�_UnixDefaultEventLoopPolicyi�zUNIX event loop policyrN)r�r�r�r�r�r�
_loop_factoryrrrrr�r��s221�� �*�Mrr�)�SelectorEventLoop�	EventLoop)0r�rQr�r�rr,rGr�r�r�r.r�r2�rrrrrrrr	r222r�logr�__all__rx�ImportErrorrr�BaseSelectorEventLoopr�
ReadTransportrl�_FlowControlMixin�WriteTransportru�BaseSubprocessTransportrzr#r%r"�_BaseDefaultEventLoopPolicyr�r��_DefaultEventLoopPolicyr�rrr�<module>r�s��8��	��	��
�
���223�����������������<�<�7��224�C�225D�D�	�226�k2�_�B�B�k2�\
M�Z�5�5�M�`J�j�:�:�(�7�7�J�Z ��F�F� �0")�")�H:(�:(�x	�+�&�"D�"D�+�227+��5���	r
codekingpro/portable-devtools · Team Ai