AlkantarClanX12

Your IP : 3.145.169.122


Current Path : /opt/alt/python310/lib64/python3.10/asyncio/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/asyncio/__pycache__/coroutines.cpython-310.pyc

o

6��f]"�@s�dZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddl
mZddl
m
Z
ddlmZdd	�Ze�ZGd
d�d�Zdd
�Ze�Zdd�ZejejejjefZe�Zdd�Zdd�ZdS))�	coroutine�iscoroutinefunction�iscoroutine�N�)�base_futures)�	constants)�format_helpers)�loggercCs"tjjptjjottj�d��S)NZPYTHONASYNCIODEBUG)�sys�flags�dev_mode�ignore_environment�bool�os�environ�get�rr�9/opt/alt/python310/lib64/python3.10/asyncio/coroutines.py�_is_debug_modes�rc@s�eZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zddd
�Zdd�Z	e
dd��Ze
dd��Ze
dd��Z
dd�Ze
dd��Zdd�ZdS)�CoroWrapperNcCsZt�|�st�|�sJ|��||_||_t�t�d��|_	t
|dd�|_t
|dd�|_dS)Nr�__name__�__qualname__)
�inspect�isgeneratorr�gen�funcr�
extract_stackr
�	_getframe�_source_traceback�getattrrr)�selfrrrrr�__init__'szCoroWrapper.__init__cCsJt|�}|jr|jd}|d|d�d|d��7}d|jj�d|�d�S)	N���z
, created at r�:r�<� �>)�_format_coroutiner�	__class__r)r �	coro_repr�framerrr�__repr__/s

zCoroWrapper.__repr__cC�|S�Nr�r rrr�__iter__7�zCoroWrapper.__iter__cCs|j�d�Sr-�r�sendr.rrr�__next__:�zCoroWrapper.__next__cCs|j�|�Sr-r1)r �valuerrrr2=r4zCoroWrapper.sendcCs|j�|||�Sr-)r�throw)r �typer5�	tracebackrrrr6@szCoroWrapper.throwcCs
|j��Sr-)r�closer.rrrr9Cs
zCoroWrapper.closecC�|jjSr-)r�gi_framer.rrrr;F�zCoroWrapper.gi_framecCr:r-)r�
gi_runningr.rrrr=Jr<zCoroWrapper.gi_runningcCr:r-)r�gi_coder.rrrr>Nr<zCoroWrapper.gi_codecCr,r-rr.rrr�	__await__Rr0zCoroWrapper.__await__cCr:r-)r�gi_yieldfromr.rrrr@Ur<zCoroWrapper.gi_yieldfromcCs�t|dd�}t|dd�}|dur@|jdkrB|�d�}t|dd�}|r9d�t�|��}|dtj�d	�7}||��7}t�	|�dSdSdS)
Nrr;r"z was never yielded fromrr�zB
Coroutine object created at (most recent call last, truncated to z last lines):
)
r�f_lasti�joinr8�format_listrZDEBUG_STACK_DEPTH�rstripr	�error)r rr*�msg�tbrrr�__del__Ys

��zCoroWrapper.__del__r-)NN)r�
__module__rr!r+r/r3r2r6r9�propertyr;r=r>r?r@rIrrrrr$s$





rcsztjdtdd�t���r�St���r��nt����fdd���t�	���t
s,�}nt�����fdd��}t|_|S)z�Decorator to mark coroutines.

    If the coroutine is not yielded from before it is destroyed,
    an error message is logged.
    zN"@coroutine" decorator is deprecated since Python 3.8, use "async def" instead�)�
stacklevelc?sz��|i|��}t�|�st�|�st|t�r|EdH}|Sz|j}Wn
ty-Y|Swt|tj	j
�r;|�EdH}|Sr-)rZisfuturerr�
isinstancerr?�AttributeError�collections�abc�	Awaitable)�args�kw�resZ
await_meth�rrr�corozs ��

�
�zcoroutine.<locals>.corocsDt�|i|���d�}|jr|jd=t�dd�|_t�dd�|_|S)NrVr"rr)rrrrr)rS�kwds�w�rWrrr�wrapper�szcoroutine.<locals>.wrapper)�warnings�warn�DeprecationWarningrr�isgeneratorfunction�	functools�wraps�typesr�_DEBUG�
_is_coroutine)rr[rrZrris"�


rcCst�|�pt|dd�tuS)z6Return True if func is a decorated coroutine function.rdN)rrrrdrVrrrr�s
�rcCs<t|�tvrdSt|t�rtt�dkrt�t|��dSdS)z)Return True if obj is a coroutine object.T�dF)r7�_iscoroutine_typecacherN�_COROUTINE_TYPES�len�add)�objrrrr�s
rc
spt|�sJ�t|t���fdd�}dd�}d}t|d�r#|jr#|j}nt|d�r.|jr.|j}||�}|s?||�r=|�d�S|Sd}t|d�rM|jrM|j}nt|d	�rX|jrX|j}|jp\d
}d}�r�|j	dur�t
�|j	�s�t�
|j	�}|durz|\}}|dur�|�d|�d
|��}	|	S|�d|�d
|��}	|	S|dur�|j}|�d|�d
|��}	|	S|j}|�d|�d
|��}	|	S)Ncs`�r
t�|jdi�St|d�r|jr|j}nt|d�r"|jr"|j}n	dt|�j�d�}|�d�S)Nrrrr$z without __name__>z())rZ_format_callbackr�hasattrrrr7)rW�	coro_name�Zis_corowrapperrr�get_name�s
z#_format_coroutine.<locals>.get_namecSs<z|jWStyz|jWYStyYYdSww)NF)�
cr_runningrOr=)rWrrr�
is_running�s��z%_format_coroutine.<locals>.is_running�cr_coder>z runningr;�cr_framez<empty co_filename>rz done, defined at r#z running, defined at z running at )rrNrrkrqr>r;rr�co_filenamerrr_rZ_get_function_source�f_lineno�co_firstlineno)
rWrnrpZ	coro_coderlZ
coro_frame�filename�lineno�sourcer)rrmrr'�sP
	



��
��r') �__all__Zcollections.abcrPr`rrr
r8rbr\rArrr�logr	rrcrr�objectrdr�
CoroutineType�
GeneratorTyperQ�	Coroutinerg�setrfrr'rrrr�<module>s2E8�