HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyc
�
1�3\c@@s`dZddlmZmZddlZddlmZddlmZddlZddl	Z	ddl
mZddlmZd	Z
d
ZdZe�Zd�Zd
�Zdefd��YZdefd��YZeZyddlmZWnek
rnXe�Zdefd��YZeZyddlmZWnek
rSnXgZyddlmZWnek
r�nXdefd��YZdeeefd��YZeddd�Zdefd��YZ d e fd!��YZ!dddd"�Z#ddd#�Z$d$�Z%dd%l&m'Z'dd&l&m(Z(dd'l
m)Z)dd(l
m*Z*dS()s Interface object implementation
i(tabsolute_importt
generatorsN(t
MethodType(tFunctionTypei(tInvalid(troiit__interface_tagged_values__cC@sGtjd�j}|jti�}|jdg�}|j|�tS(Nit
invariants(tsyst	_getframetf_localst
setdefaulttTAGGED_DATAtappendt_decorator_non_return(tcallR
ttagsR((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt	invariant"s

cC@s2tjd�j}|jti�}|||<tS(s;Attaches a tagged value to an interface at definition time.i(RR	R
RRR(tkeytvalueR
t
tagged_values((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyttaggedValue*s
tElementcB@sMeZdd�Zd�Zd�Zd�Zdd�Zd�Zd�Z	RS(	tcC@sJ|r+|jd�dkr+|}d}n||_||_i|_dS(s*Create an 'attribute' description
        t iN(tfindtNonet__name__t__doc__t_Element__tagged_values(tselfRR((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt__init__9s			cC@s|jS(s! Returns the name of the object. (R(R((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pytgetNameDscC@s|jS(s+ Returns the documentation for the object. (R(R((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pytgetDocHscC@s|j|S(s* Returns the value associated with 'tag'. (R(Rttag((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pytgetTaggedValueLscC@s|jj||�S(s* Returns the value associated with 'tag'. (Rtget(RR"tdefault((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pytqueryTaggedValuePscC@s
|jj�S(s Returns a list of all tags. (Rtkeys(R((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pytgetTaggedValueTagsTscC@s||j|<dS(s  Associates 'value' with 'key'. N(R(RR"R((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pytsetTaggedValueXsN(
Rt
__module__RR R!R#RR&R(R)(((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyR2s				tSpecificationBasePycB@s)eZd�Zd�Zd�ZeZRS(cC@st|�}||jkS(s2Is the interface implemented by an object
        (t
providedByt_implied(Rtobtspec((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyR,^scC@st|�}||jkS(s�Test whether the specification is implemented by a class or factory.

        Raise TypeError if argument is neither a class nor a callable.
        (t
implementedByR-(RtclsR/((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyR0dscC@s
||jkS(sCIs the interface the same as or extend the given interface
        (R-(Rt	interface((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pytisOrExtendsls(RR*R,R0R3t__call__(((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyR+\s			(tSpecificationBasetInterfaceBasePycB@s#eZdZed�Zd�ZRS(s:Base class that wants to be replaced with a C base :)
    cC@s�t|dd�}|dk	r@|j|�}|dk	r@|Sn|j|�}|dk	r_|S|tk	ro|Std||��dS(s)Adapt an object to the interface
        t__conform__sCould not adaptN(tgetattrRt
_call_conformt	__adapt__t_markert	TypeError(Rtobjt	alternatetconformtadapter((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyR4~scC@sG|j|�r|Sx-tD]%}|||�}|dk	r|SqWdS(s(Adapt an object to the reciever
        N(R,t
adapter_hooksR(RR=thookR@((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyR:�s
(RR*RR;R4R:(((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyR6zs(t
InterfaceBase(RAt
SpecificationcB@s�eZdZejZejZdd�Zd�Zd�Zd�Z	e
d�e	�Zd�Zd�Z
ed�Zdd	�Zdd
�ZRS(
swSpecifications

    An interface specification is used to track interface declarations
    and component registrations.

    This class is a base class for both interfaces themselves and for
    interface specifications (declarations).

    Specifications are mutable.  If you reassign their bases, their
    relations with other specifications are adjusted accordingly.
    cC@s+i|_tj�|_t|�|_dS(N(R-tweakreftWeakKeyDictionaryt
dependentsttuplet	__bases__(Rtbases((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyR�s	cC@s$|jj|d�d|j|<dS(Nii(RGR$(Rt	dependent((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt	subscribe�scC@sX|jj|d�d}|s,|j|=n(|dkrH||j|<nt|��dS(Nii(RGR$tKeyError(RRKtn((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pytunsubscribe�s
cC@s]x|jD]}|j|�q
W||jd<x|D]}|j|�q5W|j|�dS(NRI(RIROt__dict__RLtchanged(RRJtb((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt
__setBases�s

cC@s|jjdd�S(NRI((RPR$(R((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt<lambda>�RcC@s�y
|`Wntk
rnX|j}|j�t|�}y t|kr\|jt�nWntk
rpnXt|�|_	tg|D]}t
|t�r�|^q��|_x|D]}d||<q�Wx*t|j
j��D]}|j|�q�WdS(s4We, or something we depend on, have changed
        N((t_v_attrstAttributeErrorR-tclearRt	InterfaceR
t	NameErrorRHt__sro__t
isinstancetInterfaceClasst__iro__RGR'RQ(Rtoriginally_changedtimpliedt	ancestorstancestorRK((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyRQ�s&

	

!
cc@sSi}xF|jD];}x2|j�D]$}||kr#d||<|Vq#q#WqWdS(sDReturn an iterator for the interfaces in the specification.
        iN(RIt
interfaces(RtseentbaseR2((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyRb�s
cC@s ||jko|p||kS(s�Does the specification extend the given interface?

        Test whether an interface in the specification extends the
        given interface
        (R-(RR2tstrict((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pytextends
scC@stj||�S(N(REtref(Rtcallback((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyREscC@s�y
|j}Wntk
r-i}|_nX|j|�}|dkr�x=|jD]/}|j|�}|dk	rS|||<PqSqSWn|dkr�|S|SdS(s+Query for an attribute description
        N(RURVR$RR]tdirect(RtnameR%tattrstattrtiface((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyR$s


(N(RR*RR5R3R,RRLROt_Specification__setBasestpropertyRIRQRbtTrueRfRRER$(((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyRD�s								!	R\cB@s�eZdZddddd�Zd�Zd�Zd�Zed�Z	d�Z
ed�Zd�ZeZ
d	�Zd
�Zdd�Zdd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(s0Prototype (scarecrow) Interfaces Implementation.cC@sm|dkri}n|dkr�|jd�}t|t�rI|d=q�ytjd�jd}Wq�ttfk
r|q�Xn||_	|jd�}|dk	r�t|t
�s�|dkr�|}n|d=q�n|dkr�d}ntj|||�|j
td�}|dk	rKx-|j�D]\}}	|j||	�q(Wnx,|D]$}
t|
t�sRtd��qRqRWtj||�x�t|j��D]�\}}|d
kr�||=q�nt|t
�r�||_|jsC||_qCq�t|t�rt||d
|�||<q�|tkr3||=q�td|��q�W||_d|j	|jf|_dS(NR*iRRRsExpected base interfacest
__locals__t__qualname__t__annotations__RjsConcrete attribute, s%s.%s(RqRrRs(RR$R[tstrRR	t	f_globalsRVRMR*t	AttributeRRtpopRtitemsR)R\R<RDtlistR2RRtfromFunctionRtInvalidInterfacet_InterfaceClass__attrst__identifier__(RRjRJRkRR*tdttagged_dataRtvalRdRl((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyR4sV	
		
	
		
	cc@s	|VdS(sDReturn an iterator for the interfaces in the specification.
        N((R((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyRbxscC@s|jS(N(RI(R((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pytgetBases}scC@s||kp|j|�S(sSame interface or extends?(Rf(Rtother((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pytisEqualOrExtendedBy�scC@s_|s|jj�S|jj�}x0|jD]%}|jtj|j|���q,W|j�S(s4Return the attribute names defined by the interface.(R|R'tcopyRItupdatetdicttfromkeystnames(RtalltrRd((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyR��s
#cC@st|jdt��S(NR�(titerR�Rp(R((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt__iter__�scC@sp|s|jj�Si}x:|jddd�D]"}|jt|j|���q0W|j|j�|j�S(s=Return attribute names and descriptions defined by interface.Ni����(R|RxRIR�R�tnamesAndDescriptions(RR�R�Rd((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyR��s
 cC@s/|j|�}|dk	r|St|��dS(s4Return the attribute description for the given name.N(R$RRM(RRjR�((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pytgetDescriptionFor�scC@s|j|�dk	S(N(R$R(RRj((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt__contains__�scC@s|jj|�S(N(R|R$(RRj((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyRi�scC@s|j||�S(N(R$(RRjR%((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pytqueryDescriptionFor�scC@s�x]|jdg�D]I}y||�Wqtk
r[}|dkrK�q\|j|�qXqWxK|jD]@}y|j||�Wqjtk
r�|dkr��q�qjXqjW|r�t|��ndS(s&validate object to defined invariants.RN(R&RRR
RItvalidateInvariants(RR=terrorsRteRd((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyR��s
cC@sny|jSWn\tk
ri|j}|j}|rFd||f}nd|jj|f}||_|SXdS(Ns%s.%ss<%s %s>(t_v_reprRVRR*t	__class__(RRjtmR�((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt__repr__�s
			cC@sEy||�SWn0tk
r@tj�djdk	rA�qAnXdS(Ni(R<Rtexc_infottb_nextR(RR?((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyR9�s

cC@s|jS(N(R(R((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt
__reduce__�scC@sl|dkrdSt|dd�t|dd�f}t|dd�t|dd�f}||k||kS(s�Make interfaces sortable

        TODO: It would ne nice if:

           More specific interfaces should sort before less specific ones.
           Otherwise, sort on name and module.

           But this is too complicated, and we're going to punt on it
           for now.

        For now, sort on interface and module name.

        None is treated as a pseudo interface that implies the loosest
        contact possible, no contract. For that reason, all interfaces
        sort before None.

        i����RRR*N(RR8(RR�tn1tn2((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt__cmp�s
$$cC@sH|j}d|ks!d|kr2tjd�dSt|j|jf�S(NR*Rs-Hashing uninitialized InterfaceClass instancei(RPtwarningstwarnthashRR*(RR~((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt__hash__s
	
cC@s|j|�}|dkS(Ni(t_InterfaceClass__cmp(RR�tc((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt__eq__scC@s|j|�}|dkS(Ni(R�(RR�R�((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt__ne__scC@s|j|�}|dkS(Ni(R�(RR�R�((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt__lt__scC@s|j|�}|dkS(Ni(R�(RR�R�((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt__le__scC@s|j|�}|dkS(Ni(R�(RR�R�((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt__gt__scC@s|j|�}|dkS(Ni(R�(RR�R�((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt__ge__"s(N(RR*RRRRbR�R�tFalseR�R�R�R�t__getitem__R�RiR�R�R�R9R�R�R�R�R�R�R�R�R�(((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyR\,s4	C				
													RXR*szope.interfaceRvcB@seZdZdZRS(sAttribute descriptions
    N(RR*RRR2(((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyRv)stMethodcB@sneZdZdZZdZZZd�Z	d�Z
d�Zee	e
e�Z
d�Zd�Zd�ZRS(	s�Method interfaces

    The idea here is that you have objects that describe methods.
    This provides an opportunity for rich meta-data.
    cC@s|jdkriS|jS(N(t	_optionalR(R((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt
_get_optionalCscC@s
||_dS(N(R�(Rtopt((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt
_set_optionalGscC@s
d|_dS(N(RR�(R((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt
_del_optionalIscO@st|j|j��dS(N(tBrokenImplementationR2R(Rtargstkw((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyR4MscC@s6i|jd6|jd6|jd6|jd6|jd6S(Nt
positionaltrequiredtoptionaltvarargstkwargs(R�R�R�R�R�(R((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pytgetSignatureInfoPs




cC@s�g}xW|jD]L}|j|�||jj�kr|dcdt|j|�7<qqW|jr�|jd|j�n|jr�|jd|j�nddj|�S(Ni����t=t*s**s(%s)s, (R�R
R�R'treprR�R�tjoin(Rtsigtv((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pytgetSignatureStringXs
(		(N(RR*RR�R�RR�R�R�R�R�R�RoR�R4R�R�(((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyR�5s
					cC@sn|p|j}t||j�}t|dd�p6d}|j}|j|}|j|}i}	|t|�}
|
dkr�||
}d}
n|	j	t
t||
|���|| |_||
 |_
|	|_|}|jt@r|||_|d}n	d|_|jt@r(|||_n	d|_||_x-|jj�D]\}}
|j||
�qJW|S(Nt__defaults__ii((RR�RR8Rt__code__tco_argcounttco_varnamestlenR�R�tzipR�R�R�tco_flagst
CO_VARARGSR�tCO_VARKEYWORDSR�R2RPRxR)(tfuncR2timlevelRjtmethodtdefaultstcodetnaR�R�tnrtargnoRR((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyRzes6	

	 

	


	
		cC@s:t|t�r|j}n|}t||ddd|�S(NR�iRj(R[Rt__func__Rz(tmethR2RjR�((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt
fromMethod�scC@s�ddlm}ddlm}|t|�ddlm}|t|�ddlm}|t|�ddlm	}|t
|�dS(Ni(tclassImplements(t
IAttribute(tIMethod(t
IInterface(tISpecification(tdeclarationsR�RbR�RvR�R�R�R\R�RD(R�R�R�R�R�((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt_wire�s


(R0(R,(R{(R�(+Rt
__future__RRRttypesRRR�REt
exceptionsRRR�R�RtobjectRRRRR+R5t_zope_interface_coptimizationstImportErrorR;R6RCRARDR\RXRvR�RRzR�R�R�R0R,R{R�(((sS/usr/lib64/python2.7/site-packages/mercurial/thirdparty/zope/interface/interface.pyt<module>sZ			*
	"

��0-