Wcb'csjdZddlZdZeeZedZeej ZeejZ eejZ dZ ee Z dZeeZdZeZeeZej%dZeZeeZGd d Zeej,ZeeZegj4Zeej:Zeej>Z ee!jDZ#ee$jd Z%eeZ& e'#e'$r:Z(ee(jRZ*ee(jRjVZ,YdZ([(ndZ([(wwxYweej Z-eej\Z/[[[[[[[ dd Z0dZ1ddZ2dZ3GddZ4GddZ5dZ6ee7e8Z9ee8e!zZ:ee;Z<edZ=ee>Z?de@DZAdS)zO Define names for built-in types that aren't directly accessible as a builtin. NcdSNr/usr/lib64/python3.12/types.py_fr rcrrrrrrr s$rcs6dfd}|jdS)NcsdSrr)asrfz_cell_factory..fsrr)Z __closure__)r r s @r _cell_factoryr s0 A == rc#sKddS)Nr rrrr_gr s GGGGGrcs KdSrrrrr_crs rcsKdWdSrrrrr_agr"s EEEEEErcseZdZdZdS)_Ccrrrself r_mz_C._m(rrN)__name__ __module__ __qualname__rrrrrr'srrZfromkeysrcst|}t|||\}}}| ||||ur||d<||||fi|S)zBCreate a class object dynamically using the appropriate metaclass.NZ__orig_bases__) resolve_bases prepare_class)namebaseskwdsZ exec_bodyZresolved_basesmetans r new_classr Csc"5)N"4>ND"d " U""$  4nb 1 1D 1 11rcs^t|}d}d}t|D]}\}}t|trt |ds)|j |}d}t|t s td||||z||zdz|t|dz z }|s|St |S)z8Resolve MRO entries dynamically as specified by PEP 560.Fr__mro_entries__Tz#__mro_entries__ must return a tupler ) listZ enumerate isinstancetypehasattrr!Ztuple TypeErrorlen)rZ new_basesZupdatedZshiftZibaseZnew_baserrrrMsU IG EU# ' '4 dD ! ! t.// ''.(E**AB B+3Iagagai ( S]Q& &EE 7  rcs$|i}n t|}d|vr|jd}n|rt|d}nt}t|trt ||}t |dr|j ||fi|}ni}|||fS)azCall the __prepare__ method of the appropriate metaclass. Returns (metaclass, namespace, kwds) as a 3-tuple *metaclass* is the appropriate metaclass *namespace* is the prepared class namespace *kwds* is an updated copy of the passed in kwds argument with any 'metaclass' entry removed. If no kwds argument is passed in, this will be an empty dict. NZ metaclassr __prepare__)dictZpopr$r#_calculate_metar%r))rrrrr rrrbs |Dzdxx $ 5a>DDD$tU+t]## T  dE 2 2T 2 2  T>rcs|}|D];}t|}t||rt||r|}0td|S)z%Calculate the most derived metaclass.zxmetaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases)r$Z issubclassr&)rrZwinnerr(Z base_metar,rr+r+s] F ? ?J fi ( (  i ( (F >? ? Mrcs@eZdZdZd dZd dZdZdZdZdZ d Z dS) DynamicClassAttributeaRoute attribute access on a class to __getattr__. This is a descriptor, used to define attributes that act differently when accessed through an instance and through a class. Instance access remains normal, but access to an attribute through a class will be routed to the class's __getattr__ method; this is done by raising AttributeError. This allows one to have properties active on an instance, and have virtual attributes on the class with the same name. (Enum used this between Python versions 3.4 - 3.9 .) Subclass from this to use a different method of accessing virtual attributes and still be treated properly by the inspect module. (Enum uses this since Python 3.10 .) Ncs||_||_||_|p |j|_|du|_t t |dd|_dS)N__isabstractmethod__F)fgetfsetfdel__doc__ overwrite_docZboolgetattrr.)rr/r0r1Zdocr,r__init__zDynamicClassAttribute.__init__sP   *dll  D[$(7Mu)U$V!!!rcs||jr|St|j td|j|S)Nzunreadable attribute)r.AttributeErrorr/)rinstanceZ ownerclass r__get__zDynamicClassAttribute.__get__sG  (((  " " YY  !78 8yy""rcs^|j td|j||dS)Nzcan't set attribute)r0r6)rr7Zvaluer8r__set__zDynamicClassAttribute.__set__s/ 99  !67 7 (E""""rcs\|j td|j|dS)Nzcan't delete attribute)r1r6)rr7 r __delete__z DynamicClassAttribute.__delete__s- 99  !9: : (rcs|jr |jnd}t|||j|j|p |j}|j|_|Sr)r3r2r$r0r1)rr/Zfdocresults rgetterzDynamicClassAttribute.gettersT#111t|||tdD$))TYY8L M#11 rcst||j||j|j}|j|_|Sr)r$r/r1r2r3)rr0r=r8rsetterzDynamicClassAttribute.setters7dDIItTYY E#11 rcst||j|j||j}|j|_|Sr)r$r/r0r2r3)rr1r=r8rdeleterzDynamicClassAttribute.deleters7dDIItyy$ E#11 r)NNNNr) rrrr2r5r9r:r<r>r?r@rrrr-r-s WWWW#######    rr-cseZdZdZdZdZdZedZedZ edZ edZ eZ e Z e Ze Zd Zd ZeZd S) _GeneratorWrappercs||_|jtu|_t |dd|_t |dd|_dS)Nrr)_GeneratorWrapper__wrapped __class__ GeneratorType_GeneratorWrapper__isgenr4rr)rZgenr;rr5z_GeneratorWrapper.__init__s@}} 5 Z6 #C>rcs:|jj|Sr)rBsend)rZvalr;rrFz_GeneratorWrapper.sends~~""3''rcs<|jj|g|RSr)rBthrow)rZtpZrestr8rrGz_GeneratorWrapper.throws$#t~~##B.....rcs8|jjSr)rBcloserrrrHz_GeneratorWrapper.closes~~##%%rc.|jjSr)rBgi_coderrrrJz_GeneratorWrapper.gi_codes~~%%%rcrIr)rBgi_framerrrrKz_GeneratorWrapper.gi_frames~~&&&rcrIr)rB gi_runningrrrrLz_GeneratorWrapper.gi_runnings~~(((rcrIr)rB gi_yieldfromrrrrMz_GeneratorWrapper.gi_yieldfroms~~***rcs0t|jSr)ZnextrBrrr__next__z_GeneratorWrapper.__next__sDNN##rcs6|jr |jS|Sr)rErBrrr__iter__z_GeneratorWrapper.__iter__s <<<>> ! rN)rrrr5rFrGrHZpropertyrJrKrLrMZcr_codeZcr_frameZ cr_runningZcr_awaitrNrOZ __await__rrrrArAs??? (((///&&& &&& ''' ))) +++GHJH$$$IIIrrAcsts tdjturut ddjt urUj j}|dzrS|dzr3j }|j|jdz_Sddl }ddl |jfd }|S) z2Convert regular generator function to a coroutine.z$types.coroutine() expects a callable__code__Nii )co_flagsrcs|i|}|jtus,|jtur|jjdzr|St |j r%t |js t|S|S)NrQ) rC CoroutineTyperDrJrRr#Z GeneratorZ CoroutinerA)ZargsZkwargsZcoro_collections_abcfuncs rwrappedzcoroutine..wrappedstT$V$$ NNm + + NNm + + 0E0E0M0MK t-77 8 84!1!;!;<<%T* * r) Zcallabler&rC FunctionTyper4CodeTyperPrRZreplace functoolsrTZwraps)rUrRZcorYrVrTs` @r coroutinerZs D>>>?? ,&&j$'11X====)) e  K d??BJJ e0CJDDMK__T Nrcs(g|]}|dddks |S)Nr Z_r)Z.0Znr;r r[1s% 0 0 01Ra5C<<111 0r)rNN)rN)Br2Zsysrr$rWZ LambdaTyperPrXZ__dict__ZMappingProxyTypeZimplementationZSimpleNamespacer ZCellTyper rDrrSrHrZAsyncGeneratorTyperrZ MethodTyper'ZBuiltinFunctionTypeZappendZBuiltinMethodTypeZobjectr5ZWrapperDescriptorTypeZ__str__ZMethodWrapperTypeZstrZjoinZMethodDescriptorTyper*ZClassMethodDescriptorTypeZ ModuleTyper&ZexcZ __traceback__Z TracebackTypeZtb_frameZ FrameTypeZGetSetDescriptorTypeZ __globals__ZMemberDescriptorTyper rrr+r-rArZr"ZintZ GenericAliasZ UnionTypeZEllipsisZ EllipsisTypeZNoneTypeZNotImplementedZNotImplementedTypeZglobalsZ__all__rrrr\s3 tBx T,,  4 4 &$s))* 4     RRT RTR      ceT#Y T""$''] d3iDOV__-D))*tCHH~ Dz!:; T#Y 1 O111D**+MS&&//0IIIIII1 tL112tL445RRm2222*@"<<<<<<<~#######J111ftDI DsO tH~ 4:T.) 0 0ggi 0 0sEF0FF