ROOTPLOIT
Server: LiteSpeed
System: Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User: niphet (1079)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: //lib/python3.6/site-packages/__pycache__/decorator.cpython-36.pyc
3

5*[Z@@sdZddlmZddlZddlZddlZddlZddlZddlZdZ	ej
dkrdddlmZddZnej
d	d
ZddZd
dZy
ejZWnek
rddZYnXej
ddZddZejdZGdddeZffddZd*ddZyddlmZWn"ek
rddlmZYnXGdddeZeejZe ej!Z"e"dkrhej#rhd d!Zee_n,e"dkr|ej#r|ne"d"krd#d!Zee_eeZ$d$d%Z%d&d'Z&d(d)Z'dS)+zT
Decorator module, see http://pypi.python.org/pypi/decorator
for the documentation.
)print_functionNz4.2.13)getfullargspeccCs|jS)N)__init__)clsr/usr/lib/python3.6/decorator.pyget_init0sr	FullArgSpecz5args varargs varkw defaults kwonlyargs kwonlydefaultscCstjtj|gdfS)z?A quick and dirty replacement for getfullargspec for Python 2.XN)r
_makeinspect
getargspec)frrrr7srcCs|jjS)N)r__func__)rrrrr	;scCsdS)NFr)rrrriscoroutinefunctionBsrArgSpeczargs varargs varkw defaultscCst|}t|j|j|j|jS)z$A replacement for inspect.getargspec)rrargsvarargsvarkwdefaults)rspecrrrr
Jsr
z\s*def\s*([_\w][_\w\d]*)\s*\(c@sZeZdZdZejZfZZZ	Z
ZZd
ddZ
ddZddd	ZedddZdS)
FunctionMakerz
    An object with the ability to create functions with a given signature.
    It has attributes name, doc, module, signature, defaults, dict and
    methods update and make.
    NcCs||_|rf|j|_|jdkr$d|_|j|_|j|_tj|rft	|}t
|di|_xdD]}	t||	t
||	q\Wx&t
|jD]\}
}t|d
|
|qWt|j}t|j}
|jr|jd|j|
jd|jn|jr|jdx.|jD]$}	|jd|	|
jd
|	|	fqW|jrB|jd|j|
jd|jdj||_dj|
|_|jj|_|rr||_|dk	r||_|r||_|r||_|r||_|r||_t|dstt|dstd|dS)Nz<lambda>_lambda___annotations__rrrr
kwonlyargskwonlydefaultszarg%d*z%s=Nonez%s=%sz**z, name	signaturez%You are decorating a non function: %s)rrrrrr)shortsignature__name__r__doc__doc
__module__moduler
isfunctionrgetattrannotationssetattr	enumeraterlistrappendrrjoinr__dict__copydictrhasattrAssertionError	TypeError)selffuncrrrr"r$ZfuncdictZargspecaiargZallargsZallshortargsrrrras\




zFunctionMaker.__init__cKs|j|_t|dd|_t|di|_|j|_|jp4d|_t|dd|_	yt
jd}Wntk
rld}YnX|j
jdd}t|d||_|jj|dS)	z2Update the signature of func with the data in selfr"Nr/r'?r r$)rr r&r!r-r__defaults__r__kwdefaults__rsys	_getframeAttributeError	f_globalsgetr#update)r3r4kwframeZcallermodulerrrrAs
zFunctionMaker.updateFc

Ks|t|}|pi}tj|}|dkr2td||jd}t|gdd|jjdD}x$|D]}	|	dkrbtd	|	|fqbW|j	d
s|d
7}dt
|jf}
yt||
d}t
||Wn*td
tjdt|tjdYnX||}|r||d<|j|f||S)zBMake a new function from a given template and update the signatureNz not a valid function template
%scSsg|]}|jdqS)z *)strip).0r7rrr
<listcomp>sz&FunctionMaker.make.<locals>.<listcomp>,_func__call_z%s is overridden in
%s
z<decorator-gen-%d>ZsinglezError in generated code:)fileZ
__source__)rIrJ)varsDEFsearchSyntaxErrorgroupsetrsplit	NameErrorendswithnext_compile_countcompileexecprintr<stderrrA)
r3Z	src_templevaldict	addsourceattrssrcmornamesnfilenamecoder4rrrmakes4



zFunctionMaker.makeTcKst|tr0|jjdd\}	}
|
dd}d}nd}	d}|}|||	||||}
djdd|jD}|jd}|rt|rd|jd	d
}nd|}|
j	|||f|S)
z
        Create a function from the strings name, signature and body.
        evaldict is the evaluation dictionary. If addsource is true an
        attribute __source__ is added to the result. The attributes attrs
        are added, if any.
        (rDNrKcss|]}d|VqdS)z    Nr)rFlinerrr	<genexpr>sz'FunctionMaker.create.<locals>.<genexpr>rJz#async def %(name)s(%(signature)s):
returnzreturn awaitzdef %(name)s(%(signature)s):
)

isinstancestrrErSr,
splitlinesr@rreplacere)robjZbodyr\rr"r$r]r^rrestrr4r3Zibodycallerrrrcreates	


zFunctionMaker.create)NNNNNNN)NF)NNNT)r r#__qualname__r!	itertoolscountrWrrrrrrrrAreclassmethodrrrrrrrTs
3
"rc	Csnt||d}d}x0t|D]$\}}d|}|||<||d7}qWtj|d|||d}t|drj|j|_|S)zE
    decorate(func, caller) decorates a function using a caller.
    )rJrIz_e%d_z, z,return _call_(_func_, %s%%(shortsignature)s))__wrapped__rs)r/r)rrrr0rs)	r4rqZextrasr\Zesr6ZextraZexZfunrrrdecorates

ryc
Cs|dk	rt||Sdf}}tj|rB|jj}d|j|jf}n~tj|r|jdkr\d}n|j}|j}|jj}t	|j
pzf}dj|jj|||}|r|d7}|j
}n|j
jj}|jj}t|td}tjd	||fd
||f|||j|d}	|rd||	_
|	S)
z=decorator(caller) converts a caller function into a decoratorNrwzHdecorator(%s) converts functions/generators into factories of %s objectsz<lambda>rz, rH)_callZ
_decorate_z%s(func, %s)zhif func is None: return lambda func:  _decorate_(func, _call, (%s))
return _decorate_(func, _call, (%s)))r"r$rx)N)ryrZisclassr lowerr%r!__code__co_argcountlenr:r,co_varnames	__class____call__r/rrrr#)
rqZ_funcZdefaultargsrrr"nargsZndefsr\decrrr	decorators:







r)_GeneratorContextManager)GeneratorContextManagerc@seZdZddZdS)ContextManagercCstj|dt||d|dS)zContext manager decoratorz.with _self_: return _func_(%(shortsignature)s))Z_self_rI)rx)rrrr/)r3r4rrrr#szContextManager.__call__N)r r#rsrrrrrr"srcOstj||||S)N)rr)r3gr5krrrr-srcOstj||||S)N)rr)r3rr5rrrrr3scCst|S)N)_contextmanager)r4rrrcontextmanager:srcCsRd}x:t|D].\}}t||r&d}Pt||r|||<d}qW|rN|j|dS)z_
    Append ``a`` to the list of the virtual ancestors, unless it is already
    included.
    TFN)r)
issubclassr+)r5
vancestorsaddjvarrrr+As

r+csLstdddjtjdffdd	fdd}d	|_|S)
zr
    Factory of decorators turning a function into a generic function
    dispatching on the given arguments.
    zNo dispatch args passedz(%s,)z, rwcs0|t|tr,tdtt||fdS)z5Make sure one passes the expected number of argumentszExpected %d arguments, got %d%sN)r~r2)Z	argumentsZwrongmsg)
dispatch_argsrrcheck[szdispatch_on.<locals>.checkcsttj}t|ks&tdifddfddfdd}fdd	}fd
d}tjdt|d
||d
S)z4Decorator turning a function into a generic functionzUnknown dispatch arguments %scsv|ddttD}xHD]@}x:t|||D]*\}}}t||r6||jkr6t||q6Wq$Wdd|DS)zU
            Get a list of sets of virtual ancestors for the given types
            cSsg|]}gqSrr)rF_rrrrGpszIdispatch_on.<locals>.gen_func_dec.<locals>.vancestors.<locals>.<listcomp>cSsg|]}t|qSr)rR)rFrarrrrGus)ranger~ziprmror+)typesZrastypes_tZtype_r)rrtypemaprrrks
z5dispatch_on.<locals>.gen_func_dec.<locals>.vancestorscs|g}xt||D]p\}}t|}|dkrFtd||fn4|dkrr|\}td||fijdd}n|j}|j|ddqW|S)zG
            Get a list of virtual MROs, one for each type
            rDzAmbiguous dispatch for %s: %srNrj)rr~RuntimeErrortyperr+)rZlistsrZvasZn_vasrr)rrrr	ancestorswsz4dispatch_on.<locals>.gen_func_dec.<locals>.ancestorscsfdd}|S)zU
            Decorator to register an implementation for the given types
            cs&t|jtjd|j|<|S)Nz in )rroperatorltr )r)rrrrrrsz@dispatch_on.<locals>.gen_func_dec.<locals>.register.<locals>.decr)rr)rr)rrregistersz3dispatch_on.<locals>.gen_func_dec.<locals>.registercs@|g}x.tj|D]}|jtdd|DqW|S)zI
            An utility to introspect the dispatch algorithm
            css|]}|jVqdS)N)r )rFr5rrrrhszKdispatch_on.<locals>.gen_func_dec.<locals>.dispatch_info.<locals>.<genexpr>)rtproductr+tuple)rZlstZanc)rrrr
dispatch_infos
z8dispatch_on.<locals>.gen_func_dec.<locals>.dispatch_infocstdd|D}y|}Wntk
r2YnX|||Stj|}t|x(|D] }j|}|dk	rZ|||SqZW||S)Ncss|]}t|VqdS)N)r)rFr7rrrrhszGdispatch_on.<locals>.gen_func_dec.<locals>._dispatch.<locals>.<genexpr>)rKeyErrorrtrrVr@)rrrBrrcombinationsr)rr4rrr	_dispatchs


z4dispatch_on.<locals>.gen_func_dec.<locals>._dispatchz#return _f_(%s, %%(shortsignature)s))Z_f_)rdefaultrrrrrx)rRrrrTrrrr/)r4Zargsetrrr)rrdispatch_str)rr4rrrgen_func_decas
z!dispatch_on.<locals>.gen_func_decdispatch_on)r1r,rner )rrr)rrrrrSsW
r)N)(r!Z
__future__rrer<rrrtcollections__version__versionrr	
namedtupler
rr>rr
rXrNobjectrryr
contextlibrImportErrorrrrZinitr~rZn_argsrrrr+rrrrr<module>!s\




&