§
    ÏÁ³g  ã                   ó"  — d dl mZmZmZmZmZmZmZmZ g d¢Z	 G d„ de
¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z	 dd
ee         dedededeeef         f
d„Z edd¬¦  «        Z G d„ de¦  «        Zdeeeeeef         defd„ZdS )é    )ÚAnyÚDictÚNoReturnÚPatternÚTupleÚTypeÚTypeVarÚUnion)ÚProtocolErrorÚLocalProtocolErrorÚRemoteProtocolErrorÚvalidateÚbytesifyc                   ó(   — e Zd ZdZddededdfd„ZdS )	r   aM  Exception indicating a violation of the HTTP/1.1 protocol.

    This as an abstract base class, with two concrete base classes:
    :exc:`LocalProtocolError`, which indicates that you tried to do something
    that HTTP/1.1 says is illegal, and :exc:`RemoteProtocolError`, which
    indicates that the remote peer tried to do something that HTTP/1.1 says is
    illegal. See :ref:`error-handling` for details.

    In addition to the normal :exc:`Exception` features, it has one attribute:

    .. attribute:: error_status_hint

       This gives a suggestion as to what status code a server might use if
       this error occurred as part of a request.

       For a :exc:`RemoteProtocolError`, this is useful as a suggestion for
       how you might want to respond to a misbehaving peer, if you're
       implementing a server.

       For a :exc:`LocalProtocolError`, this can be taken as a suggestion for
       how your peer might have responded to *you* if h11 had allowed you to
       continue.

       The default is 400 Bad Request, a generic catch-all for protocol
       violations.

    é�  ÚmsgÚerror_status_hintÚreturnNc                 ó”   — t          | ¦  «        t          u rt          d¦  «        ‚t                               | |¦  «         || _        d S )Nz+tried to directly instantiate ProtocolError)Útyper   Ú	TypeErrorÚ	ExceptionÚ__init__r   )Úselfr   r   s      úG/var/www/html/mpstechhub/venv/lib/python3.11/site-packages/h11/_util.pyr   zProtocolError.__init__)   sF   € Ý�‰:Œ:�Ð&Ð&ÝÐIÑJÔJÐJÝ×Ò˜4 Ñ%Ô%Ð%Ø!2ˆÔÐÐó    )r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚstrÚintr   © r   r   r   r      sL   € € € € € ðð ð83ð 3˜Cð 3°Cð 3À$ð 3ð 3ð 3ð 3ð 3ð 3r   r   c                   ó   — e Zd Zdefd„ZdS )r   r   c                 ó   — t           | _        | ‚©N)r   Ú	__class__©r   s    r   Ú!_reraise_as_remote_protocol_errorz4LocalProtocolError._reraise_as_remote_protocol_error<   s   € õ -ˆŒð ˆ
r   N)r   r   r   r   r)   r#   r   r   r   r   ;   s/   € € € € € ð°8ð ð ð ð ð ð r   r   c                   ó   — e Zd ZdS )r   N)r   r   r   r#   r   r   r   r   P   s   € € € € € Ø€Dr   r   úmalformed dataÚregexÚdatar   Úformat_argsr   c                 óŽ   — |                       |¦  «        }|s|r
 |j        |Ž }t          |¦  «        ‚|                     ¦   «         S r&   )Ú	fullmatchÚformatr   Ú	groupdict)r,   r-   r   r.   Úmatchs        r   r   r   T   sQ   € ð �OŠO˜DÑ!Ô!€EØð &Øð 	+Ø�#”*˜kÐ*ˆCÝ  Ñ%Ô%Ð%Ø�?Š?ÑÔÐr   Ú_T_SentinelÚSentinel)Úboundc                   óp   ‡ — e Zd Zdee         dedeedf         deee	f         de	defˆ fd„Z
defd	„Zˆ xZS )
r5   ÚclsÚnameÚbases.Ú	namespaceÚkwdsr   c                 ól   •— |t           fk    sJ ‚ t          ¦   «         j        | |||fi |¤Ž}||_        |S r&   )r5   ÚsuperÚ__new__r'   )r8   r9   r:   r;   r<   Úvr'   s         €r   r?   zSentinel.__new__l   sG   ø€ ð �˜Ò#Ð#Ð#Ð#Ø�E‰GŒGŒO˜C  u¨iÐ@Ð@¸4Ð@Ð@ˆØˆŒØˆr   c                 ó   — | j         S r&   )r   r(   s    r   Ú__repr__zSentinel.__repr__x   s
   € ØŒ}Ðr   )r   r   r   r   r4   r!   r   r   r   r   r?   rB   Ú__classcell__)r'   s   @r   r5   r5   k   s¦   ø€ € € € € ð
Ø�+Ôð
àð
ð �T˜3�YÔð
ð ˜˜S˜”>ð	
ð
 ð
ð 
ð
ð 
ð 
ð 
ð 
ð 
ð˜#ð ð ð ð ð ð ð ð r   Úsc                 óì   — t          | ¦  «        t          u r| S t          | t          ¦  «        r|                      d¦  «        } t          | t
          ¦  «        rt          d¦  «        ‚t          | ¦  «        S )NÚasciiz#expected bytes-like object, not int)r   ÚbytesÚ
isinstancer!   Úencoder"   r   )rD   s    r   r   r      sg   € åˆA�w„w•%ÐÐØˆÝ�!•SÑÔð Ø�HŠH�WÑÔˆÝ�!•SÑÔð ?ÝÐ=Ñ>Ô>Ð>Ý�‰8Œ8€Or   N)r+   )Útypingr   r   r   r   r   r   r	   r
   Ú__all__r   r   r   r   rG   r!   r   r4   r   r5   Ú	bytearrayÚ
memoryviewr"   r   r#   r   r   ú<module>rN      s¡  ðØ LÐ LÐ LÐ LÐ LÐ LÐ LÐ LÐ LÐ LÐ LÐ LÐ LÐ LÐ LÐ LÐ LÐ LÐ LÐ Lðð ð €ð!3ð !3ð !3ð !3ð !3�Iñ !3ô !3ð !3ð^ð ð ð ð ˜ñ ô ð ð*	ð 	ð 	ð 	ð 	˜-ñ 	ô 	ð 	ð
 4Dðð Ø�5Œ>ðØ!&ðØ-0ðØSVðà	ˆ#ˆuˆ*Ôðð ð ð ð( ˆg�m¨:Ð6Ñ6Ô6€ðð ð ð ð ˆtñ ô ð ð(��e˜Y¨
°C¸Ð<Ô=ð À%ð ð ð ð ð ð r   