§
    Çtºf¥  ã                   óà   — d Z ddlZddlZddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 ddlm
Z
 dd	lmZ dd
lmZ ddlmZ ddlmZ ddgZefZdd„Zd„ Zdd„Zdd„Zej         e_         dZd„ ZdS )z!Verify interface implementations
é    N)ÚFunctionType)Ú
MethodType)ÚBrokenImplementation)ÚBrokenMethodImplementation)ÚDoesNotImplement)ÚInvalid)ÚMultipleInvalid)ÚMethod)ÚfromFunction)Ú
fromMethodÚverifyObjectÚverifyClassFc                 ó¨  — |dk    r| j         }n| j        }g }|s. ||¦  «        s#|                     t          | |¦  «        ¦  «         |                      d¬¦  «        D ]E\  }}	 t          | ||||¦  «         Œ# t          $ r}|                     |¦  «         Y d}~Œ>d}~ww xY w|r,t          |¦  «        dk    r|d         ‚t          | ||¦  «        ‚dS )a¤  
    Verify that *candidate* might correctly provide *iface*.

    This involves:

    - Making sure the candidate claims that it provides the
      interface using ``iface.providedBy`` (unless *tentative* is `True`, in
      which case this step is skipped). This means that the candidate's class
      declares that it `implements <zope.interface.implementer>` the
      interface, or the candidate itself declares that it `provides
      <zope.interface.provider>`
      the interface

    - Making sure the candidate defines all the necessary methods

    - Making sure the methods have the correct signature (to the
      extent possible)

    - Making sure the candidate defines all the necessary attributes

    :return bool: Returns a true value if everything that could be
       checked passed.
    :raises zope.interface.Invalid: If any of the previous
       conditions does not hold.

    .. versionchanged:: 5.0
        If multiple methods or attributes are invalid, all such errors
        are collected and reported. Previously, only the first error was
        reported.  As a special case, if only one such error is present, it is
        raised alone, like before.
    ÚcT)ÚallNé   r   )	ÚimplementedByÚ
providedByÚappendr   ÚnamesAndDescriptionsÚ_verify_elementr   Úlenr	   )	ÚifaceÚ	candidateÚ	tentativeÚvtypeÚtesterÚexcsÚnameÚdescÚes	            úT/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/zope/interface/verify.pyÚ_verifyr#   )   s  € ðB �‚|€|ØÔ$ˆˆàÔ!ˆà€DØð 8˜V˜V IÑ.Ô.ð 8Ø�ŠÕ$ U¨IÑ6Ô6Ñ7Ô7Ð7à×0Ò0°TÐ0Ñ:Ô:ð ð ‰
ˆˆdð	Ý˜E 4¨¨y¸%Ñ@Ô@Ð@Ð@øÝð 	ð 	ð 	Ø�KŠK˜‰NŒNˆNˆNˆNˆNˆNˆNøøøøð	øøøð ð 6Ýˆt‰9Œ9˜Š>ˆ>Ø�q”'ˆMÝ˜e Y°Ñ5Ô5Ð5àˆ4s   Á$A8Á8
B!ÂBÂB!c                 ól  — 	 t          ||¦  «        }n=# t          $ r0 t          |t          ¦  «        s	|dk    rY d S t	          | ||¦  «        ‚w xY wt          |t          ¦  «        sd S t          j        |¦  «        st          j        |¦  «        rd S t          |t          ¦  «        rBt          |t          ¦  «        r|dk    rt          || |d¬¦  «        }n–t          || |¬¦  «        }nƒt          |t          ¦  «        r-t          |j        ¦  «        t          u rt          || |¦  «        }nAt          |t          ¦  «        r|dk    rd S t          |¦  «        st!          |d|| |¦  «        ‚d S t#          |                     ¦   «         |                     ¦   «         ¦  «        }|rt!          |||| |¦  «        ‚d S )Nr   r   )r   Úimlevel)r   zimplementation is not a method)ÚgetattrÚAttributeErrorÚ
isinstancer
   r   ÚinspectÚismethoddescriptorÚ	isbuiltinr   Útyper   ÚMethodTypesÚ__func__r   ÚpropertyÚcallabler   Ú	_incompatÚgetSignatureInfo)r   r   r    r   r   ÚattrÚmethÚmesss           r"   r   r   a   sö  € ð
;Ý�y $Ñ'Ô'ˆˆøÝð ;ð ;ð ;å˜4¥Ñ(Ô(ð 	¨e°sªl¨lð ˆFˆFõ # 5¨$°	Ñ:Ô:Ð:ð;øøøõ �d�FÑ#Ô#ð àˆåÔ! $Ñ'Ô'ð ­7Ô+<¸TÑ+BÔ+Bð ð 	ˆå�$�Ñ%Ô%ð $å�i¥Ñ&Ô&ð 	8¨5°Cª<¨<õ
    e°$ÀÐBÑBÔBˆDˆDõ    e°$Ð7Ñ7Ô7ˆDˆDõ 	�4�Ñ%Ô%ðåˆTŒ]ÑÔ�|Ð+Ð+å˜$  tÑ,Ô,ˆˆå	�D�(Ñ	#Ô	#ð ¨°ª¨ð
 	ˆõ ˜‰~Œ~ð 	Ý,ØØ0ØØØñô ð ð 	ˆõ �T×*Ò*Ñ,Ô,¨d×.CÒ.CÑ.EÔ.EÑFÔF€DØð MÝ(¨¨t°T¸5À)ÑLÔLÐLðMð Ms   ‚ “%A»Ac                 ó(   — t          | ||d¬¦  «        S )zF
    Verify that the *candidate* might correctly provide *iface*.
    r   ©r   ©r#   ©r   r   r   s      r"   r   r   ¯   s   € õ �5˜) Y°cÐ:Ñ:Ô:Ð:ó    c                 ó(   — t          | ||d¬¦  «        S )NÚor7   r8   r9   s      r"   r   r   ¶   s   € Ý�5˜) Y°cÐ:Ñ:Ô:Ð:r:   z*implementation requires too many argumentsc                 ó$  — t          |d         ¦  «        t          | d         ¦  «        k    rt          S t          |d         ¦  «        t          | d         ¦  «        k     r
|d         sdS | d         r
|d         sdS | d         r
|d         sdS d S d S )NÚrequiredÚ
positionalÚvarargsz-implementation doesn't allow enough argumentsÚkwargsz0implementation doesn't support keyword argumentsz1implementation doesn't support variable arguments)r   Ú_MSG_TOO_MANY)r>   Úimplementeds     r"   r1   r1   ¿   sÆ   € õ
 ˆ;�zÔ"Ñ#Ô#¥c¨(°:Ô*>Ñ&?Ô&?Ò?Ð?ÝÐõ 
ˆ[˜Ô&Ñ	'Ô	'­#¨h°|Ô.DÑ*EÔ*EÒ	EÐ	EØ˜	Ô"ð 
Fð ?Ð>à�Ôð B +¨hÔ"7ð BØAÐAà�	Ôð C ;¨yÔ#9ð CØBÐBðCð Cð Cð Cr:   )FN)F)Ú__doc__r)   ÚsysÚtypesr   r   Úzope.interface.exceptionsr   r   r   r   r	   Úzope.interface.interfacer
   r   r   Ú__all__r-   r#   r   r   r   rB   r1   © r:   r"   ú<module>rK      so  ððð à €€€Ø 
€
€
€
Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð à :Ð :Ð :Ð :Ð :Ð :Ø @Ð @Ð @Ð @Ð @Ð @Ø 6Ð 6Ð 6Ð 6Ð 6Ð 6Ø -Ð -Ð -Ð -Ð -Ð -Ø 5Ð 5Ð 5Ð 5Ð 5Ð 5Ø +Ð +Ð +Ð +Ð +Ð +Ø 1Ð 1Ð 1Ð 1Ð 1Ð 1Ø /Ð /Ð /Ð /Ð /Ð /ð Øð€ð ˆn€ð5ð 5ð 5ð 5ðpKMð KMð KMð\;ð ;ð ;ð ;ð;ð ;ð ;ð ;ð ”€Ô à<€ðCð Cð Cð Cð Cr:   