Ygܖh NddlmZddlZddlZddlZddlZddlZddlZddlm Z dZ GddZ dZ dd Z Gd d ZGd d ZGddeZGddZGddeZejdejZdZdZdZddZdZdS))parseN)importlib_metadata_getc,||_|j|_|SN) __wrapped____name__) decoratedfns /srv/buildsys-work-dir/castor/build_node/builder-2/WGSG1/unpkd_srcs/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/mako/util.pyupdate_wrapperr sII c eZdZdZdZdZdS) PluginLoaderc"||_i|_dSr)groupimpls)selfrs r __init__zPluginLoader.__init__s  rc||jvr|j|St|jD]2}|j|kr%|j|j|<|cS3ddlm}|d|jd|)Nr) exceptionszCan't load plugin  )rrrnameloadmakorRuntimeException)rrimplrs r rzPluginLoader.loads 4:  #4:d#%% %*4:66 # #DyD  #'9 4 yy{{"""! $#####))))-TT :   rc*fd}||j|<dS)Nct}dddD]}t||}t|S)N.r) __import__splitgetattr)modtoken modulepathobjnames r rz#PluginLoader.register..load,sWZ((C#))#..qrr2 * *c5))3(( (r)r)rrr&r'rs `` r registerzPluginLoader.register+s6 ) ) ) ) ) )   4rN)r __module__ __qualname__rrr(rr rrsA         rrcd}tj|sK |dz }tj|dn#|dkrYnxYwtj|IdSdS)z,create and/or verify a filesystem directory.rriN)ospathexistsmakedirs)dir_triess r verify_directoryr45s EgnnT""  QJE Ke $ $ $ $ qyyy gnnT""s > A cL||St|ttfs|gS|Sr) isinstancelisttuple)xdefaults r to_listr;Cs.y a$ ' 's rc eZdZdZddZdZdS)memoized_propertyz2A read-only @property that is only evaluated once.NcH||_|p|j|_|j|_dSrfget__doc__r rr@docs r rzmemoized_property.__init__P$ *dl   rcV||S||x|j|j<}|Sr)r@__dict__r )robjclsresults r __get__zmemoized_property.__get__Us. ;K/3yy~~= T]#f rrr r)r*rArrJr+rr r=r=Ls=<<&&&& rr=c eZdZdZddZdZdS)memoized_instancemethodzDecorate a method memoize its return value. Best applied to no-arg methods: memoization is not sensitive to argument values, and will always return the same value even when called with different arguments. NcH||_|p|j|_|j|_dSrr?rBs r rz memoized_instancemethod.__init__frDrcNSfd}j|_j|_|S)Ncjg|Ri|fd}j|_j|_|jj<S)NcSrr+)akwrIs r memoz>memoized_instancemethod.__get__..oneshot..memors r)r@r rArF)argsrSrTrIrGrs @r oneshotz0memoized_instancemethod.__get__..oneshotoseTYs0T000R00F     !MDMz#LRUCache.values..s333A333r)rvaluesrks r rzLRUCache.valuess"33T!2!23333rc(||vr||S|||<|Srr+r{s r setdefaultzLRUCache.setdefaults# $;;9 S  rct||}|3|||}t|||n||_|dSr)rgetr __setitem__rw _manage_size)rrvrwrs r rzLRUCache.__setitem__sgxxc"" <::c5))D   T3 - - - -DJ rczt||j|j|jzzkrtt|t jdd}||jdD]} ||j= #t$rYnwxYwt||j|j|jzzkdSdS)NrzT)rvreverse) lenrrsortedrroperator attrgetterrvKeyError)rbytimers r rzLRUCache._manage_sizes$ii$-$-$.*HHHH D!!' 44F t}/  TXEE$ii$-$-$.*HHHHHHHHs7B B BN)r) r r)r*rArrrrrrrr+rr rrrrs$$$$$$$$#### 444      rrrz([ \t\f]* \# .* coding[=:][ \t]*([-\w.]+)cp|}|d |}|tj}|r!|t tjd}t| dd}|s~ t| dd|}t| dd}n#ttf$rYnwxYw|r)|rtd ||dS|r*| d||S ||dS#||wxYw)aDeduce the encoding of a Python source file (binary mode) from magic comment. It does this in the same way as the `Python interpreter`__ .. __: http://docs.python.org/ref/encodings.html The ``fp`` argument should be a seekable file object in binary mode. rNasciiignorez\python refuses to compile code with both a UTF8 byte-order-mark and a magic encoding commentutf_8r)tellseekreadline startswithcodecsBOM_UTF8r_PYTHON_MAGIC_COMMENT_rematchdecoder ImportError SyntaxErrorr)fpposline1has_bommline2s r parse_encodingrs ''))CGGAJJJ" ""6?33  2#fo..001E $ * *5<<+J+J K K  ell7H55666 ,22LL(33 -         !D   771::     s7BF2#DAFD,)F+D,,FFF5ct}|ddfd|DzdzS)z{repr() a dictionary with the keys in order. Used by the lexer unit test to compare parse trees based on strings. {z, c32K|]}|d|VdS)z: Nr+)rkds r z#sorted_dict_repr.."s2>>Aqqq!A$$/>>>>>>r})r7keyssortrn)rrs` r sorted_dict_reprrsV >>DIIKKK >>>>>>>>> > DDrc~ t|drdSd|_tddd|j}t||_|jjD]'}|jdkr||_|jdkr||_(t|j d|_ t|j d |_ t|j d |_ t|j d j d|_t|j d j dj|_t|j d j|_t|j d jj|_t|j d jjj|_t|j d jjj|_t|j d jjjj|_t|j d jj|_t|j d jjj|_t|j d jjjj|_t|j d jjjjj|_t|j djj|_t|j djjj|_t|j djjjj|_ t|j djj|_!t|j djj"dj|_#t|j djjj|_$t|j djjjj|_%t|j djjjj&j|_'t|j djjjj|_(t|j djj|_!t|j djj"dj|_#t|j djj)d|_*t|j djj)d |_+t|j djjj)d|_,t|j djjj)d |_-t|j djj)d|_.t|j djj)d |_/t|j djj)d |_0t|j djj)d |_1t|j djj)d|_2t|j djj)d |_3dS)zdAttempt to restore the required classes to the _ast module if it appears to be missing them ASTNiadef foo(): pass class Bar: pass if False: pass baz = 'mako' 1 + 2 - 3 * 4 / 5 6 // 7 % 8 << 9 >> 10 11 & 12 ^ 13 | 14 15 and 16 or 17 -baz + (not +18) - ~17 baz and 'foo' or 'bar' (mako is baz == baz) is not baz != mako mako > baz < mako >= baz <= mako mako in baz not in makoz execr$rrr- )4hasattr PyCF_ONLY_ASTcompiletypeModule__mro__r r$rbody FunctionDefClassDefIftargetsNamectxStorerwStropSubleftAddrightDivMultRShiftLShiftModFloorDivBitOrBitXorBitAndOrrAndInvertNotoperandUAddUSubopsIsNotNotEqIsEqGtLtGtELtEInNotIn)_astrrHs r restore__astr%stUD   #  A&q''DK{" <5 DHH \U " "DHAF1IDOODM16!9ooDGQVAY&q)**DIafQi'*.//DJAF1IO$$DHAF1IO&''DHAF1IO(+,,DHAF1IO),--DHQVAY_*/233DIqvay)**DKqvay+.//DKAF1IO(-011DH-27:;;DMafQio())DJqvay+.//DKqvay+0344DK16!9?%&&DGAF1IO*1-011DHqvay,/00DKAF1IO(.122DHQVAY_)/7:;;DIQVAY_).122DI16!9?%&&DGAF1IO*1-011DHafRj&*1-..DJafRj&*1-..DJ16":#(,Q/00DG16":#(,Q/00DG16":#'*++DG16":#'*++DGAF2J$(+,,DHAF2J$(+,,DH16":#'*++DGafRj&*1-..DJJJrrbc~t||5}|cdddS#1swxYwYdSr)openread)r/moders r read_filervs~ dD  Rwwyys 266ct|d} t|}|}|r||}||S#|wxYw)Nr)rrrrclose)r/rrerds r read_python_filer{sm dD  B!"%%wwyy  );;x((D   s ;A""A8r)r)astrrrbrr.rerxcompatrr rr4r;r=rMrrXr^rrrVERBOSErrrrrrr+rr rs    ******         <                   F     $   ........2;;;;;t;;;~&2:/ ...bEEEN/N/N/b     r