+
     h  c                  s2   ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t^ RIHt ^ RIHtHt ^RIHtHtHtHt ^RIHtHtHtHtHtHtHtHt ^RIH t H!t!H"t"H#t#H$t$H%t%H&t& ^RI'H(t( ^R	I)H*t* ^R
I+H,t,H-t-H.t.H/t/H0t0H1t1H2t2H3t3H4t4H5t5H6t6 ^RI7H8t8 ^RI9H:t:H;t; . R#Ot<RR0t=R R lt>R$R R llt?R$R R llt@R R ltAR R ltBR R ltC ! R R]	P                  ]E]E3,          4      tF ! R  R4      tG ! R! R4      tH ! R" R]	P                  ]E]E3,          4      tIR# )%i    )annotationsN)Mapping)Cookie	CookieJar)
ByteStreamUnattachedStreamencode_requestencode_response)SUPPORTED_DECODERSByteChunkerContentDecoderIdentityDecoderLineDecoderMultiDecoderTextChunkerTextDecoder)CookieConflictHTTPStatusErrorRequestNotReadResponseNotReadStreamClosedStreamConsumedrequest_context)(get_multipart_boundary_from_content_type)codes)AsyncByteStreamCookieTypesHeaderTypesQueryParamTypesRequestContentRequestDataRequestExtensionsRequestFilesResponseContentResponseExtensionsSyncByteStream)URL)to_bytes_or_strto_strCookiesHeadersRequestResponseZauthorizationzproxy-authorizationc                    V ^8  d   QhRRRR/# )   encodingstrreturnbool format   "2/usr/lib/python3.14/site-packages/httpx/_models.py__annotate__r6   8   s            c                sX     \         P                  ! V 4       R#   \         d     R# i ; i)z/
Return `True` if `encoding` is a known codec.
FT)codecsZlookupZLookupErrorr-      &r5   _is_known_encodingr;   8   s,    h   s    ))c               $    V ^8  d   QhRRRRRR/# )r,   keystr | bytesr-   
str | Noner/   bytesr1   r2   r4   r5   r6   r6   C   s&     N N{ Nj NE Nr7   c                sh    \        V \        4      '       d   V # T P                  T;'       g    R4      # )z=
Coerce str/bytes into a strictly byte-wise HTTP header key.
ascii)
isinstancer@   encode)r=   r-      &&r5   _normalize_header_keyrE   C   s,     S%((3Mcjj9L9LW.MMr7   c               r<   )r,   valuer>   r-   r?   r/   r@   r1   r2   r4   r5   r6   r6   J   s"     - -; -* -PU -r7   c                s    \        V \        4      '       d   V # \        V \        4      '       g   \        R\	        V 4       24      hT P                  T;'       g    R4      # )z?
Coerce str/bytes into a strictly byte-wise HTTP header value.
z'Header value must be str or bytes, not rA   )rB   r@   r.   Z	TypeErrorZtyperC   )rF   r-   rD   r5   _normalize_header_valuerG   J   sQ     %eS!!A$u+OPP<<++G,,r7   c               r+   )r,   content_typer.   r/   r?   r1   r2   r4   r5   r6   r6   U   s     1 1c 1j 1r7   c                sj    \         P                  P                  4       pWR &   VP                  RR7      # )content-typeN)Zfailobj)emailmessageMessageZget_content_charset)rH   Zmsg   & r5   _parse_content_type_charsetrN   U   s2     --


!C&""4"00r7   c               r+   )r,   rF   r.   r/   zlist[dict[str, str]]r1   r2   r4   r5   r6   r6   ]   s     " "s "'; "r7   c                s   . pRpV P                  V4      p V '       g   V# \        P                  ! RV 4       F  p VP                  R^4      w  rERVP                  R4      /pVP                  R4       F9  p VP                  R4      w  rT P                  T4      YhP                  T4      &   K;  	  VP	                  V4       K  	  V#   \         d    TRrT Li ; i  \         d      K:  i ; i)a  
Returns a list of parsed link headers, for more info see:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link
The generic syntax of those is:
Link: < uri-reference >; param1=value1; param2="value2"
So for instance:
Link; '<http:/.../front.jpeg>; type="image/jpeg",<http://.../back.jpeg>;'
would return
    [
        {"url": "http:/.../front.jpeg", "type": "image/jpeg"},
        {"url": "http://.../back.jpeg"},
    ]
:param value: HTTP Link entity-header field
:return: list of parsed link headers
z '"z, *<Z; urlz<> '"=)stripresplit
ValueErrorappend)	rF   linksZreplace_charsZvalrP   paramslinkZparamr=   s	   &        r5   _parse_header_linksrZ   ]   s      #%EMKK&Exx&	"))C+KC syy*+\\#&E"[[-
 .3[[-GD=)* ' 	T ' L  	"r	"  s#   C7CCCC+*C+c               r+   )r,   itemsz4typing.Iterable[tuple[typing.AnyStr, typing.AnyStr]]r/   z4typing.Iterator[tuple[typing.AnyStr, typing.AnyStr]]r1   r2   r4   r5   r6   r6      s      ?9r7   c              #  s   "   V  F9  w  r\        VP                  4       4      \        9   d   \        R VR7      pW3x  K;  	  R# 5i)z[secure])Zmatch_type_ofN)r&   lowerSENSITIVE_HEADERSr%   )r[   kv   &  r5   _obfuscate_sensitive_headersra      s:      !'') 11
!<Ad
 s   AAc                  sL   ] tR t^tRtR,R R llt]R R l4       t]P                  R R l4       t]R	 R
 l4       t	R R lt
R R ltR R ltR R ltR-R R l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tR R  ltR! R" ltR# R$ ltR% R& ltR' R( ltR) R* ltR+tR# )/r(   z1
HTTP headers, as a case-insensitive multi-dict.
Nc               r<   )r,   headersHeaderTypes | Noner-   r?   r/   Noner1   r2   r4   r5   r6   Headers.__annotate__   s(     " "#" " 
	"r7   c                	s   . V n         \        V\        4      '       d   \        VP                   4      V n         M\        V\        4      '       d\   VP                  4        FF  w  r4\        W24      p\        WB4      pV P                   P                  WUP                  4       V34       KH  	  MPVeM   V FF  w  r4\        W24      p\        WB4      pV P                   P                  WUP                  4       V34       KH  	  W n
        R # N)_listrB   r(   listr   r[   rE   rG   rV   r\   	_encoding)selfrb   r-   r^   r_   Z	bytes_keyZbytes_values   &&&    r5   __init__ZHeaders.__init__   s    
 
gw''gmm,DJ))1!>	5aB

!!9oo.?"MN (  1!>	5aB

!!9oo.?"MN  
 "r7   c                   V ^8  d   QhRR/# r,   r/   r.   r1   r2   r4   r5   r6   re      s      # r7   c                s   V P                   fZ   R FL  pV P                   F(  w  r# VP                  V4       VP                  V4       K*  	  Wn          V P                   # 	  RV n         V P                   #   \         d      Kr  i ; i)zV
Header encoding is mandated as ascii, but we allow fallbacks to utf-8
or iso-8859-1.
z
iso-8859-1)rA   utf-8)ri   rawdecodeZUnicodeDecodeError)rj   r-   r=   rF      &   r5   r-   Headers.encoding   s     >>!."&((JC

8,X. #+ &.N
 ~~! / ".~~ . s   "A44BBc               r+   r,   rF   r.   r/   rd   r1   r2   r4   r5   r6   re      s      c d r7   c                	    Wn         R # rf   )ri   rj   rF   rD   r5   r-   rr      s    r7   c               rl   )r,   r/   zlist[tuple[bytes, bytes]]r1   r2   r4   r5   r6   re      s     F F. Fr7   c                sX    V P                    UUUu. uF	  w  rq1V3NK  	  uppp# u upppi )z8
Returns a list of the raw header items, as byte pairs.
)rg   )rj   Zraw_key_rF   rq   r5   ro   ZHeaders.raw   s(    
 ;?**E*%6W% *EEEs   %c               rl   )r,   r/   ztyping.KeysView[str]r1   r2   r4   r5   r6   re      s     X X* Xr7   c                	s    V P                    UUUu/ uF!  w  rq2P                  V P                  4      R bK#  	  upppP                  4       # u upppi rf   )rg   rp   r-   keysrj   rv   r=   rF   rq   r5   rw   ZHeaders.keys   s;    EIZZPZMAE

4==)4/ZPUUWWPs   'Ac               rl   )r,   r/   ztyping.ValuesView[str]r1   r2   r4   r5   r6   re      s     	$ 	$. 	$r7   c                	s   / pV P                    F_  w  r#pVP                  V P                  4      pVP                  V P                  4      pWQ9   d   W;;,          R V 2,          uu&   K[  WaV&   Ka  	  VP                  4       # ), )rg   rp   r-   valuesrj   Zvalues_dictrv   r=   rF   Zstr_keyZ	str_value   &      r5   rz   ZHeaders.values   sq    &(!ZZMAEjj/GT]]3I%$"YK(88$'0G$ ( !!##r7   c               rl   )r,   r/   ztyping.ItemsView[str, str]r1   r2   r4   r5   r6   re      s     # #1 #r7   c                s   / pV P                    F_  w  r#pVP                  V P                  4      pVP                  V P                  4      pWQ9   d   W;;,          RV 2,          uu&   K[  WaV&   Ka  	  VP                  4       # )z
Return `(key, value)` items of headers. Concatenate headers
into a single comma separated value when a key occurs multiple times.
ry   )rg   rp   r-   r[   r{   r|   r5   r[   ZHeaders.items   ss    
 ')!ZZMAEjj/GT]]3I%$"YK(88$'0G$ (   ""r7   c               rl   )r,   r/   zlist[tuple[str, str]]r1   r2   r4   r5   r6   re      s     	
 	
2 	
r7   c           	     s    V P                    UUUu. uF<  w  rpVP                  V P                  4      VP                  V P                  4      3NK>  	  uppp# u upppi )z
Return a list of `(key, value)` pairs of headers. Allow multiple
occurrences of the same key without concatenating into a single
comma separated value.
)rg   rp   r-   rx   rq   r5   multi_itemsZHeaders.multi_items   sP     "&
!+ ZZ&T]](CD!+
 	
 
s   AAc               s$    V ^8  d   QhRRRRRR/# )r,   r=   r.   default
typing.Anyr/   r1   r2   r4   r5   r6   re      s!      s Z : r7   c                s:     W,          #   \          d    Tu # i ; i)zp
Return a header value. If multiple occurrences of the header occur
then concatenate them together with commas.
)KeyError)rj   r=   r~      &&&r5   getZHeaders.get   s#    
	9 	N	s   
 c               r<   )r,   r=   r.   split_commasr0   r/   z	list[str]r1   r2   r4   r5   r6   re      s!      C t 	 r7   c                s   VP                  4       P                  V P                  4      pV P                   UUUu. uF8  w  rEpVP                  4       V8X  g   K  VP	                  V P                  4      NK:  	  ppppV'       g   V# . pV F@  p	TP                  V	P                  R4       U
u. uF  qP                  4       NK  	  up
4       KB  	  V# u upppi u up
i )z
Return a list of all header values for a given key.
If `split_commas=True` is passed, then any comma separated header
values are split into multiple return strings.
Z,)r\   rC   r-   rg   rp   extendrT   rR   )rj   r=   r   Zget_header_keyrv   item_keyZ
item_valuerz   Zsplit_valuesrF   Zitems   &&&        r5   get_listZHeaders.get_list   s     ++DMM: ,0::
+5'Z~~>1 -Jdmm,+5 	 
 ME%++c:J K:J$:J KL 
 !Ls   CC+C
c               r+   )r,   rb   rc   r/   rd   r1   r2   r4   r5   r6   re     s     ) )0 )D )r7   c                	s    \        V4      pVP                  4        F  pW 9   g   K  V P                  V4       K  	  V P                  P	                  VP                  4       R # rf   )r(   rw   Zpoprg   r   )rj   rb   r=      && r5   updateZHeaders.update  sD    '"<<>C{ " 	

'--(r7   c               rl   )r,   r/   r(   r1   r2   r4   r5   r6   re     s     5 5g 5r7   c                	s.    \        W P                  R 7      # )r9   )r(   r-   rj   r:   r5   copyZHeaders.copy  s    tmm44r7   c                    V ^8  d   QhRRRR/# )r,   r=   r.   r/   r1   r2   r4   r5   r6   re     s      s s r7   c                s0   VP                  4       P                  V P                  4      pV P                   UUUu. uF)  w  r4pWB8X  g   K  VP	                  V P                  4      NK+  	  ppppV'       d   RP                  V4      # \        V4      hu upppi )z
Return a single header value.

If there are multiple headers with the same key, then we concatenate
them with commas. See: https://tools.ietf.org/html/rfc7230#section-3.2.2
ry   )r\   rC   r-   rg   rp   joinr   )rj   r=   Znormalized_keyrv   
header_keyZheader_valuer[      &&     r5   __getitem__ZHeaders.__getitem__  s     ++DMM: 04zz
/9+|+ /L./9 	 
 99U##sm
s   B
Bc               $    V ^8  d   QhRRRRRR/# r,   r=   r.   rF   r/   rd   r1   r2   r4   r5   r6   re   0  s&     @ @s @3 @4 @r7   c                s   TP                  V P                  ;'       g    R4      pTP                  V P                  ;'       g    R4      pVP                  4       p\        V P                  4       UUUu. uF  w  pw  rxpW8X  g   K  VNK  	  p	ppp\        V	R,          4       F  pV P                  V K  	  V	'       d   V	^ ,          pW5V3V P                  V&   R# V P                  P                  W5V34       R# u upppi )z[
Set the header `key` to `value`, removing any duplicate entries.
Retains insertion order.
rn   :i   NNN)rC   ri   r\   	enumeraterg   reversedrV   )
rj   r=   rF   Zset_keyZ	set_valueZ
lookup_keyidxrv   r   Zfound_indexess
   &&&       r5   __setitem__ZHeaders.__setitem__0  s    
 **T^^66w7LL!:!:7;	]]_
 *34::)>
)>%%a1% C)> 	 
 M"-.C

3 / "C&I>DJJsOJJwI>?
s   4C:C:c               r+   )r,   r=   r.   r/   rd   r1   r2   r4   r5   r6   re   H  s        s  t  r7   c                sT   VP                  4       P                  V P                  4      p\        V P                  4       UUUu. uF"  w  pw  rEpVP                  4       V8X  g   K   VNK$  	  ppppV'       g   \        V4      h\        V4       F  pV P                  V K  	  R# u upppi )z
Remove the header `key`.
N)r\   rC   r-   r   rg   r   r   )rj   r=   Zdel_keyr   rv   r   Zpop_indexesr   r5   __delitem__ZHeaders.__delitem__H  s     ))+$$T]]3 *34::)>
)>%%a1~~7* C)> 	 
 3-K(C

3 )
s   B#%B#c               r+   )r,   r=   r   r/   r0   r1   r2   r4   r5   r6   re   Z  s     ? ?
 ?t ?r7   c                	s    VP                  4       P                  V P                  4      pY P                   UUu. uF  w  r1q1NK	  	  upp9   # u uppi rf   )r\   rC   r-   rg   )rj   r=   r   rv      &&  r5   __contains__ZHeaders.__contains__Z  s?    YY[''6
::>:iaac:>>>>s   Ac               rl   )r,   r/   ztyping.Iterator[typing.Any]r1   r2   r4   r5   r6   re   ^  s     ! !5 !r7   c                	s4    \        V P                  4       4      # rf   )Ziterrw   r   r:   r5   __iter__ZHeaders.__iter__^  s    DIIK  r7   c               rl   r,   r/   intr1   r2   r4   r5   r6   re   a  s       r7   c                	,    \        V P                  4      # rf   )lenrg   r   r:   r5   __len__ZHeaders.__len__a  s    4::r7   c               r+   )r,   otherr   r/   r0   r1   r2   r4   r5   r6   re   d  s     7 7J 74 7r7   c                	s    \        V4      pT P                   UUUu. uF	  w  r4qTT3NK  	  ppppTP                   UUUu. uF	  w  r4qTT3NK  	  pppp\        T4      \        T4      8H  #   \         d     R # i ; iu upppi u upppi F)r(   rU   rg   Zsorted)rj   r   Zother_headersrv   r=   rF   Z	self_listZ
other_list   &&      r5   __eq__ZHeaders.__eq__d  s    	#ENM 8<zzBzmae5\z	B8E8K8KL8K}quEl8K
Li F:$666  		 CLs   A* A< B*A98A9c               rl   rm   r1   r2   r4   r5   r6   re   n  s     : :# :r7   c                	s8   V P                   P                  pR pV P                  R8w  d   RV P                  : 2p\        \	        V P                  4       4      4      p\        V4      p\        V4      \        V4      8H  pV'       d   V RV: V R2# V RV: V R2# )rO   rA   z, encoding=(Z))	__class____name__r-   rh   ra   r}   dictr   )rj   
class_nameZencoding_strZas_listZas_dictZno_duplicate_keys   &     r5   __repr__ZHeaders.__repr__n  s    ^^,,
==G#((9:L3D4D4D4FGHw-LCL8 \7+l^1==Qwk,q99r7   )ri   rg   NNrf   r   )r   
__module____qualname____firstlineno____doc__rk   propertyr-   setterro   rw   rz   r[   r}   r   r   r   r   r   r   r   r   r   r   r   r   __static_attributes__r1   r7   r5   r(   r(      s    ",  0 __  F FX	$#	
,)5(@0 $?!7: :r7   c                  s    ] tR tRtRRRRRRRRRRRRR	RR
RRR/	R R lltR R lt]R R l4       tR R ltR R lt	R R lt
R R ltR R ltRtR# )r)   i~  rX   Nrb   cookiescontentdatafilesjsonstream
extensionsc               sH    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRR/# )r,   methodr.   rP   z	URL | strrX   zQueryParamTypes | Nonerb   rc   r   CookieTypes | Noner   zRequestContent | Noner   zRequestData | Noner   zRequestFiles | Noner   ztyping.Any | Noner   'SyncByteStream | AsyncByteStream | Noner   zRequestExtensions | Noner/   rd   r1   r2   r4   r5   r6   Request.__annotate__  s     8! 8!8! 8!
 '8! $8! $8! '8! !8! #8!  8! 88! -8! 
8!r7   c       	        	s^   VP                  4       V n        Vf   \        V4      M\        W#R7      V n        \	        V4      V n        Vf   / M
\        V4      V n        V'       d   \        V4      P                  V 4       V
f   V P
                  P                  R4      p\        TTTT	\        V'       d&   VP                  V P
                  P                  4      MR R7      R7      w  rJV P                  V4       Wn        \#        V
\$        4      '       d   V P'                  4        R # R # Wn        R # )N)rX   rI   )rH   )r   r   r   r   Zboundary)Zupperr   r$   rP   r(   rb   r   r   r'   set_cookie_headerr   r   r   rC   r-   _preparer   rB   r   read)rj   r   rP   rX   rb   r   r   r   r   r   r   r   rH   s   &&&$$$$$$$$$ r5   rk   ZRequest.__init__  s     lln%~3s83s3Jw' * 2"Z8HG..t4>'+||'7'7'GL,A# ".!4!4T\\5J5J!K
OG MM'" K&*--		 ." !Kr7   c               r+   r,   default_headerszdict[str, str]r/   rd   r1   r2   r4   r5   r6   r     s     @ @ @4 @r7   c                	sj   VP                  4        FH  w  r#VP                  4       R 8X  d   RV P                  9   d   K-  V P                  P                  W#4       KJ  	  . pRV P                  9   pRV P                  9   ;'       g    RV P                  9   pV'       gD   V P                  P
                  '       d(   VP                  RV P                  P                  34       V'       g#   V P                  R9   d   VP                  R4       \        W@P                  P                  ,           4      V n        R# )transfer-encodingzContent-LengthZHostzTransfer-Encodings   HostN)ZPOSTZPUTZPATCH)s   Content-Lengths   0)r[   r\   rb   
setdefaultrP   ZhostrV   Znetlocr   r(   ro   )rj   r   r=   rF   Zauto_headersZhas_hostZhas_content_lengthr   r5   r   ZRequest._prepare  s    )//1JCyy{116F$,,6VLL##C/	 2 35T\\),SS0Ct||0S 	 DHHMMM$((// :;!dkk5M&M 9:|ll.>.>>?r7   c               rl   r,   r/   r@   r1   r2   r4   r5   r6   r            r7   c                	R    \        V R 4      '       g   \        4       hV P                  # _content)hasattrr   r   r   r:   r5   r   ZRequest.content  s"    tZ(( ""}}r7   c               rl   r   r1   r2   r4   r5   r6   r     s      e r7   c                sJ   \        V R4      '       g   \        V P                  \        P                  4      '       g   Q hRP                  V P                  4      V n        \        V P                  \        4      '       g   \        V P                  4      V n        V P                  # )&
Read and return the request content.
r   r7   )r   rB   r   typingZIterabler   r   r   r   r:   r5   r   ZRequest.read  sm     tZ((dkk6??;;;;HHT[[1DMdkk:66 )7}}r7   c               rl   r   r1   r2   r4   r5   r6   r     s      U r7   c                s  "   \        V R4      '       gT   \        V P                  \        P                  4      '       g   Q hRP                  V P                   Uu. u Rj  xL
 qNK  V P                  #  LDMu upi up4      T n        \        T P                  \        4      '       d   KC  \        T P                  4      T n        L^5i)r   r   r7   N)r   rB   r   r   ZAsyncIterabler   r   r   rj   ZpartrM   r5   areadZRequest.aread  s      tZ((dkk6+?+?@@@@HHT[[%I%ITd }} &J%IJDMdkk:66 )7sB   ACA8A6
 A4!A6
$A8(C4A6
6A871C+Cc               rl   rm   r1   r2   r4   r5   r6   r     s     ; ;# ;r7   c                	s    V P                   P                  p\        V P                  4      pR V RV P                  : RV: R2# )Z<r   ry   z)>)r   r   r.   rP   r   )rj   r   rP   r`   r5   r   ZRequest.__repr__  s=    ^^,,
$((m:,abr::r7   c               rl   r,   r/   dict[str, typing.Any]r1   r2   r4   r5   r6   r          
 
3 
r7   c                	|    V P                   P                  4        UUu/ uF  w  rVR9  g   K  WbK  	  upp# u uppi )r   )r   r   Z__dict__r[   rj   namerF   r`   r5   __getstate__ZRequest.__getstate__  sE      $}}224
433 DK4
 	
 
   88c               r+   r,   stater   r/   rd   r1   r2   r4   r5   r6   r     s     ) )"7 )D )r7   c                	s|    VP                  4        F  w  r#\        WV4       K  	  / V n        \        4       V n        R # rf   )r[   setattrr   r   r   rj   r   r   rF   r   r5   __setstate__ZRequest.__setstate__  s/     ;;=KDD& )&(r7   )r   r   rb   r   r   rP   )r   r   r   r   rk   r   r   r   r   r   r   r   r   r   r1   r7   r5   r)   r)   ~  s    8!
 *.8! '+8! '+8! *.8! $(8! &*8! #'8! ;?8! 048!t@*  
;

) )r7   c                  sj   ] tR tRtRRRRRRRRRRRRR	RR
RRRRR/
R R lltR R lt]R R l4       t]P                  R R l4       t]R R l4       t	]	P                  R R l4       t	]R R l4       t
]R R l4       t]R R l4       t]R  R! l4       t]R" R# l4       t]R$ R% l4       t]P                  R& R' l4       t]R( R) l4       tR* R+ lt]R, R- l4       t]R. R/ l4       t]R0 R1 l4       t]R2 R3 l4       t]R4 R5 l4       t]R6 R7 l4       t]R8 R9 l4       tR: R; ltR< R= lt]R> R? l4       t]R@ RA l4       t]RB RC l4       tRD RE ltRF RG ltRH RI lt RJ RK lt!RcRL RM llt"RcRN RO llt#RP RQ lt$RcRR RS llt%RT RU lt&RV RW lt'RcRX RY llt(RcRZ R[ llt)R\ R] lt*RcR^ R_ llt+R` Ra lt,Rbt-R# )dr*   i  rb   Nr   texthtmlr   r   requestr   historydefault_encodingrn   c               sH    V ^8  d   QhRRRRRRRRR	RR
RRRRRRRRRRRRR/# )r,   status_coder   rb   rc   r   zResponseContent | Noner   r?   r   r   r   r   r   r   zRequest | Noner   zResponseExtensions | Noner   zlist[Response] | Noner   z#str | typing.Callable[[bytes], str]r/   rd   r1   r2   r4   r5   r6   Response.__annotate__  s     5' 5'5' $	5'
 (5' 5' 5' 5' 85'  5' .5' '5' >5' 
5'r7   c       
        	s   Wn         \        V4      V n        Wn        R V n        V	f   / M
\        V	4      V n        V
f   . M
\        V
4      V n        RV n	        RV n
        Wn        VfM   \        W4WV4      w  r'V P                  V4       Wpn        \        V\         4      '       d   V P#                  4        MWpn        ^ V n        R # )NF)r   r(   rb   _requestnext_requestr   r   rh   r   	is_closedis_stream_consumedr   r   r   r   rB   r   r   _num_bytes_downloaded)rj   r   rb   r   r   r   r   r   r   r   r   r   s   &&$$$$$$$$$$r5   rk   ZResponse.__init__  s     'w'(/ -1 * 2"Z8H$_r$w-"' 0>-gTHOGMM'" K&*--		 !K%&"r7   c               r+   r   r1   r2   r4   r5   r6   r   ;  s     0 0 04 0r7   c                	s    VP                  4        FH  w  r#VP                  4       R 8X  d   RV P                  9   d   K-  V P                  P                  W#4       KJ  	  R# )r   zcontent-lengthN)r[   r\   rb   r   )rj   r   r=   rF   r   r5   r   ZResponse._prepare;  sG    )//1JCyy{116F$,,6VLL##C/	 2r7   c               rl   )r,   r/   datetime.timedeltar1   r2   r4   r5   r6   r   C  s     
 
+ 
r7   c                sT    \        V R4      '       g   \        R4      hV P                  # )zM
Returns the time taken for the complete request/response
cycle to complete.
_elapsedzK'.elapsed' may only be accessed after the response has been read or closed.)r   RuntimeErrorr   r   r:   r5   elapsedResponse.elapsedB  s/     tZ((+  }}r7   c               r+   )r,   r   r   r/   rd   r1   r2   r4   r5   r6   r   P  s        1  d  r7   c                	rt   rf   )r   )rj   r   rD   r5   r   r   O  s    r7   c               rl   )r,   r/   r)   r1   r2   r4   r5   r6   r   T  s       r7   c                sL    V P                   f   \        R4      hV P                   # )zB
Returns the request instance associated to the current response.
z7The request instance has not been set on this response.)r   r   r   r:   r5   r   Response.requestS  s*    
 == I  }}r7   c               r+   )r,   rF   r)   r/   rd   r1   r2   r4   r5   r6   r   _  s      W  r7   c                	rt   rf   )r   ru   rD   r5   r   r   ^  s    r7   c               rl   rm   r1   r2   r4   r5   r6   r   c  s     A Ac Ar7   c                	st     V P                   R ,          pVP                  RRR7      #   \         d     R# i ; i)http_versionrA   ignoreZerrorszHTTP/1.1)r   rp   r   )rj   r   rM   r5   r   ZResponse.http_versionb  sB    	A"&//."AL  &&wx&@@  		s   ( 77c               rl   rm   r1   r2   r4   r5   r6   r   l  s     B Bs Br7   c                	s     V P                   R ,          pVP                  RRR7      #   \         d$    \        P                  ! T P
                  4      u # i ; i)reason_phraserA   r   r   )r   rp   r   r   Zget_reason_phraser   )rj   r   rM   r5   r   ZResponse.reason_phrasek  sV    	B#'???#CM !'''AA  	=**4+;+;<<	=s   ( +AAc               rl   )r,   r/   r$   r1   r2   r4   r5   r6   r   u  s        S  r7   c                s.    V P                   P                  # )z1
Returns the URL for which the request was made.
)r   rP   r   r:   r5   rP   ZResponse.urlt  s    
 ||r7   c               rl   r   r1   r2   r4   r5   r6   r   |  r   r7   c                	r   r   )r   r   r   r   r:   r5   r   ZResponse.content{  s"    tZ((!##}}r7   c               rl   rm   r1   r2   r4   r5   r6   r     s      c r7   c                	sJ   \        V R 4      '       g   V P                  pV'       g   RV n        V P                  # \        V P                  ;'       g    RR7      pRP                  VP                  V P                  4      VP                  4       .4      V n        V P                  # )_textrO   rn   r9   )r   r   r   r   r-   r   rp   flush)rj   r   decoderr`   r5   r   ZResponse.text  sx    tW%%llG
 zz &t}}/G/GHWWgnnT\\&BGMMO%TU
zzr7   c               rl   r,   r/   r?   r1   r2   r4   r5   r6   r     s      * r7   c                sV   \        V R4      '       g   V P                  pVe   \        V4      '       g[   \        V P                  \
        4      '       d   V P                  pM-\        V R4      '       d   V P	                  V P                  4      pT;'       g    RV n        V P                  # )a  
Return an encoding to use for decoding the byte content into text.
The priority for determining this is given by...

* `.encoding = <>` has been set explicitly.
* The encoding as specified by the charset parameter in the Content-Type header.
* The encoding as determined by `default_encoding`, which may either be
  a string like "utf-8" indicating the encoding to use, or may be a callable
  which enables charset autodetection.
ri   r   rn   )r   charset_encodingr;   rB   r   r.   r   ri   )rj   r-   rM   r5   r-   Response.encoding  s     t[)),,H'9('C'Cd33S99#44HT:..#44T]]CH%00DN~~r7   c               r+   rs   r1   r2   r4   r5   r6   r     s      c d r7   c                sL    \        V R4      '       d   \        R4      hWn        R# )z
Set the encoding to use for decoding the byte content into text.

If the `text` attribute has been accessed, attempting to set the
encoding will throw a ValueError.
r   z?Setting encoding after `text` has been accessed is not allowed.N)r   rU   ri   ru   rD   r5   r-   r     s(     4!!Q  r7   c               rl   r   r1   r2   r4   r5   r6   r     s     9 9* 9r7   c                sZ    V P                   P                  R4      pVf   R# \        V4      # )z?
Return the encoding, as specified by the Content-Type header.
zContent-TypeN)rb   r   rN   )rj   rH   rM   r5   r   ZResponse.charset_encoding  s,    
 ||''7*<88r7   c               rl   )r,   r/   r
   r1   r2   r4   r5   r6   r     s      n r7   c                s   \        V R4      '       g   . pV P                  P                  RRR7      pV FE  pVP                  4       P	                  4       p \
        V,          pVP                  V! 4       4       KG  	  \        V4      ^8X  d   V^ ,          V n	        V P                  # \        V4      ^8  d   \        VR7      V n	        V P                  # \        4       V n	        V P                  #   \         d     K  i ; i)z
Returns a decoder instance which can be used to decode the raw byte
content, depending on the Content-Encoding used in the response.
_decoderzcontent-encodingT)r   )Zchildren)r   rb   r   rR   r\   r   rV   r   r   r   r   r   )rj   Zdecodersrz   rF   Zdecoder_clss   &    r5   _get_content_decoderZResponse._get_content_decoder  s    
 tZ((-/H\\**+=D*QF++-"4U";KOOKM2	   8}! ( }} X" ,h ? }} !0 1}}   s   #C//C>=C>c               rl   r,   r/   r0   r1   r2   r4   r5   r6   r     s     8 8$ 8r7   c                B    \         P                  ! V P                  4      # )zE
A property which is `True` for 1xx status codes, `False` otherwise.
)r   is_informationalr   r   r:   r5   r   ZResponse.is_informational  s    
 %%d&6&677r7   c               rl   r   r1   r2   r4   r5   r6   r     s     2 2D 2r7   c                r   )zE
A property which is `True` for 2xx status codes, `False` otherwise.
)r   
is_successr   r   r:   r5   r   ZResponse.is_success  s    
  0 011r7   c               rl   r   r1   r2   r4   r5   r6   r     s     	3 	3T 	3r7   c                r   )z
A property which is `True` for 3xx status codes, `False` otherwise.

Note that not all responses with a 3xx status code indicate a URL redirect.

Use `response.has_redirect_location` to determine responses with a properly
formed URL redirection.
)r   is_redirectr   r   r:   r5   r   ZResponse.is_redirect  s       !1!122r7   c               rl   r   r1   r2   r4   r5   r6   r          7 7 7r7   c                r   )zE
A property which is `True` for 4xx status codes, `False` otherwise.
)r   is_client_errorr   r   r:   r5   r   ZResponse.is_client_error      
 $$T%5%566r7   c               rl   r   r1   r2   r4   r5   r6   r     r   r7   c                r   )zE
A property which is `True` for 5xx status codes, `False` otherwise.
)r   is_server_errorr   r   r:   r5   r  ZResponse.is_server_error  r  r7   c               rl   r   r1   r2   r4   r5   r6   r     s     0 0$ 0r7   c                r   )zM
A property which is `True` for 4xx and 5xx status codes, `False` otherwise.
)r   is_errorr   r   r:   r5   r  ZResponse.is_error  s    
 ~~d..//r7   c               rl   r   r1   r2   r4   r5   r6   r     s     
 
t 
r7   c                s    V P                   \        P                  \        P                  \        P                  \        P
                  \        P                  39   ;'       d    RV P                  9   # )z[
Returns True for 3xx responses with a properly formed URL redirection,
`False` otherwise.
ZLocation)r   r   ZMOVED_PERMANENTLYZFOUNDZ	SEE_OTHERZTEMPORARY_REDIRECTZPERMANENT_REDIRECTrb   r   r:   r5   has_redirect_locationZResponse.has_redirect_location  s_      ''(((( + + dll*	
r7   c               rl   )r,   r/   r*   r1   r2   r4   r5   r6   r     s     #G #G( #Gr7   c                s*   V P                   pVf   \        R4      hV P                  '       d   V # V P                  '       d   RpMRpV P                  ^d,          p^R^R^R^R/pVP                  VR4      pVP                  WR	7      p\        W!V R
7      h)z.
Raise the `HTTPStatusError` if one occurred.
zYCannot call `raise_for_status` as the request instance has not been set on this response.z{error_type} '{0.status_code} {0.reason_phrase}' for url '{0.url}'
Redirect location: '{0.headers[location]}'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/{0.status_code}z{error_type} '{0.status_code} {0.reason_phrase}' for url '{0.url}'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/{0.status_code}zInformational responsezRedirect responsezClient errorzServer errorzInvalid status code)
error_type)r   response)r   r   r   r  r   r   r3   r   )rj   r   rK   Zstatus_classZerror_typesr  r   r5   raise_for_statusZResponse.raise_for_status  s     --?> 
 ???K%%%w w 
 ''3.'"~~	
 !__\3HI
...=gFFr7   c               r   )r,   kwargsr   r/   r1   r2   r4   r5   r6   r   ?  s     5 5Z 5J 5r7   c                	sD    \         P                  ! V P                  3/ VB # rf   )jsonlibZloadsr   )rj   r  s   &,r5   r   ZResponse.json?  s    }}T\\4V44r7   c               rl   )r,   r/   r'   r1   r2   r4   r5   r6   r   C  s       r7   c                	s    \        V R 4      '       g+   \        4       V n        V P                  P                  V 4       V P                  # )_cookies)r   r'   r
  extract_cookiesr   r:   r5   r   ZResponse.cookiesB  s4    tZ((#IDMMM))$/}}r7   c               rl   )r,   r/   z dict[str | None, dict[str, str]]r1   r2   r4   r5   r6   r   J  s     
 
7 
r7   c                s    V P                   P                  R4      pVf   / # \        V4       Uu/ uF.  pVP                  R4      ;'       g    VP                  R4      VbK0  	  up# u upi )z9
Returns the parsed header links of the response, if any
rY   ZrelrP   )rb   r   rZ   )rj   ZheaderrY   r`   r5   rW   ZResponse.linksI  sk    
 !!&)>I ,F3
3 XXe_//$63
 	
 
s   A&A&c               rl   r   r1   r2   r4   r5   r6   r   X  s     * *c *r7   c                	s    V P                   # rf   )r   r   r:   r5   num_bytes_downloadedZResponse.num_bytes_downloadedW  s    )))r7   c               rl   rm   r1   r2   r4   r5   r6   r   [  s     G G# Gr7   c                	s<    R V P                    RV P                   R2# )z<Response [Z ]>)r   r   r   r:   r5   r   ZResponse.__repr__[  s%    T--.a0B0B/C2FFr7   c               rl   r   r1   r2   r4   r5   r6   r   ^  r   r7   c                	r   )r   )r   r   r   r   r   r   r`   r5   r   ZResponse.__getstate__^  sE      $}}224
4LL DK4
 	
 
r   c               r+   r   r1   r2   r4   r5   r6   r   e  s     ) )"7 )D )r7   c                	s    VP                  4        F  w  r#\        WV4       K  	  R V n        / V n        \	        4       V n        R# )TN)r[   r   r   r   r   r   r   r   r5   r   ZResponse.__setstate__e  s6     ;;=KDD& )&(r7   c               rl   r   r1   r2   r4   r5   r6   r   l  s      e r7   c                s    \        V R4      '       g%   RP                  V P                  4       4      V n        V P                  # )'
Read and return the response content.
r   r7   )r   r   
iter_bytesr   r   r:   r5   r   ZResponse.readl  s2     tZ((HHT__%67DM}}r7   c               r+   r,   
chunk_size
int | Noner/   ztyping.Iterator[bytes]r1   r2   r4   r5   r6   r   t  s        Z  ;Q  r7   c              #  s  "   \        V R4      '       df   Vf   \        V P                  4      MTp\        ^ \        V P                  4      \	        V^4      4       F  pV P                  W"V,            x  K  	  R# V P                  4       p\        VR7      p\        V P                  R7      ;_uu_ 4        V P                  4        F0  pVP                  V4      pVP                  V4       F  pVx  K	  	  K2  	  VP                  4       pVP                  V4       F  pVx  K	  	  VP                  4        F  pVx  K	  	  RRR4       R#   + '       g   i     R# ; i5iz
A byte-iterator over the decoded response content.
This allows us to handle gzip, deflate, brotli, and zstd encoded responses.
r   Nr  r   )r   r   r   rangemaxr   r	   r   r   iter_rawrp   r   rj   r  Zir   chunkerZ	raw_bytesZdecodedchunkr   r5   r  ZResponse.iter_bytest  s    
 4$$/9/AT]]+zJ1c$--0#j!2DEmmAJ77 F //1G!Z8G 77!%I%nnY7G!(!8# "9 "1 "--/$^^G4EK 5$]]_EK - 8777s   B2E4BE
 
E
E		Ec               r+   )r,   r  r  r/   typing.Iterator[str]r1   r2   r4   r5   r6   r     s      J :N r7   c              #  s  "   \        V P                  ;'       g    RR7      p\        VR7      p\        V P                  R7      ;_uu_ 4        V P                  4        F0  pVP                  V4      pVP                  V4       F  pVx  K	  	  K2  	  VP                  4       pVP                  V4       F  pVx  K	  	  VP                  4        F  pVx  K	  	  RRR4       R#   + '       g   i     R# ; i5iz
A str-iterator over the decoded response content
that handles both gzip, deflate, etc but also detects the content's
string encoding.
rn   r9   r  r  N)r   r-   r   r   r   r  rp   r   rj   r  r   r  Zbyte_contentZtext_contentr  r   r5   	iter_textZResponse.iter_text  s      t}}'?'?@4T]]33 $ 1&~~l;$^^L9EK : !2 #==?L 5 6  ) 4333s   AC7BC#
C7#C4	.	C7c               rl   r,   r/   r  r1   r2   r4   r5   r6   r     s      0 r7   c              #  	s4  "   \        4       p\        V P                  R 7      ;_uu_ 4        V P                  4        F  pVP	                  V4       F  pVx  K	  	  K!  	  VP                  4        F  pVx  K	  	  RRR4       R#   + '       g   i     R# ; i5ir  N)r   r   r   r  rp   r   rj   r   r   Zlinerq   r5   
iter_linesZResponse.iter_lines  si     -T]]33(#NN40DJ 1 )  
 (	 4333s   )BAB:
BB		Bc               r+   r  r1   r2   r4   r5   r6   r     s      : 9O r7   c              #  st  "   V P                   '       d   \        4       hV P                  '       d   \        4       h\	        V P
                  \        4      '       g   \        R4      hRV n         ^ V n        \        VR7      p\        V P                  R7      ;_uu_ 4        V P
                   FA  pV ;P                  \        V4      ,          un        VP                  V4       F  pVx  K	  	  KC  	  RRR4       VP                  4        F  pVx  K	  	  V P                  4        R#   + '       g   i     L=; i5i)0
A byte-iterator over the raw response content.
z5Attempted to call a sync iterator on an async stream.Tr  r  N)r   r   r   r   rB   r   r#   r   r   r	   r   r   r   rp   r   closerj   r  r  Zraw_stream_bytesr     &&   r5   r  ZResponse.iter_raw  s      """ "">>>. $++~66VWW"&%&"4T]]33$(KK **c2B.CC*$^^,<=EK > %0 4 ]]_EK % 	

 43s$   .D8A-D8AD%05D8%D5	0D8c               rl   r,   r/   rd   r1   r2   r4   r5   r6   r     s     $ $t $r7   c                s<   \        V P                  \        4      '       g   \        R4      hV P                  '       gK   RV n        \        V P                  R7      ;_uu_ 4        V P                  P                  4        RRR4       R# R#   + '       g   i     R# ; i)q
Close the response and release the connection.
Automatically called if the response body is read to completion.
z3Attempted to call an sync close on an async stream.Tr  N)rB   r   r#   r   r   r   r   r%  r   r:   r5   r%  ZResponse.close  sg    
 $++~66TUU~~~!DN 77!!# 87 777s   #B

B	c               rl   r   r1   r2   r4   r5   r6   r     s      U r7   c                s   "   \        V R4      '       g,   RP                  V P                  4        Uu. u Rj  xL
 qNK  V P                  #  LDMu upi up4      T n        L"5i)r  r   r7   N)r   r   aiter_bytesr   r   rM   r5   r   ZResponse.aread  sK      tZ((HHT=M=M=O%P%PTd}} &Q%PQDMs6   0A"AA
AA
A A"A
AA"c               r+   r,   r  r  r/   ztyping.AsyncIterator[bytes]r1   r2   r4   r5   r6   r     s        $ 	$ r7   c               s  "   \        V R4      '       dg   Vf   \        V P                  4      MTp\        ^ \        V P                  4      \	        V^4      4       F  pV P                  W"V,            5x  K  	  R# V P                  4       p\        VR7      p\        V P                  R7      ;_uu_ 4        V P                  4         Rj  xL
  pVP                  V4      pVP                  V4       F  pV5x  K
  	  K:   L5D6TP                  4       pTP                  T4       F  pT5x  K
  	  TP                  4        F  pT5x  K
  	  RRR4       R#   + '       g   i     R# ; i5ir  )r   r   r   r  r  r   r	   r   r   	aiter_rawrp   r   r  r   r5   r*  ZResponse.aiter_bytes  s     4$$/9/AT]]+zJ1c$--0#j!2DEmmAJ77 F //1G!Z8G 77'+~~'7 $ $)%nnY7G!(!8# "9$'7 "--/$^^G4EK 5$]]_EK - 8777sC   B3E*5ED
D 
D2E DA
E
E*E'	!	E*c               r+   )r,   r  r  r/   typing.AsyncIterator[str]r1   r2   r4   r5   r6   r     s      $	"r7   c               s  "   \        V P                  ;'       g    RR7      p\        VR7      p\        V P                  R7      ;_uu_ 4        V P                  4         Rj  xL
  pVP                  V4      pVP                  V4       F  pV5x  K
  	  K:   L5D6TP                  4       pTP                  T4       F  pT5x  K
  	  TP                  4        F  pT5x  K
  	  RRR4       R#   + '       g   i     R# ; i5ir  )r   r-   r   r   r   r*  rp   r   r  r   r5   
aiter_textZResponse.aiter_text  s      t}}'?'?@4T]]33&*&6&6&8    l&~~l;$^^L9EK : &8 #==?L 5 6  ) 4333sC   ADC.B"B
#B&2C.BA
C.$
D.C?	9	Dc               rl   )r,   r/   r-  r1   r2   r4   r5   r6   r     s      #< r7   c               	sH  "   \        4       p\        V P                  R 7      ;_uu_ 4        V P                  4         Rj  xL
  pVP	                  V4       F  pV5x  K
  	  K)   L$D%TP                  4        F  pT5x  K
  	  RRR4       R#   + '       g   i     R# ; i5ir!  )r   r   r   r.  rp   r   r"  rq   r5   aiter_linesZResponse.aiter_lines  sv     -T]]33"oo/  d#NN40DJ 1/  
 (	 4333s?   )B"BA' A%
A'!B%A''B
B"B		B"c               r+   r+  r1   r2   r4   r5   r6   r     s      $	$r7   c               s  "   V P                   '       d   \        4       hV P                  '       d   \        4       h\	        V P
                  \        4      '       g   \        R4      hRV n         ^ V n        \        VR7      p\        V P                  R7      ;_uu_ 4        V P
                    Rj  xL
  pV ;P                  \        V4      ,          un        VP                  V4       F  pV5x  K
  	  KK   LFDG RRR4       M  + '       g   i     M; iTP                  4        F  pT5x  K
  	  T P                  4       G Rj  xL 
  R# 5i)r$  z6Attempted to call an async iterator on an sync stream.Tr  r  N)r   r   r   r   rB   r   r   r   r   r	   r   r   r   rp   r   acloser&  r'  r5   r,  ZResponse.aiter_raw  s      """ "">>>. $++77WXX"&%&"4T]]33*.++    &**c2B.CC*$^^,<=EK > + 4333 ]]_EK % kkmsT   .EA-ED+C8/C6
0C83AD6C88D:	ED	7EEEc               rl   r(  r1   r2   r4   r5   r6   r   )  s     + +d +r7   c                sX  "   \        V P                  \        4      '       g   \        R4      hV P                  '       gS   RV n        \        V P                  R7      ;_uu_ 4        V P                  P                  4       G Rj  xL
  RRR4       R# R#  L  + '       g   i     R# ; i5i)r)  z3Attempted to call an async close on an sync stream.Tr  N)rB   r   r   r   r   r   r   r0  r   r:   r5   r0  ZResponse.aclose)  sv     
 $++77TUU~~~!DN 77kk((*** 87  + 877s5   =B* %B*%BBBB*BB'	!	B*)r   r
  r   r   ri   r   r   r   r   r   rb   r   r   r   r   r   r   rf   ).r   r   r   r   rk   r   r   r   r   r   r   r   rP   r   r   r-   r   r   r   r   r   r   r  r  r  r  r   r   rW   r  r   r   r   r   r  r  r#  r  r%  r   r*  r.  r/  r,  r0  r   r1   r7   r5   r*   r*     s   5' '+	5'
 +/5'  5'  5'  5' ;?5' #'5' 155' *.5' AH5'n0 
 
 ^^      ^^  A A B B      
    * __  9 92 8 8 2 2 	3 	3 7 7 7 7 0 0 
 
,#GJ5   
 
 * *G
) .&4$ 2*8+ +r7   c                  s8   ] tR tRtRtR'R R lltR R ltR R	 ltR(R
 R lltR)R R llt	R*R R l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tR R ltR R ltR R ltR  R! lt ! R" R#]P*                  P,                  4      t ! R$ R%4      tR&tR# )+r'   i7  z%
HTTP Cookies, as a mutable mapping.
Nc               r+   r,   r   r   r/   rd   r1   r2   r4   r5   r6   Cookies.__annotate__<  s       2 d r7   c                	s   Ve   \        V\        4      '       dT   \        4       V n        \        V\        4      '       d-   VP	                  4        F  w  r#V P                  W#4       K  	  R # R # \        V\        4      '       d.   \        4       V n        V F  w  r#V P                  W#4       K  	  R # \        V\        4      '       d@   \        4       V n        VP                   F  pV P                  P                  V4       K   	  R # Wn        R # rf   )	rB   r   r   jarr[   setrh   r'   
set_cookie)rj   r   r=   rF   cookier'  r5   rk   ZCookies.__init__<  s    ?j$77 {DH'4((")--/JCHHS( #2 ) && {DH%
$ &)) {DH!++##F+ & Hr7   c               r+   r,   r  r*   r/   rd   r1   r2   r4   r5   r6   r2  M  s     B B BT Br7   c                s    V P                  V4      pV P                  VP                  4      pV P                  P	                  W#4       R# )z?
Loads any cookies based on the response `Set-Cookie` headers.
N)_CookieCompatResponse_CookieCompatRequestr   r3  r  )rj   r  Zurllib_responseurllib_requestr   r5   r  ZCookies.extract_cookiesM  s<     44X>2283C3CD  Ar7   c               r+   r,   r   r)   r/   rd   r1   r2   r4   r5   r6   r2  V  s     3 3 3T 3r7   c                s^    V P                  V4      pV P                  P                  V4       R# )z=
Sets an appropriate 'Cookie:' HTTP header on the `Request`.
N)r9  r3  Zadd_cookie_header)rj   r   r:  r   r5   r   ZCookies.set_cookie_headerV  s&     227;"">2r7   c          
     s,    V ^8  d   QhRRRRRRRRRR/# )r,   r   r.   rF   domainpathr/   rd   r1   r2   r4   r5   r6   r2  ]  s/     $ $ $C $ $ $t $r7   c                s   / R^ bRVbRVbRRbRRbRVbR	\        V4      bR
VP                  R4      bRVbR\        V4      bRRbRRbRRbRRbRRbRRR/bRRbp\        R/ VB pV P                  P	                  V4       R# )zE
Set a cookie value by name. May optionally include domain and path.
Zversionr   rF   ZportNZport_specifiedFr<  Zdomain_specifiedZdomain_initial_dotZ.r=  Zpath_specifiedZsecureZexpiresZdiscardTZcommentZcomment_urlZrestZHttpOnlyZrfc2109r1   )r0   Z
startswithr   r3  r5  )rj   r   rF   r<  r=  r  r6  s   &&&&&  r5   r4  ZCookies.set]  s
   
q
D
 U
 D	

 e
 f
 V
 !&"3"3C"8
 D
 d4j
 e
 t
 t
 t
 4
  Z&!
" u#
& !&!F#r7   c          
     s,    V ^8  d   QhRRRRRRRRRR/# )r,   r   r.   r~   r?   r<  r=  r/   r1   r2   r4   r5   r6   r2  w  s<        	
  
r7   c                s    RpV P                    Fd  pVP                  V8X  g   K  Ve   VP                  V8X  g   K-  Ve   VP                  V8X  g   KD  Ve   RV 2p\	        V4      hVP
                  pKf  	  Vf   V# V# )zt
Get a cookie by name. May optionally include domain and path
in order to specify exactly which cookie to retrieve.
Nz!Multiple cookies exist with name=)r3  r   r<  r=  r   rF   )rj   r   r~   r<  r=  rF   r6  rK   s   &&&&&   r5   r   ZCookies.getw  sz     hhF{{d">V]]f%<|v{{d': ,(I$&PG"0"99 &  =Nr7   c               s(    V ^8  d   QhRRRRRRRR/# )r,   r   r.   r<  r?   r=  r/   rd   r1   r2   r4   r5   r6   r2    s8     D DD D 	D
 
Dr7   c                s   Ve!   Ve   V P                   P                  W#V4      # V P                    Uu. uFF  pVP                  V8X  g   K  Ve   VP                  V8X  g   K-  Ve   VP                  V8X  g   KD  VNKH  	  ppV F>  pV P                   P                  VP                  VP                  VP                  4       K@  	  R# u upi )zu
Delete a cookie by name. May optionally include domain and path
in order to specify exactly which cookie to delete.
N)r3  clearr   r<  r=  )rj   r   r<  r=  r6  Zremoves   &&&&  r5   deleteZCookies.delete  s     $"288>>&55 ((
"{{d"  6==F#:  !4	 F" 	 
 FHHNN6==&++v{{C 
s   CC"C9Cc               r   )r,   r<  r?   r=  r/   rd   r1   r2   r4   r5   r6   r2    s!      J Z 4 r7   c                s    . pVe   VP                  V4       Ve   Vf   Q hVP                  V4       V P                  P                  ! V!   R# )zo
Delete all cookies. Optionally include a domain and path in
order to only delete a subset of all the cookies.
N)rV   r3  r>  )rj   r<  r=  Zargss   &&& r5   r>  ZCookies.clear  sI    
 KK%%%KKr7   c               r+   r1  r1   r2   r4   r5   r6   r2    s     ( (0 (D (r7   c                	sx    \        V4      pVP                   F  pV P                  P                  V4       K   	  R # rf   )r'   r3  r5  )rj   r   r6  r   r5   r   ZCookies.update  s,    '"kkFHH' "r7   c               r   )r,   r   r.   rF   r/   rd   r1   r2   r4   r5   r6   r2    s!     % % %C %D %r7   c                	s$    V P                  W4      # rf   )r4  r   r   r5   r   ZCookies.__setitem__  s    xx$$r7   c               r   )r,   r   r.   r/   r1   r2   r4   r5   r6   r2    s        r7   c                	sF    V P                  V4      pVf   \        V4      hV# rf   )r   r   r   r   r5   r   ZCookies.__getitem__  s#    =4. r7   c               r+   )r,   r   r.   r/   rd   r1   r2   r4   r5   r6   r2    s     ! ! ! !r7   c                	s$    V P                  V4      # rf   )r?  )rj   r   rD   r5   r   ZCookies.__delitem__  s    {{4  r7   c               rl   r   r1   r2   r4   r5   r6   r2    s       r7   c                	r   rf   )r   r3  r   r:   r5   r   ZCookies.__len__  s    488}r7   c               rl   r   r1   r2   r4   r5   r6   r2    s     4 4. 4r7   c                	s(    R  V P                    4       # )c              3  s8   "   T F  qP                   x  K  	  R # 5irf   )r   )Z.0r6  rM   r5   Z	<genexpr>Z#Cookies.__iter__.<locals>.<genexpr>  s     3((s   r3  r   r:   r5   r   ZCookies.__iter__  s    3$((33r7   c               rl   r   r1   r2   r4   r5   r6   r2    s      $ r7   c                	s.    V P                    F  p R # 	  R# )TFr@  )rj   rv   rM   r5   __bool__ZCookies.__bool__  s    A r7   c               rl   rm   r1   r2   r4   r5   r6   r2    s     , ,# ,r7   c                	s    R P                  V P                   Uu. uF-  pRVP                   RVP                   RVP                   R2NK/  	  up4      pRV R2# u upi )ry   z<Cookie rQ   z for z />z	<Cookies[r  )r   r3  r   rF   r<  )rj   r6  Zcookies_reprr`   r5   r   ZCookies.__repr__  sh    yy #hh&F 6;;-qeFMM?#N&
 <.++s   3Ac                  sD   a  ] tR tRtRtR V 3R lltR V 3R lltRtV ;t# )Cookies._CookieCompatRequesti  j
Wraps a `Request` instance up in a compatibility interface suitable
for use with `CookieJar` operations.
c               r+   r;  r1   r2   r4   r5   r6   )Cookies._CookieCompatRequest.__annotate__  s     	# 	#G 	# 	#r7   c                	s   < \         SV `  \        VP                  4      \	        VP
                  4      VP                  R 7       Wn        R# ))rP   rb   r   N)superrk   r.   rP   r   rb   r   r   )rj   r   r   s   &&r5   rk   Z%Cookies._CookieCompatRequest.__init__  s;    G$W__-~~  
 #Lr7   c               r   r   r1   r2   r4   r5   r6   rD    s!     	. 	.s 	.3 	.4 	.r7   c                	sV   < \         SV `  W4       W P                  P                  V&   R # rf   )rE  add_unredirected_headerr   rb   )rj   r=   rF   r   s   &&&r5   rF  Z4Cookies._CookieCompatRequest.add_unredirected_header  s"    G+C7(-LL  %r7   r  )	r   r   r   r   r   rk   rF  r   Z__classcell__)r   s   @r5   r9  rB    s    	
	# 	#	. 	.r7   r9  c                  s2    ] tR tRtRtR R ltR R ltRtR# )	Cookies._CookieCompatResponsei  rC  c               r+   r7  r1   r2   r4   r5   r6   *Cookies._CookieCompatResponse.__annotate__  s     	% 	%X 	%$ 	%r7   c                	rt   rf   r  )rj   r  rD   r5   rk   Z&Cookies._CookieCompatResponse.__init__  s    $Mr7   c               rl   )r,   r/   zemail.message.Messager1   r2   r4   r5   r6   rH    s     	 	/ 	r7   c                	s    \         P                  P                  4       pV P                  P                  P                  4        F	  w  r#W1V&   K  	  V# rf   )rJ   rK   rL   r  rb   r}   )rj   infor=   rF   rq   r5   rJ  Z"Cookies._CookieCompatResponse.info  sD    ==((*D"mm33??A
 "S		 B
 Kr7   rI  N)r   r   r   r   r   rk   rJ  r   r1   r7   r5   r8  rG    s    	
	%	 	r7   r8  r@  rf   )rO   Z/)NNNr   )r   r   r   r   r   rk   r  r   r4  r   r?  r>  r   r   r   r   r   r   rA  r   urllibr   r)   r9  r8  r   r1   r7   r5   r'   r'   7  st    "B3$42D0(
%!4
,.v~~55 .$ r7   )r'   r(   r)   r*   rf   )JZ
__future__r    r8   ZdatetimeZemail.messagerJ   r   r	  rS   r   Zurllib.requestrK  Zcollections.abcr   Zhttp.cookiejarr   r   r   r   r   r   r   Z	_decodersr   r	   r
   r   r   r   r   r   Z_exceptionsr   r   r   r   r   r   r   Z
_multipartr   Z_status_codesr   Z_typesr   r   r   r   r   r   r   r    r!   r"   r#   Z_urlsr$   Z_utilsr%   r&   Z__all__r]   r;   rE   rG   rN   rZ   ra   ZMutableMappingr.   r(   r)   r*   r'   r1   r7   r5   <module>rL     s    "     	   # , S S	 	 	   A       +
7$&;< N-1"Jp:f##CH- p:fB) B)Jq+ q+hFf##CH- Fr7   