ok

Mini Shell

Direktori : /opt/alt/python311/lib64/python3.11/asyncio/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/asyncio/__pycache__/futures.cpython-311.opt-2.pyc

�

�f�7��6�	dZddlZddlZddlZddlZddlmZddlm	Z	ddlm
Z
ddlmZddlmZe	j
Z
e	jZe	jZe	jZejdz
ZGd	�d
��ZeZd�Zd�Zd
�Zd�Zd�Zd�Zdd�d�Z	ddlZejxZZdS#e$rYdSwxYw))�Future�wrap_future�isfuture�N)�GenericAlias�)�base_futures)�events)�
exceptions)�format_helpersc���eZdZ	eZdZdZdZdZdZ	dZ
dZdZdd�d�Z
d�Zd�Zee��Zed���Zejd���Zd	�Zd
�Zdd�Zd�Zd
�Zd�Zd�Zd�Zdd�d�Zd�Zd�Z d�Z!d�Z"e"Z#dS)rNF��loopc���	|�tj��|_n||_g|_|j���r-tjtjd����|_	dSdS)Nr)
r	�_get_event_loop�_loop�
_callbacks�	get_debugr�
extract_stack�sys�	_getframe�_source_traceback��selfrs  �6/opt/alt/python311/lib64/python3.11/asyncio/futures.py�__init__zFuture.__init__Hsv��	��<��/�1�1�D�J�J��D�J�����:���!�!�	"�%3�%A��
�a� � �&"�&"�D�"�"�"�	"�	"�c�*�tj|��S�N)r�_future_repr�rs r�__repr__zFuture.__repr__Xs���(��.�.�.rc��|jsdS|j}|jj�d�||d�}|jr
|j|d<|j�|��dS)Nz exception was never retrieved)�message�	exception�future�source_traceback)�_Future__log_traceback�
_exception�	__class__�__name__rr�call_exception_handler)r�exc�contexts   r�__del__zFuture.__del__[sx���#�	�
�F��o���>�*�J�J�J���	
�
���!�	A�*.�*@�G�&�'��
�)�)�'�2�2�2�2�2rc��|jSr)r'r s r�_log_tracebackzFuture._log_tracebackms���#�#rc�6�|rtd���d|_dS)Nz'_log_traceback can only be set to FalseF)�
ValueErrorr')r�vals  rr0zFuture._log_tracebackqs(���	H��F�G�G�G�$����rc�8�	|j}|�td���|S)Nz!Future object is not initialized.)r�RuntimeErrorrs  r�get_loopzFuture.get_loopws%��;��z���<��B�C�C�C��rc���	|j�|j}d|_|S|j�tj��}ntj|j��}|j|_d|_|Sr)�_cancelled_exc�_cancel_messager
�CancelledError�__context__�rr,s  r�_make_cancelled_errorzFuture._make_cancelled_error~sj��	�
��*��%�C�"&�D���J���'��+�-�-�C�C��+�D�,@�A�A�C��-���"����
rc��	d|_|jtkrdSt|_||_|���dS)NFT)r'�_state�_PENDING�
_CANCELLEDr9�_Future__schedule_callbacks)r�msgs  r�cancelz
Future.cancel�sI��	� %����;�(�"�"��5� ���"����!�!�#�#�#��trc��	|jdd�}|sdSg|jdd�<|D]"\}}|j�|||����#dS�N�r-)rr�	call_soon)r�	callbacks�callback�ctxs    r�__schedule_callbackszFuture.__schedule_callbacks�ss��	�
�O�A�A�A�&�	��	��F��������&�	>�	>�M�H�c��J� � ��4�� �=�=�=�=�	>�	>rc�$�	|jtkSr)r?rAr s r�	cancelledzFuture.cancelled�s��6��{�j�(�(rc�$�	|jtkSr)r?r@r s r�donezFuture.done�s��	�
�{�h�&�&rc��	|jtkr|���}|�|jtkrt	jd���d|_|j�|j�|j	���|j
S)NzResult is not ready.F)r?rAr=�	_FINISHEDr
�InvalidStateErrorr'r(�with_traceback�
_exception_tb�_resultr<s  r�resultz
Future.result�s|��	��;�*�$�$��,�,�.�.�C��I��;�)�#�#��.�/E�F�F�F�$����?�&��/�0�0��1C�D�D�D��|�rc��	|jtkr|���}|�|jtkrt	jd���d|_|jS)NzException is not set.F)r?rAr=rRr
rSr'r(r<s  rr$zFuture.exception�s[��	��;�*�$�$��,�,�.�.�C��I��;�)�#�#��.�/F�G�G�G�$�����rrGc���	|jtkr|j�|||���dS|�t	j��}|j�||f��dSrF)r?r@rrH�contextvars�copy_contextr�append)r�fnr-s   r�add_done_callbackzFuture.add_done_callback�sl��	��;�(�"�"��J� � ��T�7� �;�;�;�;�;���%�2�4�4���O�"�"�B��=�1�1�1�1�1rc���	�fd�|jD��}t|j��t|��z
}|r||jdd�<|S)Nc�*��g|]\}}|�k�||f��S�ra)�.0�frKr]s   �r�
<listcomp>z/Future.remove_done_callback.<locals>.<listcomp>�s2���*�*�*�"*�1�c�!"�b��� !�#�h�!(��r)r�len)rr]�filtered_callbacks�
removed_counts `  r�remove_done_callbackzFuture.remove_done_callback�sp���	�*�*�*�*�.2�o�*�*�*���D�O�,�,�s�3E�/F�/F�F�
��	4�!3�D�O�A�A�A���rc��	|jtkrtj|j�d|�����||_t
|_|���dS)N�: )r?r@r
rSrVrRrB)rrWs  r�
set_resultzFuture.set_result�s]��	�
�;�(�"�"��.�$�+�/I�/I��/I�/I�J�J�J��������!�!�#�#�#�#�#rc�`�	|jtkrtj|j�d|�����t	|t
��r
|��}t|��turtd���||_|j	|_
t|_|���d|_
dS)NrjzPStopIteration interacts badly with generators and cannot be raised into a FutureT)r?r@r
rS�
isinstance�type�
StopIteration�	TypeErrorr(�
__traceback__rUrRrBr')rr$s  r�
set_exceptionzFuture.set_exception	s���	�
�;�(�"�"��.�$�+�/I�/I��/I�/I�J�J�J��i��&�&�	$�!�	���I��	�?�?�m�+�+��A�B�B�
B�#���&�4�������!�!�#�#�#�#����rc#�K�|���sd|_|V�|���std���|���S)NTzawait wasn't used with future)rP�_asyncio_future_blockingr5rWr s r�	__await__zFuture.__await__sU�����y�y�{�{�	�,0�D�)��J�J�J��y�y�{�{�	@��>�?�?�?��{�{�}�}�rr)$r*�
__module__�__qualname__r@r?rVr(rrr9r8rtr'rr!r.�classmethodr�__class_getitem__�propertyr0�setterr6r=rDrBrNrPrWr$r^rhrkrrru�__iter__rarrrrs��������&�F��G��J��E����O��N� %���O�#�"�"�"�"�"� /�/�/�3�3�3� $��L�1�1��
�$�$��X�$���%�%���%�
������(
�
�
�
�>�>�>�)�)�)�'�'�'����"��� 04�2�2�2�2�2� ���
$�
$�
$�$�$�$�&����H�H�Hrrc�T�	|j}|��S#t$rYnwxYw|jSr)r6�AttributeErrorr)�futr6s  r�	_get_loopr�+sH����<���x�z�z����
�
�
���
�����9�s��
 � c�^�	|���rdS|�|��dSr)rNrk)rrWs  r�_set_result_unless_cancelledr�7s2��I�
�}�}�������N�N�6�����rc��t|��}|tjjurt	j|j�S|tjjurt	j|j�S|tjjurt	j|j�S|Sr)rn�
concurrent�futuresr:r
�args�TimeoutErrorrS)r,�	exc_classs  r�_convert_future_excr�>su���S�	�	�I��J�&�5�5�5��(�#�(�3�3�	�j�(�5�	5�	5��&���1�1�	�j�(�:�	:�	:��+�S�X�6�6��
rc�"�	|���r|j��|j��sdS|���}|�|jt|����dS|���}|j|��dSr)rNrD�set_running_or_notify_cancelr$rrr�rWrk)r��sourcer$rWs    r�_set_concurrent_future_stater�Js���B�
�������
�����2�:�2�4�4����� � �"�"�I��� �
� �!4�Y�!?�!?�@�@�@�@�@��������
��f�%�%�%�%�%rc�N�	|���rdS|���r|���dS|���}|�$|�t	|����dS|���}|�|��dSr)rNrDr$rrr�rWrk)r��destr$rWs    r�_copy_future_stater�Ys����
�~�~������
�����$����
�
�
�
�
��$�$�&�&�	�� ����2�9�=�=�>�>�>�>�>��]�]�_�_�F��O�O�F�#�#�#�#�#rc�������	t���s.t�tjj��std���t���s.t�tjj��std���t���rt
���nd�t���rt
���nd�d�����fd�}����fd�}��|����|��dS)Nz(A future is required for source argumentz-A future is required for destination argumentc�h�t|��rt||��dSt||��dSr)rr�r�)r%�others  r�
_set_statez!_chain_future.<locals>._set_state}s>���F���	8��u�f�-�-�-�-�-�(���7�7�7�7�7rc���|���r8����ur����dS���j��dSdSr)rNrD�call_soon_threadsafe)�destination�	dest_loopr��source_loops ���r�_call_check_cancelz)_chain_future.<locals>._call_check_cancel�sa���� � �"�"�	@��"�k�Y�&>�&>��
�
�������0�0���?�?�?�?�?�		@�	@rc��������r������rdS����ur��|��dS����rdS����|��dSr)rN�	is_closedr�)r�r�r�r�r�s ����r�_call_set_statez&_chain_future.<locals>._call_set_state�s�����!�!�#�#�	��%�)�*=�*=�*?�*?�%��F���	�[� 8� 8��J�{�F�+�+�+�+�+��"�"�$�$�
����*�*�:�{�F�K�K�K�K�Kr)rrmr�r�rrpr�r^)r�r�r�r�r�r�r�s``  @@@r�
_chain_futurer�msd���������F���D�J�v�/9�/A�/H�%J�%J�D��B�C�C�C��K� � �I��K�4>�4F�4M�*O�*O�I��G�H�H�H�'/��'7�'7�A�)�F�#�#�#�T�K�*2�;�*?�*?�I�	�+�&�&�&�T�I�8�8�8�@�@�@�@�@�@�@�	L�	L�	L�	L�	L�	L�	L�	L��!�!�"4�5�5�5�
���_�-�-�-�-�-rr
c��	t|��r|S|�tj��}|���}t	||��|Sr)rr	r�
create_futurer�)r%r�
new_futures   rrr�sV��0�������
��|��%�'�'���#�#�%�%�J��&�*�%�%�%��r)�__all__�concurrent.futuresr�rZ�loggingr�typesr�rr	r
rrr@rArR�DEBUG�STACK_DEBUGr�	_PyFuturer�r�r�r�r�r�r�_asyncio�_CFuture�ImportErrorrarr�<module>r�s���4���������������
�
�
�
�������������������������������� ��� ��
�
$�
��"�	��m�a���F�F�F�F�F�F�F�F�T
�	�	�	�	����	�	�	�&�&�&�$�$�$�().�).�).�X!%�
�
�
�
�
�(��O�O�O�
!��'�F�X�X�X��	�	�	�	��D�D�	���s�B�B�B

Zerion Mini Shell 1.0