QfdZdZGddeZGddeZGddeZ dd lm Z m Z m Z m Z m Z mZmZmZGd d eZdZGddeZy#e$rdd lmZm Z d e_Y&wxYw)z3Abstract Base Classes (ABCs) according to PEP 3119.cd|_|S)aIA decorator indicating abstract methods. Requires that the metaclass is ABCMeta or derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract methods are overridden. The abstract methods can be called using any of the normal 'super' call mechanisms. abstractmethod() may be used to declare abstract methods for properties and descriptors. Usage: class C(metaclass=ABCMeta): @abstractmethod def my_abstract_method(self, arg1, arg2, argN): ... T)__isabstractmethod__)funcobjs */opt/alt/python312/lib64/python3.12/abc.pyabstractmethodrs"$(G Nc&eZdZdZdZfdZxZS)abstractclassmethodaA decorator indicating abstract classmethods. Deprecated, use 'classmethod' with 'abstractmethod' instead: class C(ABC): @classmethod @abstractmethod def my_abstract_classmethod(cls, ...): ... Tc2d|_t| |yNTrsuper__init__selfcallable __class__s rrzabstractclassmethod.__init__+(,% "r__name__ __module__ __qualname____doc__rr __classcell__rs@rr r   ##rr c&eZdZdZdZfdZxZS)abstractstaticmethodaA decorator indicating abstract staticmethods. Deprecated, use 'staticmethod' with 'abstractmethod' instead: class C(ABC): @staticmethod @abstractmethod def my_abstract_staticmethod(...): ... Tc2d|_t| |yr r rs rrzabstractstaticmethod.__init__?rrrrs@rrr0rrrceZdZdZdZy)abstractpropertyzA decorator indicating abstract properties. Deprecated, use 'property' with 'abstractmethod' instead: class C(ABC): @property @abstractmethod def my_abstract_property(self): ... TN)rrrrrrrr r Ds  rr )get_cache_token _abc_init _abc_register_abc_instancecheck_abc_subclasscheck _get_dump_reset_registry _reset_cachescHeZdZdZfdZdZdZdZd dZdZ dZ xZ S) ABCMetaaMetaclass for defining Abstract Base Classes (ABCs). Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. You can also register unrelated concrete classes (even built-in classes) and unrelated ABCs as 'virtual subclasses' -- these and their descendants will be considered subclasses of the registering ABC by the built-in issubclass() function, but the registering ABC won't show up in their MRO (Method Resolution Order) nor will method implementations defined by the registering ABC be callable (not even via super()). c Dt|||||fi|}t||SN)r __new__r$)mclsnamebases namespacekwargsclsrs rr/zABCMeta.__new__is('/$eYI&IC cNJrct||S)z{Register a virtual subclass of an ABC. Returns the subclass, to allow usage as a class decorator. )r%r5subclasss rregisterzABCMeta.registerns !h/ /rct||S)z'Override for isinstance(instance, cls).)r&)r5instances r__instancecheck__zABCMeta.__instancecheck__u%c84 4rct||S)z'Override for issubclass(subclass, cls).)r'r7s r__subclasscheck__zABCMeta.__subclasscheck__yr=rc"td|jd|j|tdt|t |\}}}}td||td||td||td||y ) z'Debug helper to print the ABC registry.zClass: .)filezInv. counter: z_abc_registry: z _abc_cache: z_abc_negative_cache: z_abc_negative_cache_version: N)printrrr#r()r5rB _abc_registry _abc_cache_abc_negative_cache_abc_negative_cache_versions r_dump_registryzABCMeta._dump_registry}s GCNN+1S-=-=,>?d K N?#4"56T B,5cN *]J(; ( OM#45D A L/d ; )*=)@A M 12M1PQ rct|y)z.Clear the registry (for debugging or testing).N)r)r5s r_abc_registry_clearzABCMeta._abc_registry_clears C rct|y)z,Clear the caches (for debugging or testing).N)r*rJs r_abc_caches_clearzABCMeta._abc_caches_clears # rr.) rrrrr/r9r<r?rHrKrMrrs@rr,r,\s+    0 5 5  ! rr,)r,r#abccvt|ds|St}|jD]@}t|ddD].}t||d}t|dds|j |0B|j j D]$\}}t|dds|j |&t||_|S)aRecalculate the set of abstract methods of an abstract class. If a class has had one of its abstract methods implemented after the class was created, the method will not be considered implemented until this function is called. Alternatively, if a new abstract method has been added to the class, it will only be considered an abstract method of the class after this function is called. This function should be called before any use is made of the class, usually in class decorators that add methods to the subject class. Returns cls, to allow usage as a class decorator. If cls is not an instance of ABCMeta, does nothing. __abstractmethods__r!NrF) hasattrset __bases__getattradd__dict__items frozensetrP)r5 abstractssclsr1values rupdate_abstractmethodsr\s 3- . I D"7rhs:*#+#(#<#(  x  ;6663$3l#LGA0GsAA.-A.