Wcb'jdZddlZdZeeZedZeej 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 rcdSrrrrrr s$rc6dfd}|jdS)NcdSrr)asrfz_cell_factory..fsrr) __closure__)rrs @r _cell_factoryrs0 A == rc#KddS)Nr rrrr_grs GGGGGrc KdSrrrrr_crs rcKdWdSrrrrr_agr"s EEEEEErceZdZdZdS)_CcdSrrselfs r_mz_C._m(r rN)__name__ __module__ __qualname__rrrrrr'srrfromkeysrct|}t|||\}}}| ||||ur||d<||||fi|S)zBCreate a class object dynamically using the appropriate metaclass.N__orig_bases__) resolve_bases prepare_class)namebaseskwds exec_bodyresolved_basesmetanss r new_classr.Csc"5)N"4>ND"d " U""$  4nb 1 1D 1 11rc^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 ) list enumerate isinstancetypehasattrr0tuple TypeErrorlen)r( new_basesupdatedshiftibasenew_bases rr%r%MsU IG EU# ' '4 dD ! ! t.// ''.(E**AB B+3Iagagai ( S]Q& &EE 7  rc$|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. N metaclassr __prepare__)dictpopr4r3_calculate_metar5rA)r'r(r)r,r-s rr&r&bs |Dzdxx $ 5a>DDD$tU+t]## T  dE 2 2T 2 2  T>rc|}|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)r4 issubclassr7)r,r(winnerr= base_metas rrDrDs] F ? ?J fi ( (  i ( (F >? ? Mrc@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 .) Nc||_||_||_|p |j|_|du|_t t |dd|_dS)N__isabstractmethod__F)fgetfsetfdel__doc__ overwrite_docboolgetattrrL)rrMrNrOdocs r__init__zDynamicClassAttribute.__init__sP   *dll  D[$(7Mu)U$V!!!rc||jr|St|j td|j|S)Nzunreadable attribute)rLAttributeErrorrM)rinstance ownerclasss r__get__zDynamicClassAttribute.__get__sG  (((  " " YY  !78 8yy""rc^|j td|j||dS)Nzcan't set attribute)rNrW)rrXvalues r__set__zDynamicClassAttribute.__set__s/ 99  !67 7 (E""""rc\|j td|j|dS)Nzcan't delete attribute)rOrW)rrXs r __delete__z DynamicClassAttribute.__delete__s- 99  !9: : (rc|jr |jnd}t|||j|j|p |j}|j|_|Sr)rQrPr4rNrO)rrMfdocresults rgetterzDynamicClassAttribute.gettersT#111t|||tdD$))TYY8L M#11 rct||j||j|j}|j|_|Sr)r4rMrOrPrQ)rrNrbs rsetterzDynamicClassAttribute.setters7dDIItTYY E#11 rct||j|j||j}|j|_|Sr)r4rMrNrPrQ)rrOrbs rdeleterzDynamicClassAttribute.deleters7dDIItyy$ E#11 r)NNNNr) rr r!rPrUrZr]r_rcrergrrrrJrJs WWWW#######    rrJceZdZdZdZdZdZedZedZ edZ edZ eZ e Z e Ze Zd Zd ZeZd S) _GeneratorWrapperc||_|jtu|_t |dd|_t |dd|_dS)Nrr!)_GeneratorWrapper__wrapped __class__ GeneratorType_GeneratorWrapper__isgenrSrr!)rgens rrUz_GeneratorWrapper.__init__s@}} 5 Z6 #C>rc:|jj|Sr)rksend)rvals rrqz_GeneratorWrapper.sends~~""3''rc<|jj|g|RSr)rkthrow)rtprests rrtz_GeneratorWrapper.throws$#t~~##B.....rc8|jjSr)rkclosers rrxz_GeneratorWrapper.closes~~##%%rc.|jjSr)rkgi_coders rrzz_GeneratorWrapper.gi_codes~~%%%rc.|jjSr)rkgi_framers rr|z_GeneratorWrapper.gi_frames~~&&&rc.|jjSr)rk gi_runningrs rr~z_GeneratorWrapper.gi_runnings~~(((rc.|jjSr)rk gi_yieldfromrs rrz_GeneratorWrapper.gi_yieldfroms~~***rc0t|jSr)nextrkrs r__next__z_GeneratorWrapper.__next__sDNN##rc6|jr |jS|Sr)rnrkrs r__iter__z_GeneratorWrapper.__iter__s <<<>> ! rN)rr r!rUrqrtrxpropertyrzr|r~rcr_codecr_frame cr_runningcr_awaitrr __await__rrrriris??? (((///&&& &&& ''' ))) +++GHJH$$$IIIrricts 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__Ni )co_flagsrc|i|}|jtus,|jtur|jjdzr|St |j r%t |js t|S|S)Nr) rl CoroutineTypermrzrr3 Generator Coroutineri)argskwargscoro_collections_abcfuncs rwrappedzcoroutine..wrappedstT$V$$ NNm + + NNm + + 0E0E0M0MK t-77 8 84!1!;!;<<%T* * r) callabler7rl FunctionTyperSCodeTyperrreplace functoolsrwraps)rrcorrrs` @r coroutiners D>>>?? ,&&j$'11X====)) e  K d??BJJ e0CJDDMK__T Nrc(g|]}|dddks |S)Nr _r).0ns r r1s% 0 0 01Ra5C<<111 0r)rNN)rN)BrPsysrr4r LambdaTyperr__dict__MappingProxyTypeimplementationSimpleNamespacerCellTyperrmrrrxrAsyncGeneratorTyperr MethodTyper8BuiltinFunctionTypeappendBuiltinMethodTypeobjectrUWrapperDescriptorType__str__MethodWrapperTypestrjoinMethodDescriptorTyperBClassMethodDescriptorType ModuleTyper7exc __traceback__ TracebackTypetb_frame FrameTypeGetSetDescriptorType __globals__MemberDescriptorTyper.r%r&rDrJrirr1int GenericAlias UnionTypeEllipsis EllipsisTypeNoneTypeNotImplementedNotImplementedTypeglobals__all__rrrrs3 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