+
     h.  c                   sb   ^ RI t ^ RIHt ^ RIHt ^ RIHtHtHt ^RI	H
t
Ht ^RIHtHt ^RIHtHtHt . ROt] P(                  ! ]
P*                  ! R4      4      t] P(                  ! ]P*                  ! R4      4      t ! R R]4      t]! RRR7       ! R R	]4      4       t]! RRR7       ! R R]4      4       t]! RRR7       ! R R
]4      4       t]! RRR7       ! R R]4      4       t]! RRR7       ! R R]4      4       t]! RRR7       ! R R]4      4       t]! RR7       ! R R]4      4       tR# )i    N)ABC)	dataclass)ListTupleUnion)methodrequest_target)Headersnormalize_and_validate)bytesifyLocalProtocolErrorvalidateEventRequestInformationalResponseResponseDataEndOfMessageConnectionClosedZasciic                   s    ] tR t^ tRtRtRtR# )r   z
Base class for h11 events.
 N)__name__
__module____qualname____firstlineno____doc__	__slots____static_attributes__r       0/usr/lib/python3.14/site-packages/h11/_events.pyr   r       s     Ir   FT)Zinitfrozenc                   sb   a a ] tR t^(t oRtRtRRRR/V3R lV 3R llltRtV3R	 ltR
t	Vt
V ;t# )r   a  The beginning of an HTTP request.

Fields:

.. attribute:: method

   An HTTP method, e.g. ``b"GET"`` or ``b"POST"``. Always a byte
   string. :term:`Bytes-like objects <bytes-like object>` and native
   strings containing only ascii characters will be automatically
   converted to byte strings.

.. attribute:: target

   The target of an HTTP request, e.g. ``b"/index.html"``, or one of the
   more exotic formats described in `RFC 7320, section 5.3
   <https://tools.ietf.org/html/rfc7230#section-5.3>`_. Always a byte
   string. :term:`Bytes-like objects <bytes-like object>` and native
   strings containing only ascii characters will be automatically
   converted to byte strings.

.. attribute:: headers

   Request headers, represented as a list of (name, value) pairs. See
   :ref:`the header normalization rules <headers-format>` for details.

.. attribute:: http_version

   The HTTP protocol version, represented as a byte string like
   ``b"1.1"``. See :ref:`the HTTP version normalization rules
   <http_version-format>` for details.

http_version   1.1_parsedFc                s   < V ^8  d   QhRS[ S[S[3,          RS[ S[S[S[S[S[3,          ,          S[S[S[S[3,          ,          3,          RS[ S[S[3,          RS[ S[S[3,          RS[RR/# )   r   headerstargetr   r    returnN)r   bytesstrr   r   r   boolformat__classdict__   "r   __annotate__Request.__annotate__R   s     (N (N eSj!(N wU5%<%8 94c3h;PPQ	(N
 eSj!(N E3J'(N (N 
(Nr   c          	     sF  < \         S	V `  4        \        V\        4      '       d   \        P                  V R V4       M!\        P                  V R \        W%R7      4       V'       gb   \        P                  V R\        V4      4       \        P                  V R\        V4      4       \        P                  V R\        V4      4       ME\        P                  V RV4       \        P                  V RV4       \        P                  V RV4       ^ pV P                   F  w  rxVR8X  g   K  V^,          pK  	  V P                  R8X  d   V^ 8X  d   \        R4      hV^8  d   \        R4      h\        \        V P                  R	4       \        \        V P                  R
4       R# )r"   r    r   r#   r   s   hostr   zMissing mandatory Host: headerzFound multiple Host: headerszIllegal method characterszIllegal target charactersN)super__init__
isinstancer   object__setattr__r   r	   r"   r   r
   r   	method_rer   request_target_rer#   )
selfr   r"   r#   r   r    Z
host_countZnameZvalue	__class__s
   &$$$$$   r   r0   ZRequest.__init__R   sI    	gw''tY8i!7!Q tXx/?@tXx/?@t^Xl5KLtXv6tXv6t^\B 
<<KDwa
 ( &:?$%EFF>$%CDDDKK)DE"DKK1LMr   Nc                sJ   < V ^8  d   Qh/ S[ ;R&   S[;R&   S[ ;R&   S[ ;R&   # )r!   r   r"   r#   r   )r%   r   r(   r+   r   r,   r-   (   s?     J MK L M N MO P Q r   r   )r   r"   r#   r   r   r   r   r   r   r   r0   __hash____annotate_func__r   __classdictcell____classcell__r7   r*      @@r   r   r   (   sE     B @I(N +1(N (N (NV Hk  r   c                   st   a a ] tR t^t oRtRRRRRR/V3R lV 3R llltV3R	 lR
 ltRtV3R ltRt	Vt
V ;t# )_ResponseBaser   reasonr   r   r    Fc                s   < V ^8  d   QhRS[ S[S[S[S[S[3,          ,          S[S[S[S[3,          ,          3,          RS[RS[ S[S[3,          RS[ S[S[3,          RS[RR/# )r!   r"   status_coder   r@   r    r$   N)r   r   r   r   r%   r&   intr'   r(   r+   r   r,   _ResponseBase.__annotate__   s       wU5%<%8 94c3h;PPQ 	
 E3J' eSj!  
r   c          	     s  < \         SV `  4        \        V\        4      '       d   \        P                  V R V4       M!\        P                  V R \        WR7      4       V'       g   \        P                  V R\        V4      4       \        P                  V R\        V4      4       \        V\        4      '       g   \        R4      h\        P                  V R\        V4      4       ME\        P                  V RV4       \        P                  V RV4       \        P                  V RV4       V P                  4        R# )r"   r.   r@   r   zstatus code must be integerrA   N)r/   r0   r1   r   r2   r3   r   r	   rB   r
   __post_init__)r6   r"   rA   r   r@   r    r7   s   &$$$$$r   r0   Z_ResponseBase.__init__   s     	gw''tY8i!7!Q tXx/?@t^Xl5KLk3//()FGG t]C4DEtXv6t^\Bt]K@r   c                   < V ^8  d   QhRR/# r!   r$   Nr   r(   r+   r   r,   rC      s      t r   c                s    R # )Nr   r6      &r   rD   Z_ResponseBase.__post_init__   s    r   Nc                sJ   < V ^8  d   Qh/ S[ ;R&   S[;R&   S[;R&   S[;R&   # )r!   r"   r   r@   rA   )r   r%   rB   r(   r+   r   r,   rC      s8      	 
   M   r   r   )r"   r   r@   rA   )r   r   r   r   r   r0   rD   r9   r:   r   r;   r<   r=   r>   r   r?   r?      sK     DI
 +1 %(  >  HY  r   r?   c                   s:   a  ] tR t^t o RtV 3R lR ltRtRtV tR# )r   a  An HTTP informational response.

Fields:

.. attribute:: status_code

   The status code of this response, as an integer. For an
   :class:`InformationalResponse`, this is always in the range [100,
   200).

.. attribute:: headers

   Request headers, represented as a list of (name, value) pairs. See
   :ref:`the header normalization rules <headers-format>` for
   details.

.. attribute:: http_version

   The HTTP protocol version, represented as a byte string like
   ``b"1.1"``. See :ref:`the HTTP version normalization rules
   <http_version-format>` for details.

.. attribute:: reason

   The reason phrase of this response, as a byte string. For example:
   ``b"OK"``, or ``b"Not Found"``.

c                rE   rF   r   r(   r+   r   r,   Z"InformationalResponse.__annotate__   s      t r   c                s    ^dV P                   u;8:  d   ^8  g'   M \        RP                  V P                   4      4      hR# )id   zGInformationalResponse status_code should be in range [100, 200), not {}NrA   r
   r)   rG   rH   r   rD   Z#InformationalResponse.__post_init__   s<    t''-#-$%%+VD,<,<%=  .r   Nr   	r   r   r   r   r   rD   r9   r   r;   r*      @r   r   r      s     :  Hr   c                   s:   a  ] tR t^t o RtV 3R lR ltRtRtV tR# )r   a  The beginning of an HTTP response.

Fields:

.. attribute:: status_code

   The status code of this response, as an integer. For an
   :class:`Response`, this is always in the range [200,
   1000).

.. attribute:: headers

   Request headers, represented as a list of (name, value) pairs. See
   :ref:`the header normalization rules <headers-format>` for details.

.. attribute:: http_version

   The HTTP protocol version, represented as a byte string like
   ``b"1.1"``. See :ref:`the HTTP version normalization rules
   <http_version-format>` for details.

.. attribute:: reason

   The reason phrase of this response, as a byte string. For example:
   ``b"OK"``, or ``b"Not Found"``.

c                rE   rF   r   r(   r+   r   r,   ZResponse.__annotate__   s      t r   c                s    ^V P                   u;8:  d   R8  g'   M \        RP                  V P                   4      4      hR# )i   i  z;Response status_code should be in range [200, 1000), not {}NrI   rG   rH   r   rD   ZResponse.__post_init__   s>    t''.$.$MTT$$  /r   Nr   rJ   rK   rL   r   r   r      s     8  Hr   c                   sN   a  ] tR tRt o RtRtR	V 3R lR lltRtV 3R ltRt	V t
R# )
r   i  a  Part of an HTTP message body.

Fields:

.. attribute:: data

   A :term:`bytes-like object` containing part of a message body. Or, if
   using the ``combine=False`` argument to :meth:`Connection.send`, then
   any object that your socket writing code knows what to do with, and for
   which calling :func:`len` returns the number of bytes that will be
   written -- see :ref:`sendfile` for details.

.. attribute:: chunk_start

   A marker that indicates whether this data object is from the start of a
   chunked transfer encoding chunk. This field is ignored when when a Data
   event is provided to :meth:`Connection.send`: it is only valid on
   events emitted from :meth:`Connection.next_event`. You probably
   shouldn't use this attribute at all; see
   :ref:`chunk-delimiters-are-bad` for details.

.. attribute:: chunk_end

   A marker that indicates whether this data object is the last for a
   given chunked transfer encoding chunk. This field is ignored when when
   a Data event is provided to :meth:`Connection.send`: it is only valid
   on events emitted from :meth:`Connection.next_event`. You probably
   shouldn't use this attribute at all; see
   :ref:`chunk-delimiters-are-bad` for details.

c                s0   < V ^8  d   QhRS[ RS[RS[RR/# )r!   datachunk_start	chunk_endr$   Nr%   r'   r(   r+   r   r,   Data.__annotate__+  s-     9 99(,9AE9	9r   c                s    \         P                  V R V4       \         P                  V RV4       \         P                  V RV4       R# )rM   rN   rO   N)r2   r3   )r6   rM   rN   rO   s   &&&&r   r0   ZData.__init__+  s:     	4.4<4i8r   Nc                s>   < V ^8  d   Qh/ S[ ;R&   S[;R&   S[;R&   # )r!   rM   rN   rO   rP   r(   r+   r   r,   rQ     s0     H KI J K L OM r   r   )rM   rN   rO   )FF)r   r   r   r   r   r   r0   r9   r:   r   r;   rK   rL   r   r   r     s+     @ 5I9 9 Ha  r   c                   sb   a a ] tR tRt oRtRtRRRR/V3R lV 3R llltRtV3R	 ltR
t	Vt
V ;t# )r   i;  aJ  The end of an HTTP message.

Fields:

.. attribute:: headers

   Default value: ``[]``

   Any trailing headers attached to this message, represented as a list of
   (name, value) pairs. See :ref:`the header normalization rules
   <headers-format>` for details.

   Must be empty unless ``Transfer-Encoding: chunked`` is in use.

r"   Nr    Fc                s   < V ^8  d   QhRS[ S[S[S[S[S[3,          ,          S[S[S[S[3,          ,          R3,          RS[RR/# )r!   r"   Nr    r$   )r   r   r   r   r%   r&   r'   r(   r+   r   r,   EndOfMessage.__annotate__Q  sW     5 5 T%u-.U38_0EtK
5 5 
5r   c               s   < \         SV `  4        Vf   \        . 4      pM"\        V\        4      '       g   \	        WR7      p\
        P                  V RV4       R # )Nr.   r"   )r/   r0   r   r1   r   r2   r3   )r6   r"   r    r7   s   &$$r   r0   ZEndOfMessage.__init__Q  sG     	?bkGGW--,WFG4G4r   c                s&   < V ^8  d   Qh/ S[ ;R&   # )r!   r"   )r   r(   r+   r   r,   rR   ;  s     ( ) r   r   )r"   r8   r=   r>   r   r   r   ;  s>       I5
 5 5 5" HO  r   )r   c                   s    ] tR tRtRtRtR# )r   ie  a)  This event indicates that the sender has closed their outgoing
connection.

Note that this does not necessarily mean that they can't *receive* further
data, because TCP connections are composed to two one-way channels which
can be closed independently. See :ref:`closing` for details.

No fields.
r   N)r   r   r   r   r   r   r   r   r   r   r   e  s     	r   )r   r   r   r   r   r   r   ) ZreZabcr    Zdataclassesr   Ztypingr   r   r   Z_abnfr   r   Z_headersr   r   Z_utilr	   r
   r   Z__all__ZcompileZencoder4   r5   r   r   r?   r   r   r   r   r   r   r   r   <module>rS      s]   
  ! % % ) 5 9 9 JJv}}W-.	JJ~44W=> C  d#Te T $Tn d#+E + $+\ d#&M & $&R d#&} & $&R d#/5 / $/n d#&5 & $&R $	u 	 	r   