ó
    §ZÇh  ã                   óð   • S SK JrJrJrJrJrJrJrJr  / SQr	 " S S\
5      r " S S\5      r " S S\5      r SS	\\   S
\S\S\S\\\4   4
S jjr\" SSS9r " S S\5      rS\\\\\\4   S\4S jrg)é    )ÚAnyÚDictÚNoReturnÚPatternÚTupleÚTypeÚTypeVarÚUnion)ÚProtocolErrorÚLocalProtocolErrorÚRemoteProtocolErrorÚvalidateÚbytesifyc                   ó2   • \ rS rSrSrS	S\S\SS4S jjrSrg)
r   é   a  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   • [        U 5      [        L a  [        S5      e[        R	                  X5        X l        g )Nz+tried to directly instantiate ProtocolError)Útyper   Ú	TypeErrorÚ	ExceptionÚ__init__r   )Úselfr   r   s      ÚF/home/mande/repo/quber/.venv/lib/python3.13/site-packages/h11/_util.pyr   ÚProtocolError.__init__)   s.   € Ü�‹:œÒ&ÜÐIÓJÐJÜ×Ñ˜4Ô%Ø!2Õó    )r   )i�  )	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚstrÚintr   Ú__static_attributes__© r   r   r   r      s&   † ññ83˜Cð 3°Cð 3À$÷ 3ð 3r   r   c                   ó"   • \ rS rSrS\4S jrSrg)r   é;   r   c                 ó   • [         U l        U e©N)r   Ú	__class__©r   s    r   Ú!_reraise_as_remote_protocol_errorÚ4LocalProtocolError._reraise_as_remote_protocol_error<   s   € ô -ˆŒð ˆ
r   ©r+   N)r   r   r    r!   r   r-   r%   r&   r   r   r   r   ;   s   † ð°8÷ r   r   c                   ó   • \ rS rSrSrg)r   éP   r&   N)r   r   r    r!   r%   r&   r   r   r   r   P   s   † Úr   r   ÚregexÚdatar   Úformat_argsr   c                 ó”   • U R                  U5      nU(       d!  U(       a  UR                  " U6 n[        U5      eUR                  5       $ r*   )Ú	fullmatchÚformatr   Ú	groupdict)r2   r3   r   r4   Úmatchs        r   r   r   T   s>   € ð �O‰O˜DÓ!€EÞÞØ—*’*˜kÐ*ˆCÜ  Ó%Ð%Ø�?‰?ÓÐr   Ú_T_SentinelÚSentinel)Úboundc                   ól   ^ • \ rS rSrS\\   S\S\\S4   S\	\\
4   S\
S\4U 4S	 jjrS\4S
 jrSrU =r$ )r;   ék   ÚclsÚnameÚbases.Ú	namespaceÚkwdsr   c                 óR   >• U[         4:X  d   e[        TU ]  " XX#40 UD6nXUl        U$ r*   )r;   ÚsuperÚ__new__r+   )r?   r@   rA   rB   rC   Úvr+   s         €r   rF   ÚSentinel.__new__l   s4   ø€ ð œ˜Ó#Ð#Ð#Ü‰GŠO˜C uÑ@¸4Ñ@ˆØŒØˆr   c                 ó   • U R                   $ r*   )r   r,   s    r   Ú__repr__ÚSentinel.__repr__x   s   € Ø�}‰}Ðr   r&   )r   r   r    r!   r   r:   r#   r   r   r   r   rF   rJ   r%   Ú__classcell__r/   s   @r   r;   r;   k   sg   ø† ð
Ø�+Ñð
àð
ð �T˜3�YÑð
ð ˜˜S˜‘>ð	
ð
 ð
ð 
÷
ð˜#÷ ò r   Úsc                 óÌ   • [        U 5      [        L a  U $ [        U [        5      (       a  U R	                  S5      n [        U [
        5      (       a  [        S5      e[        U 5      $ )NÚasciiz#expected bytes-like object, not int)r   ÚbytesÚ
isinstancer#   Úencoder$   r   )rM   s    r   r   r      sP   € äˆAƒw”%ÒØˆÜ�!”S×ÑØ�H‰H�WÓˆÜ�!”S×ÑÜÐ=Ó>Ð>Ü�‹8€Or   N)zmalformed data)Útypingr   r   r   r   r   r   r	   r
   Ú__all__r   r   r   r   rP   r#   r   r:   r   r;   Ú	bytearrayÚ
memoryviewr$   r   r&   r   r   Ú<module>rW      s·   ðß L× LÓ Lò€ô!3�Iô !3ô^˜ô ô*	˜-ô 	ð
 4DñØ�5‰>ðØ!&ðØ-0ðØSVðà	ˆ#ˆuˆ*Ñõñ( �m¨:Ñ6€ôˆtô ð(��e˜Y¨
°C¸Ð<Ñ=ð À%õ r   