Your IP : 3.141.25.125


Current Path : /opt/alt/python39/lib64/python3.9/asyncio/__pycache__/
Upload File :
Current File : //opt/alt/python39/lib64/python3.9/asyncio/__pycache__/coroutines.cpython-39.opt-2.pyc

a

R�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"tjjp tjjo ttj�d��S)NZPYTHONASYNCIODEBUG)�sys�flags�dev_mode�ignore_environment�bool�os�environ�get�rr�7/opt/alt/python39/lib64/python3.9/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)�CoroWrapperNcCs>||_||_t�t�d��|_t|dd�|_t|dd�|_	dS)Nr�__name__�__qualname__)
�gen�funcr�
extract_stackr
�	_getframe�_source_traceback�getattrrr)�selfrrrrr�__init__'s
zCoroWrapper.__init__cCsJt|�}|jr4|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__cCs|S�Nr�rrrr�__iter__7szCoroWrapper.__iter__cCs|j�d�Sr*�r�sendr+rrr�__next__:szCoroWrapper.__next__cCs|j�|�Sr*r-)r�valuerrrr.=szCoroWrapper.sendcCs|j�|||�Sr*)r�throw)r�typer0�	tracebackrrrr1@szCoroWrapper.throwcCs
|j��Sr*)r�closer+rrrr4CszCoroWrapper.closecCs|jjSr*)r�gi_framer+rrrr5FszCoroWrapper.gi_framecCs|jjSr*)r�
gi_runningr+rrrr6JszCoroWrapper.gi_runningcCs|jjSr*)r�gi_coder+rrrr7NszCoroWrapper.gi_codecCs|Sr*rr+rrr�	__await__RszCoroWrapper.__await__cCs|jjSr*)r�gi_yieldfromr+rrrr9UszCoroWrapper.gi_yieldfromcCs�t|dd�}t|dd�}|dur||jdkr||�d�}t|dd�}|rrd�t�|��}|dtj�d	�7}||��7}t�	|�dS)
Nrr5r z was never yielded fromrr�zB
Coroutine object created at (most recent call last, truncated to z last lines):
)
r�f_lasti�joinr3�format_listrZDEBUG_STACK_DEPTH�rstripr	�error)rrr(�msg�tbrrr�__del__Ys
�
zCoroWrapper.__del__)N)NN)r�
__module__rrr)r,r/r.r1r4�propertyr5r6r7r8r9rBrrrrr$s"





rcsztjdtdd�t���r�St���r.��nt����fdd���t�	���t
sX�}nt�����fdd��}t|_|S)NzN"@coroutine" decorator is deprecated since Python 3.8, use "async def" instead�)�
stacklevelc?st�|i|��}t�|�s,t�|�s,t|t�r8|EdH}n8z
|j}WntyTYn0t|tj	j
�rp|�EdH}|Sr*)rZisfuture�inspectZisgenerator�
isinstancerr8�AttributeError�collections�abc�	Awaitable)�args�kw�resZ
await_meth�rrr�corozs�
zcoroutine.<locals>.corocsDt�|i|���d�}|jr$|jd=t�dd�|_t�dd�|_|S)NrPr rr)rrrrr)rM�kwds�w�rQrrr�wrapper�szcoroutine.<locals>.wrapper)�warnings�warn�DeprecationWarningrGr�isgeneratorfunction�	functools�wraps�typesr�_DEBUG�
_is_coroutine)rrUrrTrris"�


rcCst�|�pt|dd�tuS)Nr^)rGrrr^rPrrrr�s
�rcCs@t|�tvrdSt|t�r8tt�dkr4t�t|��dSdSdS)NT�dF)r2�_iscoroutine_typecacherH�_COROUTINE_TYPES�len�add)�objrrrr�s
rc
sht|t���fdd�}dd�}d}t|d�r:|jr:|j}nt|d�rP|jrP|j}||�}|sr||�rn|�d�S|Sd}t|d�r�|jr�|j}nt|d	�r�|jr�|j}|jp�d
}d}��r$|jdu�r$t	�
|j��s$t�|j�}|dur�|\}}|du�r|�d|�d
|��}	n|�d|�d
|��}	n@|du�rJ|j
}|�d|�d
|��}	n|j}|�d|�d
|��}	|	S)Ncs`�rt�|jdi�St|d�r,|jr,|j}n*t|d�rD|jrD|j}ndt|�j�d�}|�d�S)Nrrrr"z without __name__>z())rZ_format_callbackr�hasattrrrr2)rQ�	coro_name�Zis_corowrapperrr�get_name�sz#_format_coroutine.<locals>.get_namecSsDz|jWSty>z|jWYSty8YYdS0Yn0dS)NF)�
cr_runningrIr6)rQrrr�
is_running�sz%_format_coroutine.<locals>.is_running�cr_coder7z runningr5�cr_framez<empty co_filename>rz done, defined at r!z running, defined at z running at )rHrrerkr7r5rl�co_filenamerrGrYrZ_get_function_source�f_lineno�co_firstlineno)
rQrhrjZ	coro_coderfZ
coro_frame�filename�lineno�sourcer'rrgrr%�sJ
	

�
�

r%) �__all__�collections.abcrJrZrGrr
r3r\rVr:rrr�logr	rr]rr�objectr^r�
CoroutineType�
GeneratorTyperK�	Coroutinera�setr`rr%rrrr�<module>s0E8�

?>