B /g^*c@s(ddlmZddZGdddeZdS))WeakSetcCstjSN)ABCMeta_abc_invalidation_counterrr/usr/lib64/python3.7/_py_abc.pyget_cache_tokensrcsReZdZdZfddZddZdddZd d Zd d Zd dZ ddZ Z S)rrc  stj||||f|}dd|D}xF|D]>}x8t|dtD]&}t||d}t|ddrB||qBWq.Wt||_t|_ t|_ t|_ t j |_|S)NcSs h|]\}}t|ddr|qS)__isabstractmethod__F)getattr).0namevaluerrrz &sz"ABCMeta.__new__..__abstractmethods__rF)Zsuper__new__Zitemsr setaddZ frozensetr r _abc_registry _abc_cache_abc_negative_cacherr_abc_negative_cache_version) Zmclsr ZbasesZ namespaceZkwargsclsZ abstractsZbaser  __class__rrr#s     zABCMeta.__new__cCsPt|tstdt||r |St||r2td|j|tjd7_|S)NzCan only register classesz'Refusing to create an inheritance cyclei) isinstancetype TypeError issubclassZ RuntimeErrorrrrr)rsubclassrrrregister6s    zABCMeta.registerNcCstd|jd|j|dtdt|dxJ|jD]@}|dr8t||}t|trbt |}t|d||dq8WdS)NzClass: Z.)filezInv. counter: Z_abc_z: ) Zprint __module__ __qualname__rZ__dict__Z startswithr rrr)rrr r rrr_dump_registryHs    zABCMeta._dump_registrycCs|jdSr)rclearrrrr_abc_registry_clearSszABCMeta._abc_registry_clearcCs|j|jdSr)rr"rr#rrr_abc_caches_clearWs zABCMeta._abc_caches_clearcsb|j}|jkrdSt|}||krHjtjkr>|jkr>dS|Stfdd||fDS)NTFc3s|]}|VqdSr)__subclasscheck__)r Zcr#rrz jsz,ABCMeta.__instancecheck__..) rrrrrrrr&Zany)rZinstancerZsubtyperr#r__instancecheck__\s   zABCMeta.__instancecheck__cCst|tstd||jkr dS|jtjkr>t|_tj|_n||jkrLdS| |}|t k r|rp|j |n |j ||S|t |ddkr|j |dSx(|j D]}t||r|j |dSqWx*|D]}t||r|j |dSqW|j |dS)Nz"issubclass() arg 1 must be a classTFZ__mro__r)rrrrrrrrrZ__subclasshook__ZNotImplementedrr rrZ__subclasses__)rrZokZrclsZsclsrrrr&ls8              zABCMeta.__subclasscheck__r) Z__name__rr rrrr!r$r%r'r&Z __classcell__rrrrrs  rN)Z _weakrefsetrrrrrrrrZs