grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026B 3„Ö1÷¼ã@sºdZdd„ZGdd„deƒZGdd„deƒZGdd„deƒZy,d d lm Z m Z m Z m Z m Z mZmZmZWn*ek r’d d lmZm Z d e_YnXGd d„deƒZGdd„ded�ZdS)z3Abstract Base Classes (ABCs) according to PEP 3119.cCs d|_|S)aÞA 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. Usage: class C(metaclass=ABCMeta): @abstractmethod def my_abstract_method(self, ...): ... T)Ú__isabstractmethod__)Úfuncobj©rú(/opt/alt/python37/lib64/python3.7/abc.pyÚabstractmethodsrcs$eZdZdZdZ‡fdd„Z‡ZS)ÚabstractclassmethodaJA decorator indicating abstract classmethods. Similar to abstractmethod. Usage: class C(metaclass=ABCMeta): @abstractclassmethod def my_abstract_classmethod(cls, ...): ... 'abstractclassmethod' is deprecated. Use 'classmethod' with 'abstractmethod' instead. Tcsd|_tƒ |¡dS)NT)rÚsuperÚ__init__)ÚselfÚcallable)Ú __class__rrr-szabstractclassmethod.__init__)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrÚ __classcell__rr)r rrsrcs$eZdZdZdZ‡fdd„Z‡ZS)ÚabstractstaticmethodaJA decorator indicating abstract staticmethods. Similar to abstractmethod. Usage: class C(metaclass=ABCMeta): @abstractstaticmethod def my_abstract_staticmethod(...): ... 'abstractstaticmethod' is deprecated. Use 'staticmethod' with 'abstractmethod' instead. Tcsd|_tƒ |¡dS)NT)rrr)r r )r rrrDszabstractstaticmethod.__init__)r r rrrrrrr)r rr2src@seZdZdZdZdS)ÚabstractpropertyafA decorator indicating abstract properties. 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 properties are overridden. The abstract properties can be called using any of the normal 'super' call mechanisms. Usage: class C(metaclass=ABCMeta): @abstractproperty def my_abstract_property(self): ... This defines a read-only property; you can also define a read-write abstract property using the 'long' form of property declaration: class C(metaclass=ABCMeta): def getx(self): ... def setx(self, value): ... x = abstractproperty(getx, setx) 'abstractproperty' is deprecated. Use 'property' with 'abstractmethod' instead. TN)r r rrrrrrrrIsré)Úget_cache_tokenÚ _abc_initÚ _abc_registerÚ_abc_instancecheckÚ_abc_subclasscheckÚ _get_dumpÚ_reset_registryÚ _reset_caches)ÚABCMetarÚabccsReZdZdZ‡fdd„Zdd„Zdd„Zdd „Zdd d „Zd d„Z dd„Z ‡Z S)ra�Metaclass 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 s"tƒj||||f|Ž}t|ƒ|S)N)rÚ__new__r)ÚmclsÚnameÚbasesÚ namespaceÚkwargsÚcls)r rrr}szABCMeta.__new__cCs t||ƒS)z{Register a virtual subclass of an ABC. Returns the subclass, to allow usage as a class decorator. )r)r$ÚsubclassrrrÚregister‚szABCMeta.registercCs t||ƒS)z'Override for isinstance(instance, cls).)r)r$ÚinstancerrrÚ__instancecheck__‰szABCMeta.__instancecheck__cCs t||ƒS)z'Override for issubclass(subclass, cls).)r)r$r%rrrÚ__subclasscheck__�szABCMeta.__subclasscheck__NcCsŒtd|j›d|j›�|d�tdtƒ›�|d�t|ƒ\}}}}td|›�|d�td|›�|d�td|›�|d�td|›�|d�d S) 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)Úprintr rrr)r$r+Ú _abc_registryÚ _abc_cacheÚ_abc_negative_cacheÚ_abc_negative_cache_versionrrrÚ_dump_registry‘s zABCMeta._dump_registrycCs t|ƒdS)z.Clear the registry (for debugging or testing).N)r)r$rrrÚ_abc_registry_clear�szABCMeta._abc_registry_clearcCs t|ƒdS)z,Clear the caches (for debugging or testing).N)r)r$rrrÚ_abc_caches_clear¡szABCMeta._abc_caches_clear)N) r r rrrr&r(r)r1r2r3rrr)r rrps   rc@seZdZdZdZdS)ÚABCzVHelper class that provides a standard way to create an ABC using inheritance. rN)r r rrÚ __slots__rrrrr4¦sr4)Ú metaclassN)rrÚ classmethodrÚ staticmethodrÚpropertyrÚ_abcrrrrrrrrÚ ImportErrorZ_py_abcrr Útyper4rrrrÚs, 6