MINI MINI MANI MO

Path : /usr/lib64/python3.6/asyncio/__pycache__/
File Upload :
Current File : //usr/lib64/python3.6/asyncio/__pycache__/coroutines.cpython-36.pyc

3


 \+@sdddgZddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddlm
Z
ddlmZdd	lmZdd
l
mZejdZejjoeejjdZyejZejZWnek
rdZdZYnXy
ejZWnek
rd
dZYnXyddlmZ m!Z"Wne#k
r*dZ Z"YnXddZ$e$Z%[$ddZ&GdddZ'ddZe(Z)ddZej*e'fZ+e dk	re+e f7Z+edk	refe+Z+ddZ,ddZ-dS)	coroutineiscoroutinefunctioniscoroutineN)compat)	constants)events)base_futures)loggerZ
YIELD_FROMZPYTHONASYNCIODEBUGcCsdS)NF)funcrr*/usr/lib64/python3.6/asyncio/coroutines.py<lambda>/sr)	Coroutine	AwaitablecCsFGddd}dd}d}|}||}t||j||j|fkS)	Nc@s,eZdZddZddZddZddZd	S)
z!has_yield_from_bug.<locals>.MyGencSs
d|_dS)N)	send_args)selfrrr
__init__;sz*has_yield_from_bug.<locals>.MyGen.__init__cSs|S)Nr)rrrr
__iter__=sz*has_yield_from_bug.<locals>.MyGen.__iter__cSsdS)N*r)rrrr
__next__?sz*has_yield_from_bug.<locals>.MyGen.__next__cWs
||_dS)N)r)rZwhatrrr
sendAsz&has_yield_from_bug.<locals>.MyGen.sendN)__name__
__module____qualname__rrrrrrrr
MyGen:srcss|EdHdS)Nr)genrrr
yield_from_genDsz*has_yield_from_bug.<locals>.yield_from_genr)rrr)nextrr)rrvaluercororrr
has_yield_from_bug9s

r#cCs
t|dS)N)CoroWrapper)rrrr

debug_wrapperPsr%c@seZdZd%ddZddZddZdd	Zer8d
dZnddZd&d
dZ	ddZ
eddZeddZ
eddZejrddZeddZeddZeddZedd Zed!d"Zd#d$ZdS)'r$NcCsZtj|stj|st|||_||_tjtj	d|_
t|dd|_t|dd|_
dS)Nrrr)inspectisgeneratorrAssertionErrorrrr
extract_stacksys	_getframe_source_tracebackgetattrrr)rrrrrr
r[szCoroWrapper.__init__cCs@t|}|jr0|jd}|d|d|df7}d|jj|fS)Nrz, created at %s:%srz<%s %s>)_format_coroutiner,	__class__r)r	coro_reprframerrr
__repr__cs

zCoroWrapper.__repr__cCs|S)Nr)rrrr
rjszCoroWrapper.__iter__cCs|jjdS)N)rr)rrrr
rmszCoroWrapper.__next__cGsBtj}|j}|jdkst|jj|jtkr6|d}|jj	|S)Nr)
r*r+f_backf_lastir(f_codeco_code_YIELD_FROMrr)rr!r2Zcallerrrr
ruszCoroWrapper.sendcCs|jj|S)N)rr)rr!rrr
r}scCs|jj|||S)N)rthrow)rtyper!	tracebackrrr
r9szCoroWrapper.throwcCs
|jjS)N)rclose)rrrr
r<szCoroWrapper.closecCs|jjS)N)rgi_frame)rrrr
r=szCoroWrapper.gi_framecCs|jjS)N)r
gi_running)rrrr
r>szCoroWrapper.gi_runningcCs|jjS)N)rgi_code)rrrr
r?szCoroWrapper.gi_codecCs,t|jdd}|dk	r(tdj|j||S)Ncr_awaitz;Cannot await on coroutine {!r} while it's awaiting for {!r})r-rRuntimeErrorformat)rr@rrr
	__await__szCoroWrapper.__await__cCs|jjS)N)rgi_yieldfrom)rrrr
rDszCoroWrapper.gi_yieldfromcCs|jjS)N)rr@)rrrr
r@szCoroWrapper.cr_awaitcCs|jjS)N)r
cr_running)rrrr
rEszCoroWrapper.cr_runningcCs|jjS)N)rcr_code)rrrr
rFszCoroWrapper.cr_codecCs|jjS)N)rcr_frame)rrrr
rGszCoroWrapper.cr_framecCst|dd}t|dd}|dkr,t|dd}|dk	r|jd
krd|}t|df}|rdjtj|}|dtjd	7}||j7}tj	|dS)Nrr=rGrz%r was never yielded fromr,zB
Coroutine object created at (most recent call last, truncated to z last lines):
r.)
r-r5joinr;format_listrZDEBUG_STACK_DEPTHrstripr
error)rrr2msgtbrrr
__del__szCoroWrapper.__del__)N)NN)rrrrr3rr_YIELD_FROM_BUGrr9r<propertyr=r>r?rZPY35rCrDr@rErFrGrOrrrr
r$Xs(


r$csptrStjrntjfddtsNtdkrD}qft}ntjfdd}t|_|S)zDecorator to mark coroutines.

    If the coroutine is not yielded from before it is destroyed,
    an error message is logged.
    c?sv||}tj|s(tj|s(t|tr4|EdH}n>tdk	rry
|j}Wntk
rZYnXt|trr|EdH}|S)N)	r	Zisfuturer&r'
isinstancer$
_AwaitableABCrCAttributeError)argskwresZ
await_meth)rrr
r"s



zcoroutine.<locals>.coroNcs@t||d}|jr |jd=tdd|_tdd|_|S)N)rrrrr.)r$r,r-rr)rUkwdsw)r"rrr
wrapperszcoroutine.<locals>.wrapper)_inspect_iscoroutinefunctionr&isgeneratorfunction	functoolswraps_DEBUG_types_coroutine
_is_coroutine)rrZr)r"rr
rs


cCst|ddtkpt|S)z6Return True if func is a decorated coroutine function.raN)r-rar[)rrrr
rscCs
t|tS)z)Return True if obj is a coroutine object.)rR_COROUTINE_TYPES)objrrr
rsc
Cs&t|stt|drt|drt|dt|dt|j}dj|}d}y
|j}Wn4tk
ry
|j	}Wntk
rYnXYnX|rdj|S|Sd}t
|tr|j}|j
}|dk	rdj|}n|}|dkrtj|fi}d}t|do|jr|j}nt|dr|jr|j}d}t|dr>|jr>|j}nt|d	rX|jrX|j}d
}|rp|jrp|j}d}|}t
|trtj|jr|jdk	rtj|j}	|	dk	r|	\}}|dkrd|||f}nd
|||f}n:|dk	r|j}d|||f}n|r"|j}d|||f}|S)NrFr?rrz{}()Fz
{} runningrGr=z<empty co_filename>rz%s done, defined at %s:%sz%s running, defined at %s:%sz%s running at %s:%s)rr(hasattrr-r:rrBrErTr>rRr$rrrZ_format_callbackrFr?rGr=co_filenamer&r\Z_get_function_sourcef_linenoco_firstlineno)
r"Z	coro_nameZrunningrZ	coro_codeZ
coro_framefilenamelinenor1sourcerrr
r/sz







r/).__all__r]r&Zopcodeosr*r;typesrHrrrr	logr
Zopmapr8flagsignore_environmentboolenvirongetr_rr`
CoroutineTypeZ_types_CoroutineTyperTrr[collections.abcrZ
_CoroutineABCrrSImportErrorr#rPr%r$objectra
GeneratorTyperbrr/rrrr
<module>sZ




j:






OHA YOOOO