U ,a%@sdZddlZddZeeZeddZeejZeejZ eej Z ddZ ee Z d d ZeeZd d ZeZeeZed dZeZeeZGdddZeejZeeZegjZeejZeejZ ee!j"Z#ee$jdZ%eeZ&ze'Wn:e'k rBe(dZ)ee)Z*ee)j+Z,dZ)[)YnXeejZ-eej.Z/[[[[[[d$ddZ0ddZ1d%ddZ2ddZ3GdddZ4GdddZ5d d!Z6d"d#e7DZ8dS)&zO Define names for built-in types that aren't directly accessible as a builtin. NcCsdSNrrr*/opt/alt/python38/lib64/python3.8/types.py_f rcCsdSrrrrrr rrcsdfdd}|jdS)NcsdSrrrarrfsz_cell_factory..fr) __closure__)r rr r _cell_factorys r ccs dVdS)Nrrrrrr_gsrcsdSrrrrrr_crrcCs dVdSrrrrrr_ag"src@seZdZddZdS)_CcCsdSrrselfrrr_m(rz_C._mN)__name__ __module__ __qualname__rrrrrr'srfromkeysrcCsJt|}t|||\}}}|dk r*||||k r:||d<||||f|S)zBCreate a class object dynamically using the appropriate metaclass.N__orig_bases__) resolve_bases prepare_class)namebaseskwds exec_bodyresolved_basesmetansrrr new_classEsr$cCst|}d}d}t|D]j\}}t|tr,qt|ds8q||}d}t|tsZtdq||||||d<|t|d7}q|s|St|S)z8Resolve MRO entries dynamically as specified by PEP 560.Fr__mro_entries__Tz#__mro_entries__ must return a tupler) list enumerate isinstancetypehasattrr%tuple TypeErrorlen)r new_basesupdatedshiftibasenew_baserrrrOs"     rcCs~|dkri}nt|}d|kr*|d}n|r|}|D]0}t|}t||r qt||r0|}qtdq|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) issubclassr,)r"rwinnerr2 base_metarrrr8s   r8c@sLeZdZdZdddZdddZddZd d Zd d Zd dZ ddZ 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 (see Enum for an example). NcCs>||_||_||_|p|j|_|dk|_tt|dd|_dS)N__isabstractmethod__F)fgetfsetfdel__doc__ overwrite_docboolgetattrr=)rr>r?r@docrrr__init__s   zDynamicClassAttribute.__init__cCs6|dkr|jr|Stn|jdkr,td||S)Nzunreadable attribute)r=AttributeErrorr>)rinstance ownerclassrrr__get__s zDynamicClassAttribute.__get__cCs"|jdkrtd|||dS)Nzcan't set attribute)r?rG)rrHvaluerrr__set__s zDynamicClassAttribute.__set__cCs |jdkrtd||dS)Nzcan't delete attribute)r@rG)rrHrrr __delete__s z DynamicClassAttribute.__delete__cCs8|jr |jnd}t|||j|j|p(|j}|j|_|Sr)rBrAr)r?r@)rr>fdocresultrrrgetterszDynamicClassAttribute.gettercCs$t||j||j|j}|j|_|Sr)r)r>r@rArB)rr?rOrrrsetterszDynamicClassAttribute.settercCs$t||j|j||j}|j|_|Sr)r)r>r?rArB)rr@rOrrrdeleterszDynamicClassAttribute.deleter)NNNN)N) rrrrArFrJrLrMrPrQrRrrrrr<s r<c@seZdZddZddZddZddZed d Zed d Z ed dZ eddZ eZ e Z e Ze ZddZddZeZdS)_GeneratorWrappercCs2||_|jtk|_t|dd|_t|dd|_dS)Nrr)_GeneratorWrapper__wrapped __class__ GeneratorType_GeneratorWrapper__isgenrDrr)rgenrrrrFs z_GeneratorWrapper.__init__cCs |j|Sr)rTsend)rvalrrrrYsz_GeneratorWrapper.sendcGs|jj|f|Sr)rTthrow)rtprestrrrr[sz_GeneratorWrapper.throwcCs |jSr)rTcloserrrrr^sz_GeneratorWrapper.closecCs|jjSr)rTgi_coderrrrr_sz_GeneratorWrapper.gi_codecCs|jjSr)rTgi_framerrrrr`sz_GeneratorWrapper.gi_framecCs|jjSr)rT gi_runningrrrrrasz_GeneratorWrapper.gi_runningcCs|jjSr)rT gi_yieldfromrrrrrbsz_GeneratorWrapper.gi_yieldfromcCs t|jSr)nextrTrrrr__next__sz_GeneratorWrapper.__next__cCs|jr |jS|Sr)rWrTrrrr__iter__sz_GeneratorWrapper.__iter__N)rrrrFrYr[r^propertyr_r`rarbcr_codecr_frame cr_runningcr_awaitrdre __await__rrrrrSs&    rScststdjtkrftddjtkrfjj}|d@r@S|d@rfj}|j|jdBd_Sddl }ddl | fd d }|S) z2Convert regular generator function to a coroutine.z$types.coroutine() expects a callable__code__Ni )co_flagsrcsR||}|jtks*|jtkr.|jjd@r.|St|jrNt|jsNt|S|S)Nrn) rU CoroutineTyperVr_ror( Generator CoroutinerS)argskwargscoro_collections_abcfuncrrwrappeds     zcoroutine..wrapped) callabler,rU FunctionTyperDCodeTyperlroreplace functoolsrwwraps)rxrocor~ryrrvr coroutines" rcCs g|]}|dddkr|qS)Nr_r).0nrrr (sr)rNN)rN)9rAsysrr)r{ LambdaTyperlr|__dict__MappingProxyTypeimplementationSimpleNamespacer CellTyperrVrrpr^rAsyncGeneratorTyperr MethodTyper-BuiltinFunctionTypeappendBuiltinMethodTypeobjectrFWrapperDescriptorType__str__MethodWrapperTypestrjoinMethodDescriptorTyper6ClassMethodDescriptorType ModuleTyper,exc_infotb TracebackTypetb_frame FrameTypeGetSetDescriptorType __globals__MemberDescriptorTyper$rrr8r<rSrglobals__all__rrrrs\                  :%4