
    ~(phv!                         S r / SQr " S S\5      r " S S\5      r " S S\5      r " S S	\5      r " S
 S\5      r " S S\5      r " S S\5      r	 " S S\
5      rg)zInterface-specific exceptions
)InvalidDoesNotImplementBrokenImplementationBrokenMethodImplementationMultipleInvalidBadImplementsInvalidInterfacec                       \ rS rSrSrSrg)r      z A specification is violated
     N__name__
__module____qualname____firstlineno____doc____static_attributes__r       L/var/www/html/venv/lib/python3.13/site-packages/zope/interface/exceptions.pyr   r          r   r   c                       \ rS rSrSrSr\rSrSS jr	\
S 5       r\
S 5       r\
S	 5       r\
S
 5       rSrSrSrS rSrg)_TargetInvalid#          z<Not Given>Nc                 R     U R                   U   $ ! U R                   a    Us $ f = fN)args_NOT_GIVEN_CATCH)selfixdefaults      r   _get_arg_or_default"_TargetInvalid._get_arg_or_default9   s/    	99R= $$ 	N	s    &&c                 8    U R                  U R                  5      $ r   )r"   _IX_INTERFACEr   s    r   	interface_TargetInvalid.interface?   s    ''(:(:;;r   c                 N    U R                  U R                  U R                  5      $ r   )r"   
_IX_TARGET
_NOT_GIVENr&   s    r   target_TargetInvalid.targetC   s    ''IIr   c                 D    U R                   nXR                  L a  gSU< 3$ )Nz	An objectzThe object )r,   r+   )r   r,   s     r   _str_subject_TargetInvalid._str_subject[   s%    __$VJ''r   c                 2    SU R                   =(       d    S-  $ )Nz$has failed to implement interface %sz	<Unknown>)r'   r&   s    r   _str_description_TargetInvalid._str_descriptionb   s    5NN)k
 	
r   z: z	<unknown>.c                     SR                  U R                  U R                  U R                  U R                  U R
                  5      $ )Nz{} {}{}{}{})formatr/   r2   _str_conjunction_str_details_str_trailerr&   s    r   __str___TargetInvalid.__str__l   sB    ##!!!!
 	
r   r   r   )r   r   r   r   r%   r*   
IndexErrorr   r+   r"   propertyr'   r,   r/   r2   r7   r8   r9   r:   r   r   r   r   r   r   #   s     MJ "J < < J J. ( ( 
 

 LL
r   r   c                       \ rS rSrSrSrSrg)r   v   z
DoesNotImplement(interface[, target])

The *target* (optional) does not implement the *interface*.

.. versionchanged:: 5.0.0
   Add the *target* argument and attribute, and change the resulting
   string value of this object accordingly.
z.Does not declaratively implement the interfacer   N)r   r   r   r   r   r8   r   r   r   r   r   r   v   s     DLr   r   c                   `    \ rS rSrSr\R                  S-   r\S-   r\	S 5       r
\	S 5       rSrg)r      a?  
BrokenImplementation(interface, name[, target])

The *target* (optional) is missing the attribute *name*.

.. versionchanged:: 5.0.0
   Add the *target* argument and attribute, and change the resulting
   string value of this object accordingly.

   The *name* can either be a simple string or a ``Attribute`` object.
r   c                      U R                   S   $ Nr   r   r&   s    r   nameBrokenImplementation.name       yy|r   c                     S[        U R                  [        5      (       a  [        U R                  5      -  $ U R                  -  $ )Nz!The %s attribute was not provided)
isinstancerE   strreprr&   s    r   r8   !BrokenImplementation._str_details   s;    2)$))S99DO
 	
?Cyy
 	
r   r   N)r   r   r   r   r   r   r%   _IX_NAMEr*   r=   rE   r8   r   r   r   r   r   r      sH    
 ++a/HAJ  
 
r   r   c                   p    \ rS rSrSrSr\S-   r\S-   r\S 5       r	\S 5       r
\S 5       r\S 5       rS	rg
)r      aw  
BrokenMethodImplementation(
    method, message[, implementation, interface, target]
)

The *target* (optional) has a *method* in *implementation* that violates
its contract in a way described by *mess*.

.. versionchanged:: 5.0.0
   Add the *interface* and *target* argument and attribute,
   and change the resulting string value of this object accordingly.

   The *method* can either be a simple string or a ``Method`` object.

.. versionchanged:: 5.0.0
   If *implementation* is given, then the *message* will have the
   string "implementation" replaced with an short but informative
   representation of *implementation*.

   r   c                      U R                   S   $ Nr   rD   r&   s    r   method!BrokenMethodImplementation.method   rG   r   c                      U R                   S   $ rC   rD   r&   s    r   messBrokenMethodImplementation.mess   rG   r   c                 :   SS K n UR                  n[        n U" U 5      n U R                  nXC" U5      -   $ ! [         a    UR                  nUR
                  n NDf = f! [        [        4 a    [        U 5      s $ f = f! [         a    U R                  n Nkf = frR   )inspect	signaturerJ   AttributeError
getargspecformatargspec
ValueError	TypeErrorrK   r   r   )implrY   sig	formatsigrE   s        r   __implementation_str/BrokenMethodImplementation.__implementation_str   s     		.##CI
	d)C	!$$D in$$%  	.$$C--I	. I& 	
 :	  	!==D	!s1   8 A  B "AA A>=A>BBc                    U R                  U R                  U R                  5      nU R                  nXR                  La,  SU;   a&  UR	                  SS5      nX R                  U5      4-  nSR                  [        U R                  [        5      (       a  [        U R                  5      U5      $ U R                  U5      $ )Nimplementationz%rz)The contract of {} is violated because {})r"   _IX_IMPLr+   rV   replace/_BrokenMethodImplementation__implementation_strr6   rI   rS   rJ   rK   )r   r`   messages      r   r8   'BrokenMethodImplementation._str_details   s    ''tG))&+;w+Foo&6=G!:!:4!@ BBG:AA!+DKK!=!=D
 	
CG;;
 	
r   r   N)r   r   r   r   r   rg   r%   r*   r=   rS   rV   staticmethodri   r8   r   r   r   r   r   r      so    * HqLM"J    % %6 

 

r   r   c                   X   ^  \ rS rSrSrSrU 4S jr\S 5       r\S 5       r	Sr
SrSrU =r$ )	r      z
The *target* has failed to implement the *interface* in
multiple ways.

The failures are described by *exceptions*, a collection of
other `Invalid` instances.

.. versionadded:: 5.0
r   c                 8   > [         TU ]  X[        U5      5        g r   )super__init__tuple)r   r'   r,   
exceptions	__class__s       r   rq   MultipleInvalid.__init__   s    E*,=>r   c                      U R                   S   $ )NrP   rD   r&   s    r   rs   MultipleInvalid.exceptions   rG   r   c                 L    SSR                  S U R                   5       5      -   $ )Nz
    c              3      #    U  H?  n[        U[        5      (       a  UR                  R                  5       O
[	        U5      v   MA     g 7fr   )rI   r   r8   striprJ   ).0xs     r   	<genexpr>/MultipleInvalid._str_details.<locals>.<genexpr>  s9      (
$ '1N&C&CANN  "QO$s   AA	)joinrs   r&   s    r   r8   MultipleInvalid._str_details   s-     (-- (
__(
 
 
 	
r   : )r   r   r   r   r   r   rq   r=   rs   r8   r7   r9   r   __classcell__)rt   s   @r   r   r      sJ     ?   
 
 Lr   r   c                       \ rS rSrSrSrg)r   i  z'The interface has invalid contents
    r   Nr   r   r   r   r   r     r   r   r   c                       \ rS rSrSrSrg)r   i  zAn implementation assertion is invalid

because it doesn't contain an interface or a sequence of valid
implementation assertions.
r   Nr   r   r   r   r   r     s    r   r   N)r   __all__	Exceptionr   r   r   r   r   r   r   r_   r   r   r   r   <module>r      sz   
i 
P
W P
fD~ D
> 
6I
 I
Xn By 
I r   