HEX
Server: Apache
System: Linux sh-pro142.hostgator.com.br 5.14.0-162.23.1.9991722448259.nf.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 31 18:11:45 UTC 2024 x86_64
User: okform09 (1324)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: //usr/libexec/oracle-cloud-agent/plugins/osms/asyncio/coroutines.pyc
a

���d]"�@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)N�PYTHONASYNCIODEBUG)�sys�flags�dev_mode�ignore_environment�bool�os�environ�get�rr�*/usr/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)�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|�}|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�r!rrr�__iter__7szCoroWrapper.__iter__cCs|j�d�Sr-�r�sendr.rrr�__next__:szCoroWrapper.__next__cCs|j�|�Sr-r0)r!�valuerrrr1=szCoroWrapper.sendcCs|j�|||�Sr-)r�throw)r!�typer3�	tracebackrrrr4@szCoroWrapper.throwcCs
|j��Sr-)r�closer.rrrr7CszCoroWrapper.closecCs|jjSr-)r�gi_framer.rrrr8FszCoroWrapper.gi_framecCs|jjSr-)r�
gi_runningr.rrrr9JszCoroWrapper.gi_runningcCs|jjSr-)r�gi_coder.rrrr:NszCoroWrapper.gi_codecCs|Sr-rr.rrr�	__await__RszCoroWrapper.__await__cCs|jjSr-)r�gi_yieldfromr.rrrr<UszCoroWrapper.gi_yieldfromcCs�t|dd�}t|dd�}|dur||jdkr||�d�}t|dd�}|rrd�t�|��}|dtj�d	�7}||��7}t�	|�dS)
Nrr8r#z was never yielded fromrr�zB
Coroutine object created at (most recent call last, truncated to z last lines):
)
r �f_lasti�joinr6�format_listr�DEBUG_STACK_DEPTH�rstripr	�error)r!rr+�msg�tbrrr�__del__Ys
�
zCoroWrapper.__del__)N)NN)r�
__module__rr"r,r/r2r1r4r7�propertyr8r9r:r;r<rFrrrrr$s"





rcsztjdtdd�t���r�St���r.��nt����fdd���t�	���t
sX�}nt�����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?st�|i|��}t�|�s,t�|�s,t|t�r8|EdH}n8z
|j}WntyTYn0t|tj	j
�rp|�EdH}|Sr-)r�isfuturerr�
isinstancerr;�AttributeError�collections�abc�	Awaitable)�args�kw�res�
await_meth�rrr�corozs�
zcoroutine.<locals>.corocsDt�|i|���d�}|jr$|jd=t�dd�|_t�dd�|_|S)NrUr#rr)rrr rr)rQ�kwds�w�rVrrr�wrapper�szcoroutine.<locals>.wrapper)�warnings�warn�DeprecationWarningrr�isgeneratorfunction�	functools�wraps�typesr�_DEBUG�
_is_coroutine)rrZrrYrris"�


rcCst�|�pt|dd�tuS)z6Return True if func is a decorated coroutine function.rcN)rrr rcrUrrrr�s
�rcCs@t|�tvrdSt|t�r8tt�dkr4t�t|��dSdSdS)z)Return True if obj is a coroutine object.T�dFN)r5�_iscoroutine_typecacherL�_COROUTINE_TYPES�len�add)�objrrrr�s
rc
stt|�sJ�t|t���fdd�}dd�}d}t|d�rF|jrF|j}nt|d�r\|jr\|j}||�}|s~||�rz|�d�S|Sd}t|d�r�|jr�|j}nt|d	�r�|jr�|j}|jp�d
}d}��r0|j	du�r0t
�|j	��s0t�
|j	�}|dur�|\}}|du�r|�d|�d
|��}	n|�d|�d
|��}	n@|du�rV|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())r�_format_callbackr�hasattrrrr5)rV�	coro_name��is_corowrapperrr�get_name�sz#_format_coroutine.<locals>.get_namecSsDz|jWSty>z|jWYSty8YYdS0Yn0dS)NF)�
cr_runningrMr9)rVrrr�
is_running�sz%_format_coroutine.<locals>.is_running�cr_coder:z runningr8�cr_framez<empty co_filename>rz done, defined at r$z running, defined at z running at )rrLrrkrrr:r8rs�co_filenamerrr^r�_get_function_source�f_lineno�co_firstlineno)
rVrorq�	coro_coderl�
coro_frame�filename�lineno�sourcer*rrmrr(�sL
	

�
�

r() �__all__�collections.abcrNr_rrrr6rar[r=rrr�logr	rrbrr�objectrcr�
CoroutineType�
GeneratorTyperO�	Coroutinerf�setrerr(rrrr�<module>s0E8�