CasperSecurity

Current Path : /lib/python3.10/asyncio/__pycache__/
Upload File :
Current File : //lib/python3.10/asyncio/__pycache__/coroutines.cpython-310.pyc

o

`�wi]"�@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)N�PYTHONASYNCIODEBUG)�sys�flags�dev_mode�ignore_environment�bool�os�environ�get�rr�)/usr/lib/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.r2)r!�valuerrrr3=r5zCoroWrapper.sendcCs|j�|||�Sr.)r�throw)r!�typer6�	tracebackrrrr7@szCoroWrapper.throwcCs
|j��Sr.)r�closer/rrrr:Cs
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__Rr1zCoroWrapper.__await__cCr;r.)r�gi_yieldfromr/rrrrAUr=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�joinr9�format_listr�DEBUG_STACK_DEPTH�rstripr	�error)r!rr+�msg�tbrrr�__del__Ys

��zCoroWrapper.__del__r.)NN)r�
__module__rr"r,r0r4r3r7r:�propertyr<r>r?r@rArKrrrrr$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.)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)NrZr#rr)rrr rr)rV�kwds�w�r[rrr�wrapper�szcoroutine.<locals>.wrapper)�warnings�warn�DeprecationWarningrr�isgeneratorfunction�	functools�wraps�typesr�_DEBUG�
_is_coroutine)rr_rr^rris"�


rcCst�|�pt|dd�tuS)z6Return True if func is a decorated coroutine function.rhN)rrr rhrZrrrr�s
�rcCs<t|�tvrdSt|t�rtt�dkrt�t|��dSdS)z)Return True if obj is a coroutine object.T�dF)r8�_iscoroutine_typecacherQ�_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())r�_format_callbackr�hasattrrrr8)r[�	coro_name��is_corowrapperrr�get_name�s
z#_format_coroutine.<locals>.get_namecSs<z|jWStyz|jWYStyYYdSww)NF)�
cr_runningrRr>)r[rrr�
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 )rrQrrprwr?r<rx�co_filenamerrrcr�_get_function_source�f_lineno�co_firstlineno)
r[rtrv�	coro_coderq�
coro_frame�filename�lineno�sourcer*rrrrr(�sP
	



��
��r() �__all__�collections.abcrSrdrrrr9rfr`rBrrr�logr	rrgrr�objectrhr�
CoroutineType�
GeneratorTyperT�	Coroutinerk�setrjrr(rrrr�<module>s2E8�
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY