+
    Nj%                       ^ RI Ht ^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIHtHt ^RIHtHt ^RIHt ^R	IHt ^R
IHt ]P0                  '       d	   ^RIHtHt ]P8                  ! ]4      t]	 ! R R4      4       t ! R R]4      t R# )    )annotationsN)contextmanager)	dataclass)HTTPException)BytesIOIOBase)InvalidHeaderTimeoutError)BaseHTTPResponse)Retry)EmscriptenRequest)BaseHTTPConnectionBaseHTTPSConnectionc                  @    ] tR t^t$ R]R&   R]R&   R]R&   R]R&   R	tR
# )EmscriptenResponseintstatus_codezdict[str, str]headerszIOBase | bytesbodyr   request N)__name__
__module____qualname____firstlineno____annotations____static_attributes__r       e/data/cameron/venvs/serve_omidlab/lib/python3.14/site-packages/urllib3/contrib/emscripten/response.pyr   r      s    
r   r   c                  `  a  ] tR t^tR"R V 3R lllt]R R l4       t]P                  R R l4       t]R R l4       t]R	 R
 l4       t	]	P                  R R l4       t	R#R R llt
R R ltR$R R lltR"R R lltR R ltR R lt]R R l4       tR R ltR R lt]R R  l4       tR!tV ;t# )%EmscriptenHttpResponseWrapperc               $    V ^8  d   QhRRRRRR/# )   internal_responser   url
str | None
connection/BaseHTTPConnection | BaseHTTPSConnection | Noner   )formats   "r   __annotate__*EmscriptenHttpResponseWrapper.__annotate__   s)     ' '-' ' D	'r   c           
     	.  < R V n         R V n        RV n        Wn        W n        W0n        RV n        \        SV `!  VP                  VP                  V^ RRRR7       V P                  V P                  P                  P                  4      V n        RV n        R # )NFzHTTP/? T)r   statusrequest_urlversionversion_stringreasondecode_content)_pool_body_uncached_read_occurred	_response_url_connection_closedsuper__init__r   r   _init_lengthr   methodlength_remaininglength_is_certain)selfr$   r%   r'   	__class__s   &&&&r   r<   &EmscriptenHttpResponseWrapper.__init__   s     

',$*	%%--$00# 	 	
 !% 1 1$..2H2H2O2O P!&r   c                   V ^8  d   QhRR/# )r#   returnr&   r   )r)   s   "r   r*   r+   9   s      Z r   c                	    V P                   # Nr8   rA   s   &r   r%   !EmscriptenHttpResponseWrapper.url8   s    yyr   c                    V ^8  d   QhRRRR/# )r#   r%   r&   rE   Noner   )r)   s   "r   r*   r+   =   s      z d r   c                	    Wn         R # rG   rH   )rA   r%   s   &&r   r%   rJ   <   s    	r   c                   V ^8  d   QhRR/# )r#   rE   r(   r   )r)   s   "r   r*   r+   A   s        K  r   c                	    V P                   # rG   )r9   rI   s   &r   r'   (EmscriptenHttpResponseWrapper.connection@   s    r   c                   V ^8  d   QhRR/# )r#   rE   Retry | Noner   )r)   s   "r   r*   r+   E   s       r   c                	    V P                   # rG   _retriesrI   s   &r   retries%EmscriptenHttpResponseWrapper.retriesD   s    }}r   c                    V ^8  d   QhRRRR/# )r#   rV   rR   rE   rL   r   )r)   s   "r   r*   r+   I   s        |    r   c                	    Wn         R # rG   rT   )rA   rV   s   &&r   rV   rW   H   s	      r   c               $    V ^8  d   QhRRRRRR/# r#   amt
int | Noner3   bool | NonerE   ztyping.Generator[bytes]r   )r)   s   "r   r*   r+   M   s$      7B	 r   c              #  P   "    V P                  WR7      pV'       d   Vx  K!  R# 5i)a  
A generator wrapper for the read() method. A call will block until
``amt`` bytes have been read from the connection or until the
connection is closed.

:param amt:
    How much of the content to read. The generator will return up to
    much data per iteration, but may return less. This is particularly
    likely when using compressed data. However, the empty string will
    never be returned.

:param decode_content:
    If True, will attempt to decode the body based on the
    'content-encoding' header.
)r\   r3   Nread)rA   r\   r3   datas   &&& r   stream$EmscriptenHttpResponseWrapper.streamM   s%     $ 999DD
s   $&c                    V ^8  d   QhRRRR/# )r#   request_methodr&   rE   r]   r   )r)   s   "r   r*   r+   g   s     # #: #* #r   c                	   V P                   P                  R 4      pVeg    VP                  R4       Uu0 uF  p\        V4      kK  	  pp\	        V4      ^8  d   \        RV,          4      hVP                  4       pV^ 8  d   RpMRpV P                  R9   g#   ^dV P                  u;8:  d   ^8  g
   M VR8X  d   ^ pV# u upi   \         d    Rp LKi ; i)zcontent-lengthN,z8Content-Length contained multiple unmatching values (%s)HEAD)   i0  )	r   getsplitr   lenr	   pop
ValueErrorr.   )rA   rf   content_lengthvallengthslengths   &&    r   r=   *EmscriptenHttpResponseWrapper._init_lengthg   s    %)\\%5%56F%G%" 0>/C/CC/HI/H3s8/HIw<!#'13AB  ! A:!F F KK:%dkk'C''F1 J  s"   C B?4C ?C CCc               (    V ^8  d   QhRRRRRRRR/# )	r#   r\   r]   r3   r^   cache_contentboolrE   bytesr   )r)   s   "r   r*   r+      s2     &, &,&, $&, 	&,
 
&,r   c                	   V P                   '       g_   V P                  eQ   \        V P                  P                  \        4      '       d)   V P                  P                  P
                  '       d   R# V P                  4       ;_uu_ 4        \        V P                  P                  \        4      '       gZ   \        V P                  P                  4      V n        RV n	        \        V P                  P                  4      V P                  n        Ve7   V^ 8  d0   RpV P                  P                  P                  V4      pRV n        MLV P                  P                  P                  4       pV'       d   V P                  '       g   W@n        MRV n        V P                  e,   \        V P                  \        V4      ,
          ^ 4      V n        \        V4      ^ 8X  g$   V P                  '       d6   V P                  ^ 8X  d%   V P                  P                  P                  4        \         P"                  ! \$        V4      uuR R R 4       #   + '       g   i     R # ; i)Nr   TF)r:   r7   
isinstancer   r   closed_error_catcherrm   r?   r@   r   ra   r6   r5   maxclosetypingcastrx   )rA   r\   r3   rv   rb   s   &&&& r   ra   "EmscriptenHttpResponseWrapper.read   s    LLL~~%4>>..77DNN<O<O<V<V<V  ""dnn116::(+DNN,?,?(@%)-&&-dnn.A.A&B#3!8 %~~**//4/3,~~**//1 )E)E)E!%J37D0$$0(+D,A,ACI,Mq(Q%4yA~&&&4+@+@A+E ##))+;;ud+3 #"""s!   C)I
5I
A(I
0AI

I	c               $    V ^8  d   QhRRRRRR/# r[   r   )r)   s   "r   r*   r+      s(     
 

 $
 
!	
r   c              #  	N   "    V P                  W4      pV'       g   R# Vx  K"  5i)TNr`   )rA   r\   r3   rx   s   &&& r   read_chunked*EmscriptenHttpResponseWrapper.read_chunked   s#      IIc2EKs   #%c                   V ^8  d   QhRR/# r#   rE   rL   r   )r)   s   "r   r*   r+      s        d  r   c                	    V P                   '       d   V P                  '       g   R # V P                   P                  V P                  4       R V n        R # rG   )r4   r9   	_put_connrI   s   &r   release_conn*EmscriptenHttpResponseWrapper.release_conn   s9    zzz!1!1!1

T--.r   c                   V ^8  d   QhRR/# r   r   )r)   s   "r   r*   r+      s      D r   c                	&    V P                  4        R # rG   )r~   rI   s   &r   
drain_conn(EmscriptenHttpResponseWrapper.drain_conn   s    

r   c                   V ^8  d   QhRR/# )r#   rE   rx   r   )r)   s   "r   r*   r+      s     1 1e 1r   c                	b    V P                   '       d   V P                   # V P                  R R7      # )T)rv   )r5   ra   rI   s   &r   rb   "EmscriptenHttpResponseWrapper.data   s&    :::::994900r   c                   V ^8  d   QhRR/# )r#   rE   z
typing.Anyr   )r)   s   "r   r*   r+      s     ! !j !r   c                d    V P                   P                  R4      p\        P                  ! V4      # )al  
Deserializes the body of the HTTP response as a Python object.

The body of the HTTP response must be encoded using UTF-8, as per
`RFC 8529 Section 8.1 <https://www.rfc-editor.org/rfc/rfc8259#section-8.1>`_.

To use a custom JSON decoder pass the result of :attr:`HTTPResponse.data` to
your custom decoder instead.

If the body of the HTTP response is not decodable to UTF-8, a
`UnicodeDecodeError` will be raised. If the body of the HTTP response is not a
valid JSON document, a `json.JSONDecodeError` will be raised.

Read more :ref:`here <json_content>`.

:returns: The body of the HTTP response as a Python object.
zutf-8)rb   decode_jsonloads)rA   rb   s   & r   json"EmscriptenHttpResponseWrapper.json   s'    $ yy({{4  r   c                   V ^8  d   QhRR/# r   r   )r)   s   "r   r*   r+      s        t  r   c                	>   V P                   '       g   \        V P                  P                  \        4      '       d%   V P                  P                  P                  4        V P                  '       d"   V P                  P                  4        R V n        RV n         R # R # )NT)r:   rz   r7   r   r   r~   r9   rI   s   &r   r~   #EmscriptenHttpResponseWrapper.close   sj    |||$..--v66##))+  &&(#' DL r   c                   V ^8  d   QhRR/# )r#   rE   ztyping.Generator[None]r   )r)   s   "r   r*   r+      s     )( )( 6 )(r   c              #    "   ^RI HpHp Rp Rx  Rp T'       g   \        T P                  P                  \        4      '       dK   T P                  P                  P                  '       g%   T P                  P                  P                  4        T P                  4        R# \        T P                  P                  \        4      '       d;   T P                  P                  P                  '       d   T P                  4        R# R# R#   T d   p\        \	        T4      4      hRp?iT d   p\        \	        T4      4      hRp?ii ; i  T'       g   \        T P                  P                  \        4      '       dK   T P                  P                  P                  '       g%   T P                  P                  P                  4        T P                  4        i \        T P                  P                  \        4      '       d9   T P                  P                  P                  '       d   T P                  4        i i i ; i5i)z
Catch Emscripten specific exceptions thrown by fetch.py,
instead re-raising urllib3 variants, so that low-level exceptions
are not leaked in the high-level api.

On exit, release the connection back to the pool.
)_RequestError_TimeoutErrorFNT)fetchr   r   r
   strr   rz   r7   r   r   r{   r~   r   )rA   r   r   
clean_exites   &    r   r|   ,EmscriptenHttpResponseWrapper._error_catcher   s     	8
	( J  t~~22F;; NN//666NN''--/!!#
 t~~22F;;++222%%' 3 <+  	's1v&& 	(A''	(
  t~~22F;; NN//666NN''--/!!#
 t~~22F;;++222%%' 3 <sf   H>D	 H>AH>-BH>3H>	ED$$E-E.EEE
 
AH;#BH;(H;;H>)
r5   r:   r9   r4   r7   rU   r6   r8   r@   r?   )NN)i   N)NNF)r   r   r   r   r<   propertyr%   setterr'   rV   rc   r=   ra   r   r   r   rb   r   r~   r   r|   r   __classcell__)rB   s   @r   r!   r!      s    ' '2   	ZZ        ^^   4#J&,P
  1 1!*  )( )(r   r!   )!
__future__r   r   r   loggingr   
contextlibr   dataclassesr   http.clientr   ior   r   
exceptionsr	   r
   responser   
util.retryr   r   r   TYPE_CHECKING_base_connectionr   r   	getLoggerr   logr   r!   r   r   r   <module>r      sp    "    % ! 6  5 (  &	K!   {($4 {(r   