Ë
    ¶�/j0  ã                   ó  — d Z ddlmZ  G d„ de«      Z G d„ de«      Z G d„ de«      Z G d	„ d
e«      Z G d„ de«      Z G d„ de«      Z	 G d„ de«      Z
 G d„ de
«      Z G d„ de«      Z G d„ de«      Z G d„ d«      Zy)z…Common DNS Exceptions.

Dnspython modules may also define their own exceptions, which will
always be subclasses of ``DNSException``.
é    )ÚSetc                   ó†   ‡ — e Zd ZU dZdZedz  ed<    e«       Ze	e   ed<   dZ
edz  ed<   ˆ fd„Zd„ Zd„ Zd	„ Zˆ fd
„Zˆ xZS )ÚDNSExceptionaõ  Abstract base class shared by all dnspython exceptions.

    It supports two basic modes of operation:

    a) Old/compatible mode is used if ``__init__`` was called with
    empty *kwargs*.  In compatible mode all *args* are passed
    to the standard Python Exception class as before and all *args* are
    printed by the standard ``__str__`` implementation.  Class variable
    ``msg`` (or doc string if ``msg`` is ``None``) is returned from ``str()``
    if *args* is empty.

    b) New/parametrized mode is used if ``__init__`` was called with
    non-empty *kwargs*.
    In the new mode *args* must be empty and all kwargs must match
    those set in class variable ``supp_kwargs``. All kwargs are stored inside
    ``self.kwargs`` and used in a new ``__str__`` implementation to construct
    a formatted message based on the ``fmt`` class variable, a ``string``.

    In the simplest case it is enough to override the ``supp_kwargs``
    and ``fmt`` class variables to get nice parametrized messages.
    NÚmsgÚsupp_kwargsÚfmtc                 ó&  •—  | j                   |i |¤Ž |r( | j                  di |¤Ž| _        t        | «      | _        nt        «       | _        | j                  €| j                  | _        |rt        ‰| �   |Ž  y t        ‰| �!  | j                  «       y ©N© )	Ú_check_paramsÚ_check_kwargsÚkwargsÚstrr   ÚdictÚ__doc__ÚsuperÚ__init__©ÚselfÚargsr   Ú	__class__s      €úOC:\xampp\htdocs\tradingbinance\backend\.venv\Lib\site-packages\dns/exception.pyr   zDNSException.__init__7   s|   ø€ Øˆ×Ñ˜DÐ+ FÒ+Ùà,˜$×,Ñ,Ñ6¨vÑ6ˆDŒKÜ˜4“yˆD�Hä›&ˆDŒKØ�8‰8Ðà—|‘|ˆDŒHÙÜ‰GÑ˜dÒ#ä‰GÑ˜TŸX™XÕ&ó    c                 óJ   — |s|rt        |«      t        |«      k7  sJ d«       ‚yy)zsOld exceptions supported only args and not kwargs.

        For sanity we do not allow to mix old and new behavior.z=keyword arguments are mutually exclusive with positional argsN)Úbool)r   r   r   s      r   r   zDNSException._check_paramsG   s8   € ñ ‘6Ü˜“:¤Øó"ò ð OàNóOñ ð r   c                 ó~   — |r:t        |j                  «       «      | j                  k(  sJ d| j                  › �«       ‚|S )Nz+following set of keyword args is required: )ÚsetÚkeysr   )r   r   s     r   r   zDNSException._check_kwargsP   sC   € Ùä�F—K‘K“MÓ" d×&6Ñ&6Ò6ðPà<¸T×=MÑ=MÐ<NÐOóPØ6àˆr   c                 óü   — i }|j                  «       D ]f  \  }}t        |t        t        z  «      rEt        t	        t
        |«      «      ||<   t        ||   «      dk(  sŒK||   j                  «       ||<   Œb|||<   Œh |S )z˜Format kwargs before printing them.

        Resulting dictionary has to have keys necessary for str.format call
        on fmt class variable.
        é   )ÚitemsÚ
isinstanceÚlistr   Úmapr   ÚlenÚpop)r   r   ÚfmtargsÚkwÚdatas        r   Ú_fmt_kwargszDNSException._fmt_kwargsW   st   € ð ˆØŸ™ž‰HˆB�Ü˜$¤¤s¡
Ô+ä"¤3¤s¨D£>Ó2�˜‘Ü�w˜r‘{Ó# qÓ(à")¨"¡+§/¡/Ó"3�G˜B’Kà"�˜’ð 'ð ˆr   c                 óÀ   •— | j                   rD| j                  r8 | j                  di | j                   ¤Ž} | j                  j                  di |¤ŽS t        ‰| �  «       S r
   )r   r   r*   Úformatr   Ú__str__)r   r'   r   s     €r   r-   zDNSException.__str__i   sP   ø€ Ø�;Š;˜4Ÿ8š8à&�d×&Ñ&Ñ5¨¯©Ñ5ˆGØ"�4—8‘8—?‘?Ñ- WÑ-Ð-ô ‘7‘?Ó$Ð$r   )Ú__name__Ú
__module__Ú__qualname__r   r   r   Ú__annotations__r   r   r   r   r   r   r   r*   r-   Ú__classcell__©r   s   @r   r   r      sU   ø… ñð, €Cˆˆt‰ÓÙ›E€K��S‘Ó!Ø€Cˆˆt‰Óô'ò Oòò÷$%ð %r   r   c                   ó   — e Zd ZdZy)Ú	FormErrorzDNS message is malformed.N©r.   r/   r0   r   r   r   r   r5   r5   s   s   „ Ú#r   r5   c                   ó   — e Zd ZdZy)ÚSyntaxErrorzText input is malformed.Nr6   r   r   r   r8   r8   w   ó   „ Ú"r   r8   c                   ó   — e Zd ZdZy)ÚUnexpectedEndzText input ended unexpectedly.Nr6   r   r   r   r;   r;   {   s   „ Ú(r   r;   c                   ó   — e Zd ZdZy)ÚTooBigzThe DNS message is too big.Nr6   r   r   r   r=   r=      s   „ Ú%r   r=   c                   ó,   ‡ — e Zd ZdZdhZdZˆ fd„Zˆ xZS )ÚTimeoutzThe DNS operation timed out.Útimeoutz7The DNS operation timed out after {timeout:.3f} secondsc                 ó$   •— t        ‰| �  |i |¤Ž y ©N)r   r   r   s      €r   r   zTimeout.__init__‹   s   ø€ Ü‰Ñ˜$Ð) &Ó)r   )r.   r/   r0   r   r   r   r   r2   r3   s   @r   r?   r?   ƒ   s   ø„ Ù&à�+€KØ
C€C÷*ð *r   r?   c                   ó   — e Zd ZdZy)ÚUnsupportedAlgorithmz&The DNSSEC algorithm is not supported.Nr6   r   r   r   rD   rD   �   s   „ Ú0r   rD   c                   ó   — e Zd ZdZy)ÚAlgorithmKeyMismatchz=The DNSSEC algorithm is not supported for the given key type.Nr6   r   r   r   rF   rF   “   s   „ ÚGr   rF   c                   ó   — e Zd ZdZy)ÚValidationFailurez The DNSSEC signature is invalid.Nr6   r   r   r   rH   rH   —   s   „ Ú*r   rH   c                   ó   — e Zd ZdZy)ÚDeniedByPolicyzDenied by DNSSEC policy.Nr6   r   r   r   rJ   rJ   ›   r9   r   rJ   c                   ó   — e Zd Zd„ Zd„ Zd„ Zy)ÚExceptionWrapperc                 ó   — || _         y rB   )Úexception_class)r   rN   s     r   r   zExceptionWrapper.__init__    s
   € Ø.ˆÕr   c                 ó   — | S rB   r   )r   s    r   Ú	__enter__zExceptionWrapper.__enter__£   s   € Øˆr   c                 ój   — |�1t        || j                  «      s| j                  t        |«      «      |‚y)NF)r"   rN   r   )r   Úexc_typeÚexc_valÚexc_tbs       r   Ú__exit__zExceptionWrapper.__exit__¦   s1   € ØÐ¬
°7¸D×<PÑ<PÔ(QØ×&Ñ&¤s¨7£|Ó4¸'ÐAØr   N)r.   r/   r0   r   rP   rU   r   r   r   rL   rL   Ÿ   s   „ ò/òór   rL   N)r   Útypingr   Ú	Exceptionr   r5   r8   r;   r=   r?   rD   rF   rH   rJ   rL   r   r   r   Ú<module>rX      s—   ðñ$õ ôT%�9ô T%ôn$�ô $ô#�,ô #ô)�Kô )ô&ˆ\ô &ô	*ˆlô 	*ô1˜<ô 1ôHÐ/ô Hô+˜ô +ô#�\ô #÷
ò 
r   