U e5d-@s(ddlmZddZGdddeZdS))WeakSetcCstjSN)ABCMeta_abc_invalidation_counterrr/usr/lib64/python3.8/_py_abc.pyget_cache_tokensrcsReZdZdZfddZddZdddZd d Zd d Zd dZ ddZ Z S)rrc  stj||||f|}dd|D}|D]:}t|dtD]&}t||d}t|ddr>||q>q,t||_t|_ t|_ t|_ t j |_|S)NcSs h|]\}}t|ddr|qS)__isabstractmethod__F)getattr).0namevaluerrr &s z"ABCMeta.__new__..__abstractmethods__r F)super__new__itemsr setadd frozensetrr _abc_registry _abc_cache_abc_negative_cacherr_abc_negative_cache_version) mclsr bases namespacekwargsclsZ abstractsbaser  __class__rrr#s   zABCMeta.__new__cCsPt|tstdt||r |St||r2td|j|tjd7_|S)NzCan only register classesz'Refusing to create an inheritance cycle) isinstancetype TypeError issubclass RuntimeErrorrrrr)rsubclassrrrregister6s    zABCMeta.registerNcCs|td|jd|j|dtdt|d|jD]@}|dr6t||}t|tr`t |}t|d||dq6dS)NzClass: .)filezInv. counter: Z_abc_z: ) print __module__ __qualname__r__dict__ startswithr r#rr)rr+r r rrr_dump_registryHs    zABCMeta._dump_registrycCs|jdSr)rclearrrrr_abc_registry_clearSszABCMeta._abc_registry_clearcCs|j|jdSr)rr2rr3rrr_abc_caches_clearWs zABCMeta._abc_caches_clearcsb|j}|jkrdSt|}||krHjtjkr>|jkr>dS|Stfdd||fDS)NTFc3s|]}|VqdSr)__subclasscheck__)r cr3rr jsz,ABCMeta.__instancecheck__..) r!rr$rrrrr6any)rinstancer(Zsubtyperr3r__instancecheck__\s  zABCMeta.__instancecheck__cCst|tstd||jkr dS|jtjkr>t|_tj|_n||jkrLdS| |}|t k r|rp|j |n |j ||S|t |ddkr|j |dS|j D] }t||r|j |dSq|D] }t||r|j |dSq|j |dS)Nz"issubclass() arg 1 must be a classTF__mro__r)r#r$r%rrrrrr__subclasshook__NotImplementedrr rr&__subclasses__)rr(okZrclsZsclsrrrr6ls8               zABCMeta.__subclasscheck__)N) __name__r-r.rrr)r1r4r5r;r6 __classcell__rrr rrs  rN)Z _weakrefsetrrr$rrrrrs