�
�f
��p�ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl
mZGd�dej��Z
Gd�dej��Zedkr�ej��Zeje��d eiZd
D]Ze��eee<�e
ee��Zdada ddlZn#e$rYnwxYwe��Zde_e��� e���dS#e $r>t0r4t0�!��st0�"��daY�ZwxYwdS)
�N�)�futuresc�$��eZdZ�fd�Zd�Z�xZS)�AsyncIOInteractiveConsolec���t���|��|jjxjt
jzc_||_dS)N)�super�__init__�compile�compiler�flags�ast�PyCF_ALLOW_TOP_LEVEL_AWAIT�loop)�self�localsr� __class__s ��7/opt/alt/python311/lib64/python3.11/asyncio/__main__.pyr z"AsyncIOInteractiveConsole.__init__sB���
������ � � ����#�#�s�'E�E�#�#��� � � �c�L����tj�������fd�}t�|�� ����S#t$r�t$r7tr�� d��YdS��
��YdSwxYw)Nc�8��dadatj��j��} |��}na#t
$r�t$r"}da��|��Yd}~dSd}~wt$r }��|��Yd}~dSd}~wwxYwtj
|��s��|��dS �j�
|��atjt���dS#t$r }��|��Yd}~dSd}~wwxYw)NFT)�repl_future�repl_future_interrupted�types�FunctionTyper�
SystemExit�KeyboardInterrupt�
set_exception�
BaseException�inspect�iscoroutine�
set_resultr�create_taskr�
_chain_future)�func�coro�ex�exc�code�futurers ���r�callbackz3AsyncIOInteractiveConsole.runcode.<locals>.callbacksn����K�&+�#��%�d�D�K�8�8�D�
��t�v�v�����
�
�
��$�
�
�
�*.�'��$�$�R�(�(�(����������� �
�
�
��$�$�R�(�(�(�����������
�����&�t�,�,�
��!�!�$�'�'�'���
*�"�i�3�3�D�9�9���%�k�6�:�:�:�:�:�� �
*�
*�
*��$�$�S�)�)�)�)�)�)�)�)�)�����
*���s9�
,�B
�A�
B
�*B�B
�94C/�/
D�9D�Dz
KeyboardInterrupt
)�
concurrentr�Futurer�call_soon_threadsafe�resultrrr�write�
showtraceback)rr(r*r)s`` @r�runcodez!AsyncIOInteractiveConsole.runcodes�������#�*�*�,�,�� *� *� *� *� *� *� *�<
�!�!�(�+�+�+� %��=�=�?�?�"��� � � ��� %� %� %�&�
%��
�
�2�3�3�3�3�3�3��"�"�$�$�$�$�$�$� %���s�A�0B#�B#�"B#)�__name__�
__module__�__qualname__r r1�
__classcell__)rs@rrrsG������������+%�+%�+%�+%�+%�+%�+%rrc��eZdZd�ZdS)�
REPLThreadc
�� dtj�dtj�dttdd���d�}t�|d���t
jd d
t���t�
tj��dS#t
jd d
t���t�
tj��wxYw)Nz
asyncio REPL z on zy
Use "await" directly instead of "asyncio.run()".
Type "help", "copyright", "credits" or "license" for more information.
�ps1z>>> zimport asynciozexiting asyncio REPL...)�banner�exitmsg�ignorez ^coroutine .* was never awaited$)�message�category)�sys�version�platform�getattr�console�interact�warnings�filterwarnings�RuntimeWarningrr-�stop)rr:s r�runzREPLThread.runFs��� 1�?���?�?���?�?��3��v�.�.� ?�?�?�
�
����1�
�
3�
3�
3�
�#��;�'�
)�
)�
)�
)�
�%�%�d�i�0�0�0�0�0��
�#��;�'�
)�
)�
)�
)�
�%�%�d�i�0�0�0�0���s
�AB�ACN)r2r3r4rI�rrr7r7Ds#������1�1�1�1�1rr7�__main__�asyncio>�__file__r2�__spec__�
__loader__�__package__�__builtins__FT)#r
rLr(�concurrent.futuresr+rr?� threadingrrE�r�InteractiveConsoler�Threadr7r2�new_event_loopr�set_event_loop�repl_locals�keyrrCrr�readline�ImportError�repl_thread�daemon�start�run_foreverr�done�cancelrJrr�<module>rcs!��
�
�
�
�����������������
�
�
�
�������������������3%�3%�3%�3%�3%�� 7�3%�3%�3%�l1�1�1�1�1��!�1�1�1�0�z���!�7�!�#�#�D��G��4� � � ��g�&�K�,�)�)��"�6�8�8�C�=��C���'�'��T�:�:�G��K�#��
��������
�
�
���
�����*�,�,�K��K�������� � �������
�E��
!� � � ��
/�;�#3�#3�#5�#5�
/��"�"�$�$�$�*.�'��H� ����7�s%�#B(�(B0�/B0�C0�0AD3�2D3 |