+
     h  c                   s    ^ RI HtHtHtHtHtHtHtHt . ROt	 ! R R]
4      t ! R R]4      t ! R R]4      tRR R	 llt]! R
RR7      t ! R R]4      tR R ltR# )i    )AnyDictNoReturnPatternTupleTypeTypeVarUnionProtocolErrorLocalProtocolErrorRemoteProtocolErrorc                   s:   a  ] tR t^t o RtRV 3R lR lltRtV tR# )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.

c                s*   < V ^8  d   QhRS[ RS[RR/# )   msgerror_status_hintreturnN)strintformat__classdict__   "./usr/lib/python3.14/site-packages/h11/_util.py__annotate__ZProtocolError.__annotate__)   s"     3 3C 3C 3$ 3    c                sx    \        V 4      \        J d   \        R 4      h\        P	                  W4       W n        R# )z+tried to directly instantiate ProtocolErrorN)typer   	TypeError	Exception__init__r   )selfr   r   s   &&&r   r   ZProtocolError.__init__)   s.    :&IJJ4%!2r   )r   N)i  )__name__
__module____qualname____firstlineno__Z__doc__r   __static_attributes____classdictcell__r      @r   r   r      s     83 3 3r   c                   s2   a  ] tR t^;t o V 3R lR ltRtV tR# )r	   c                    < V ^8  d   QhRS[ /# r   r   )r   r   r   r   r   ZLocalProtocolError.__annotate__<   s      8 r   c                s    \         V n        V hN)r
   	__class__r      &r   !_reraise_as_remote_protocol_errorZ4LocalProtocolError._reraise_as_remote_protocol_error<   s     - 
r   )r(   N)r   r   r   r    r+   r!   r"   r#   r$   r   r	   r	   ;   s      r   c                   s    ] tR t^PtRtR# )r
    N)r   r   r   r    r!   r,   r   r   r
   r
   P   s    r   c                s    V ^8  d   QhR\         \        ,          R\        R\        R\        R\        \        \        3,          /# )r   regexdatar   format_argsr   )r   bytesr   r    r   r      "r   r   r   T   sA      5>!&-0SV	#u*r   c                 s    V P                  V4      pV'       g$   V'       d   VP                  ! V!  p\        V4      hVP                  4       # r'   )Z	fullmatchr   r	   Z	groupdict)r-   r.   r   r/   Zmatchs   &&&* r   validater3   T   s>     OOD!E**k*C %%??r   _T_SentinelSentinel)Zboundc                   sP   a a ] tR t^kt oV3R lV 3R lltV3R lR ltRtVtV ;t# )r5   c                sx   < V ^8  d   QhRS[ S[,          RS[RS[S[R3,          RS[S[S[3,          RS[RS[/# )r   clsnamebases.	namespacekwdsr   )r   r4   r   r   r   r   r    r   r   r   r   Sentinel.__annotate__l   s[     
 
+

 T3Y
 S>	

 
 

r   c                s8   < \         SV `  ! WW#3/ VB pWUn        V# r'   )Zsuper__new__r(   )r6   r7   r8   r9   r:   Zvr(   s   &&&&, r   r<   ZSentinel.__new__l   s$     GOCu@4@r   c                r%   r&   )r   r   r   r   r   r;   x   s      # r   c                s    V P                   # r'   )r   r)   r*   r   __repr__ZSentinel.__repr__x   s    }}r   r,   )	r   r   r   r    r<   r=   r!   r"   Z__classcell__)r(   r   s   @@r   r5   r5   k   s     
 
  r   c                sp    V ^8  d   QhR\         \        \        \        \        \
        3,          R\        /# )r   sr   )r   r0   Z	bytearrayZ
memoryviewr   r   r1   r2   r   r   r      s*      eY
C<= % r   c                 s    \        V 4      \        J d   V # \        V \        4      '       d   V P	                  R 4      p \        V \
        4      '       d   \        R4      h\        V 4      # )Zasciiz#expected bytes-like object, not int)r   r0   Z
isinstancer   Zencoder   r   )r>   r*   r   bytesifyr?      sP    Aw%!SHHW!S=>>8Or   N)r   r	   r
   r3   r?   )zmalformed data)Ztypingr    r   r   r   r   r   r   r   Z__all__r   r   r	   r
   r3   r4   r   r5   r?   r,   r   r   <module>r@      s^    L L L!3I !3^ *	- 	( m:6t (r   