
    =h#
                    V   d dl Z d dlZd dlZd dlZd dlZd dlmZmZ d dlm	Z	 ddl
m
Z
 ddlmZmZmZ ddlmZmZmZmZmZmZ ddlmZ dd	lmZmZmZmZ dd
lmZmZm Z m!Z! ddl"m#Z# ddl$m%Z% ddl&m'Z'm(Z( ddl)m*Z*m+Z+ ddl,m-Z- ddl.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z= ddl>m?Z?m@Z@ ddlAmBZBmCZCmDZDmEZEmFZF  ej                  dd      ZH ej                  dd      ZI G d d      ZJ eJ       ZK ej                  d      ZMde
 ZNdj                   ej                         D  cg c]
  } | dk7  s	|  c}       ZQ G d dej                        ZS G d  d!e:      ZT G d" d#e/      ZUej                  d$ej                  f   ZX G d% d&      ZY G d' deY      ZZ G d( deY      Z[yc c} w ))    N)asynccontextmanagercontextmanager)TracebackType   )__version__)Auth	BasicAuthFunctionAuth)DEFAULT_LIMITSDEFAULT_MAX_REDIRECTSDEFAULT_TIMEOUT_CONFIGLimitsProxyTimeout)SUPPORTED_DECODERS)
InvalidURLRemoteProtocolErrorTooManyRedirectsrequest_context)CookiesHeadersRequestResponse)codes)ASGITransport)AsyncBaseTransportBaseTransport)AsyncHTTPTransportHTTPTransport)WSGITransport)AsyncByteStream	AuthTypes	CertTypesCookieTypesHeaderTypesProxiesTypesQueryParamTypesRequestContentRequestDataRequestExtensionsRequestFilesSyncByteStreamTimeoutTypesURLTypesVerifyTypes)URLQueryParams)Timer
URLPatternget_environment_proxiesis_https_redirectsame_originTClient)boundUAsyncClientc                       e Zd ZdZy)UseClientDefaulta<  
    For some parameters such as `auth=...` and `timeout=...` we need to be able
    to indicate the default "unset" state, in a way that is distinctly different
    to using `None`.

    The default "unset" state indicates that whatever default is set on the
    client should be used. This is different to setting `None`, which
    explicitly disables the parameter, possibly overriding a client default.

    For example we use `timeout=USE_CLIENT_DEFAULT` in the `request()` signature.
    Omitting the `timeout` parameter will send a request using whatever default
    timeout has been configured on the client. Including `timeout=None` will
    ensure no timeout is used.

    Note that user code shouldn't need to use the `USE_CLIENT_DEFAULT` constant,
    but it is used internally when a parameter is not included.
    N)__name__
__module____qualname____doc__     ]/var/www/html/phonemate/phone_mate_backend/venv/lib/python3.12/site-packages/httpx/_client.pyr=   r=   @   s    rC   r=   httpxzpython-httpx/z, identityc                       e Zd ZdZdZdZy)ClientStater         N)r>   r?   r@   UNOPENEDOPENEDCLOSEDrB   rC   rD   rH   rH   _   s     H F FrC   rH   c                   V    e Zd ZdZdedededdfdZdej                  e
   fdZd
d	Zy)BoundSyncStreamz
    A byte stream that is bound to a given response instance, and that
    ensures the `response.elapsed` is set once the response is closed.
    streamresponsetimerreturnNc                 .    || _         || _        || _        y N_stream	_response_timerselfrP   rQ   rR   s       rD   __init__zBoundSyncStream.__init__s        !rC   c              #   6   K   | j                   D ]  }|  y wrU   rW   r[   chunks     rD   __iter__zBoundSyncStream.__iter__z   s     \\EK "s   c                     | j                   j                         }t        j                  |      | j                  _        | j                  j                          y N)seconds)rY   sync_elapseddatetime	timedeltarX   elapsedrW   closer[   re   s     rD   rj   zBoundSyncStream.close~   s;    ++**,!)!3!3G!DrC   rS   N)r>   r?   r@   rA   r,   r   r2   r\   typingIteratorbytesrb   rj   rB   rC   rD   rO   rO   m   sF    
$08AF	&//%0 rC   rO   c                   V    e Zd ZdZdedededdfdZdej                  e
   fdZd
d	Zy)BoundAsyncStreamz
    An async byte stream that is bound to a given response instance, and that
    ensures the `response.elapsed` is set once the response is closed.
    rP   rQ   rR   rS   Nc                 .    || _         || _        || _        y rU   rV   rZ   s       rD   r\   zBoundAsyncStream.__init__   r]   rC   c                H   K   | j                   2 3 d {   }| 7 
6 y wrU   r_   r`   s     rD   	__aiter__zBoundAsyncStream.__aiter__   s!     << 	%K	<s   "  " "c                    K   | j                   j                          d {   }t        j                  |      | j                  _        | j                  j                          d {    y 7 L7 wrd   )rY   async_elapsedrg   rh   rX   ri   rW   acloserk   s     rD   rw   zBoundAsyncStream.aclose   sQ     1133!)!3!3G!Dll!!### 4#s"   A1A-AA1'A/(A1/A1rl   )r>   r?   r@   rA   r!   r   r2   r\   rm   AsyncIteratorro   rt   rw   rB   rC   rD   rq   rq      sH    
%19BG	!5!5e!< $rC   rq   .c                      e Zd Zddddededdddddej                  e   dej                  e   d	ej                  e	   d
ej                  e
   dedededej                  ej                  eej                   e   f      dededej&                  eej(                  egef   f   fdZedefd       Zedefd       ZdedefdZdej                  e   dedej:                  eej                  e   f   fdZede fd       Z!e!jD                  deddfd       Z!edej:                  eej                   e   f   fd       Z#e#jD                  dej:                  eej                   e   f   ddfd       Z#edej                  e$   fd       Z%e%jD                  deddfd        Z%edefd!       Z&e&jD                  deddfd"       Z&ede'fd#       Z(e(jD                  d	e	ddfd$       Z(ede)fd%       Z*e*jD                  d
e
ddfd&       Z*ede+fd'       Z,e,jD                  deddfd(       Z,ddddddde-dd)	d*eded+ej                  e.   d,ej                  e/   d-ej                  e0   d.ej                  ejb                     dej                  e   d	ej                  e	   d
ej                  e
   dej&                  ee2f   d/ej                  e3   de4fd0Z5dedefd1Z6	 d>d
ej                  e
   dej                  e
   fd2Z7	 d>d	ej                  e	   dej                  e	   fd3Z8	 d>dej                  e   dej                  e   fd4Z9dej                  e   dej                  e$   fd5Z:e-fd6e4dej&                  ee2df   de$fd7Z;d6e4d8e<de4fd9Z=d6e4d8e<defd:Z>d6e4d8e<defd;Z?d6e4ded*ede'fd<Z@d6e4d*edej                  ej&                  eAeBf      fd=ZCy)?
BaseClientNF Tutf-8authparamsheaderscookiestimeoutfollow_redirectsmax_redirectsevent_hooksbase_url	trust_envdefault_encodingr~   r   r   r   r   r   r   r   r   r   r   c                   |i n|}| j                  t        |	            | _        | j                  |      | _        t        |      | _        t        |      | _        t        |      | _
        t        |      | _        || _        || _        t        |j!                  dg             t        |j!                  dg             d| _        |
| _        || _        t(        j*                  | _        y NrequestrQ   )r   rQ   )_enforce_trailing_slashr0   	_base_url_build_auth_authr1   _paramsr   r   r   _cookiesr   _timeoutr   r   listget_event_hooks
_trust_env_default_encodingrH   rK   _state)r[   r~   r   r   r   r   r   r   r   r   r   r   s               rD   r\   zBaseClient.__init__   s    " (/b[55c(mD%%d+
"6*w'(( 0*KOOIr:;[__Z<=
 $!1!**rC   rS   c                 <    | j                   t        j                  k(  S )z2
        Check if the client being closed
        )r   rH   rM   r[   s    rD   	is_closedzBaseClient.is_closed   s    
 {{k0000rC   c                     | j                   S rU   )r   r   s    rD   r   zBaseClient.trust_env   s    rC   urlc                 z    |j                   j                  d      r|S |j                  |j                   dz         S )N   /raw_path)r   endswith	copy_withr[   r   s     rD   r   z"BaseClient._enforce_trailing_slash   s3    <<  &J}}cllT&9}::rC   proxiesallow_env_proxiesc                    |>|r:t               j                         D ci c]  \  }}||d nt        |       c}}S i S t        |t              rNi }|j                         D ]7  \  }}t        |t
        t        f      rt        |      n|}||t        |      <   9 |S t        |t
        t        f      rt        |      n|}d|iS c c}}w )N)r   zall://)r4   itemsr   
isinstancedictstrr0   )r[   r   r   keyr   new_proxiesvalueproxys           rD   _get_proxy_mapzBaseClient._get_proxy_map   s     ?  %<$=$C$C$E$ES %C.@$E  Igt$K%mmo
U,6usCj,I%(u(-CH% . *4WsCj*IEg&wEe$$s   Cc                     | j                   S rU   )r   r   s    rD   r   zBaseClient.timeout   s    }}rC   c                 $    t        |      | _        y rU   )r   r   )r[   r   s     rD   r   zBaseClient.timeout       (rC   c                     | j                   S rU   )r   r   s    rD   r   zBaseClient.event_hooks   s       rC   c                 |    t        |j                  dg             t        |j                  dg             d| _        y r   )r   r   r   )r[   r   s     rD   r   zBaseClient.event_hooks   s4    
 KOOIr:;[__Z<=
rC   c                     | j                   S )z
        Authentication class used when none is passed at the request-level.

        See also [Authentication][0].

        [0]: /quickstart/#authentication
        )r   r   s    rD   r~   zBaseClient.auth   s     zzrC   c                 0    | j                  |      | _        y rU   )r   r   r[   r~   s     rD   r~   zBaseClient.auth  s    %%d+
rC   c                     | j                   S )zK
        Base URL to use when sending requests with relative URLs.
        )r   r   s    rD   r   zBaseClient.base_url  s    
 ~~rC   c                 B    | j                  t        |            | _        y rU   )r   r0   r   r   s     rD   r   zBaseClient.base_url  s    55c#h?rC   c                     | j                   S )z@
        HTTP headers to include when sending requests.
        )_headersr   s    rD   r   zBaseClient.headers      
 }}rC   c                     t        dt        j                  d      dt        j                  d      d      }|j	                  |       || _        y )Ns   */*asciis
   keep-alive)s   Accepts   Accept-Encodings
   Connections
   User-Agent)r   ACCEPT_ENCODINGencode
USER_AGENTupdater   )r[   r   client_headerss      rD   r   zBaseClient.headers  sJ     !$3$:$:7$C,)009	
 	g&&rC   c                     | j                   S )zA
        Cookie values to include when sending requests.
        )r   r   s    rD   r   zBaseClient.cookies*  r   rC   c                 $    t        |      | _        y rU   )r   r   )r[   r   s     rD   r   zBaseClient.cookies1  r   rC   c                     | j                   S )zO
        Query parameters to include in the URL when sending requests.
        )r   r   s    rD   r   zBaseClient.params5  s    
 ||rC   c                 $    t        |      | _        y rU   )r1   r   )r[   r   s     rD   r   zBaseClient.params<  s    "6*rC   )	contentdatafilesjsonr   r   r   r   
extensionsmethodr   r   r   r   r   c       	         P   | j                  |      }| j                  |      }| j                  |	      }	| j                  |      }|i n|}d|vrDt	        |
t
              r| j                  n
t        |
      }
t        di |d|
j                         i}t        |||||||||	|
      S )aJ  
        Build and return a request instance.

        * The `params`, `headers` and `cookies` arguments
        are merged with any values set on the client.
        * The `url` argument is merged with any `base_url` set on the client.

        See also: [Request instances][0]

        [0]: /advanced/#request-instances
        r   )r   r   r   r   r   r   r   r   rB   )
_merge_url_merge_headers_merge_cookies_merge_queryparamsr   r=   r   r   r   as_dictr   )r[   r   r   r   r   r   r   r   r   r   r   r   s               rD   build_requestzBaseClient.build_request@  s    4 ooc"%%g.%%g.((0%-R:
J& g'78 W% 
 F
FGOO4EFJ!
 	
rC   c                     t        |      }|j                  rN| j                  j                  |j                  j	                  d      z   }| j                  j                  |      S |S )z
        Merge a URL argument together with any 'base_url' on the client,
        to create the URL used for the outgoing request.
        r   r   )r0   is_relative_urlr   r   lstripr   )r[   r   	merge_urlmerge_raw_paths       rD   r   zBaseClient._merge_urls  s\    
 H	$$ "]]33i6H6H6O6OPT6UUN==**N*CCrC   c                 r    |s| j                   r(t        | j                         }|j                  |       |S |S )z
        Merge a cookies argument together with any cookies on the client,
        to create the cookies used for the outgoing request.
        )r   r   r   )r[   r   merged_cookiess      rD   r   zBaseClient._merge_cookies  s4     dll$T\\2N!!'*!!rC   c                 R    t        | j                        }|j                  |       |S )z
        Merge a headers argument together with any headers on the client,
        to create the headers used for the outgoing request.
        )r   r   r   )r[   r   merged_headerss      rD   r   zBaseClient._merge_headers  s&     !.g&rC   c                 n    |s| j                   r&t        | j                         }|j                  |      S |S )z
        Merge a queryparams argument together with any queryparams on the client,
        to create the queryparams used for the outgoing request.
        )r   r1   merge)r[   r   merged_queryparamss      rD   r   zBaseClient._merge_queryparams  s2     T[[!,T[[!9%++F33rC   c                     |y t        |t              rt        |d   |d         S t        |t              r|S t	        |      rt        |      S t        d|      )Nr   r   usernamepassword)funczInvalid "auth" argument: )r   tupler	   r   callabler
   	TypeErrorr   s     rD   r   zBaseClient._build_auth  s]    <e$d1gQ@@d#Kd^T**7x@AArC   r   c                     t        |t              r| j                  n| j                  |      }||S |j                  j
                  |j                  j                  }}|s|rt        ||      S t               S )Nr   )	r   r=   r   r   r   r   r   r	   r   )r[   r   r~   r   r   s        rD   _build_request_authzBaseClient._build_request_auth  sk     %T+;<DJJ$BRBRSWBX 	 K$[[117;;3G3G(xhBBvrC   rQ   c                     | j                  ||      }| j                  ||      }| j                  |||      }| j                  ||      }t	        | j
                        }t        ||||||j                        S )z
        Given a request and a redirect response, return a new request that
        should be used to effect the redirect.
        )r   r   r   r   rP   r   )_redirect_method_redirect_url_redirect_headers_redirect_streamr   r   r   r   )r[   r   rQ   r   r   r   rP   r   s           rD   _build_redirect_requestz"BaseClient._build_redirect_request  s    
 &&w9  (3((#v>&&w7$,,'))
 	
rC   c                     |j                   }|j                  t        j                  k(  r|dk7  rd}|j                  t        j                  k(  r|dk7  rd}|j                  t        j
                  k(  r|dk(  rd}|S )z
        When being redirected we may want to change the method of the request
        based on certain specs or browser behavior.
        HEADGETPOST)r   status_coder   	SEE_OTHERFOUNDMOVED_PERMANENTLY)r[   r   rQ   r   s       rD   r   zBaseClient._redirect_method  st    
  5??2v7GF 5;;.6V3CF 5#:#::v?OFrC   c                    |j                   d   }	 t        |      }|j                  r2|j
                  s&|j                  |j                  j
                        }|j                  r|j                  j                  |      }|j                  j                  r2|j                  s&|j                  |j                  j                        }|S # t        $ r}t        d| d|      dd}~ww xY w)z<
        Return the URL for the redirect to follow.
        Locationz Invalid URL in location header: .r   N)host)fragment)r   r0   r   r   schemer   r   r   r   joinr   )r[   r   rQ   locationr   excs         rD   r   zBaseClient._redirect_url  s     ##J/	h-C ::chh--W[[%5%5-6C ++""3'C ;;--)=)=->C
'  	%23%q97	s   C 	C+C&&C+c                 |   t        |j                        }t        ||j                        sFt	        |j                  |      s|j                  dd       |j                  j                  d      |d<   ||j                  k7  r)|dk(  r$|j                  dd       |j                  dd       |j                  dd       |S )	zR
        Return the headers that should be used for the redirect request.
        AuthorizationNr   Hostr   zContent-LengthzTransfer-EncodingCookie)	r   r   r6   r   r5   popnetlocdecoder   )r[   r   r   r   r   s        rD   r   zBaseClient._redirect_headers  s     '//*3,$W[[#6 OT2 "jj//8GFOW^^#% KK($/KK+T2 	Hd#rC   c                 D    ||j                   k7  r|dk(  ry|j                  S )zO
        Return the body that should be used for the redirect request.
        r   N)r   rP   )r[   r   r   s      rD   r   zBaseClient._redirect_stream-  s#     W^^#%~~rC   rU   )Dr>   r?   r@   r   r   rm   Optionalr"   r'   r%   r$   r-   boolintMappingr   List	EventHookr.   UnionCallablero   r\   propertyr   r   r0   r   r&   Dictr   r   r   r   setterr   r   r~   r   r   r   r   r   r1   r   USE_CLIENT_DEFAULTr(   r)   r+   Anyr=   r*   r   r   r   r   r   r   r   r   r   r   r   r   r   r,   r!   r   rB   rC   rD   rz   rz      s    ,0370404 6!&2 MT"+ ooi("+ 0	"+
 -"+ -"+ "+ "+ "+ __NN3I 667
"+ "+ "+ !,,sFOOUGSL,I'IJ"+H 14 1 1 4  ;3 ;3 ;
%|4%IM%	S&//%00	1%(    ^^)| ) ) ) !V[[fkk).D)DE ! ! 
!;;sFKK	,B'BC
	
 
 food+   
[[, ,t , , #   __@H @ @ @    ^^
'{ 
't 
' 
'    ^^){ )t ) )    ]]+_ + + + 48-1/3,0370404@R9=1
1
 1

 01
 ook*1
 |,1
 oofjj)1
 01
 -1
 -1
 l,<<=1
 OO$561
 
1
fh 3 . 7;{3		% 7;	{3			%	 :>
ooo6
		)

B	 : 
Bvt?T 
B AS ll9&6<= 
	$
w 
( 
w 
& 8  .W  S : s C G 6		(+		no&EF	G	rC   rz   c            -           e Zd ZdZddddddddddedeeddddddddej                  e	   d	ej                  e
   d
ej                  e   dej                  e   dedej                  e   dededej                  e   dej                  ej"                  eef      dededededej                  ej"                  eej.                  e   f      dedej                  e   dej                  ej4                  dej6                  f      dedej8                  eej4                  egef   f   f( fdZddddedddfdedej                  e   dedededej                  e   dej                  ej4                  dej6                  f      dedefdZddddedfd e dedej                  e   dededededefd!Z!d"e"defd#Z#ddddddde$e$e$dd$d%ed"ed&ej                  e%   d'ej                  e&   d(ej                  e'   d)ej                  ej6                     d	ej                  e
   d
ej                  e   dej                  e   dej8                  e	e(df   dej8                  ee(f   dej8                  ee(f   d*ej                  e)   de*fd+Z+e,ddddddde$e$e$dd$d%ed"ed&ej                  e%   d'ej                  e&   d(ej                  e'   d)ej                  ej6                     d	ej                  e
   d
ej                  e   dej                  e   dej8                  e	e(df   dej8                  ee(f   dej8                  ee(f   d*ej                  e)   dejZ                  e*   fd,       Z.de$e$d-d.e/d/edej8                  e	e(df   dej8                  ee(f   de*f
d0Z0d.e/de1ded1ej.                  e*   de*f
d2Z2d.e/ded1ej.                  e*   de*fd3Z3d.e/de*fd4Z4ddde$e$e$dd5d"ed	ej                  e
   d
ej                  e   dej                  e   dej8                  e	e(f   dej8                  ee(f   dej8                  ee(f   d*ej                  e)   de*fd6Z5ddde$e$e$dd5d"ed	ej                  e
   d
ej                  e   dej                  e   dej8                  e	e(f   dej8                  ee(f   dej8                  ee(f   d*ej                  e)   de*fd7Z6ddde$e$e$dd5d"ed	ej                  e
   d
ej                  e   dej                  e   dej8                  e	e(f   dej8                  ee(f   dej8                  ee(f   d*ej                  e)   de*fd8Z7ddddddde$e$e$dd$d"ed&ej                  e%   d'ej                  e&   d(ej                  e'   d)ej                  ej6                     d	ej                  e
   d
ej                  e   dej                  e   dej8                  e	e(f   dej8                  ee(f   dej8                  ee(f   d*ej                  e)   de*fd9Z8ddddddde$e$e$dd$d"ed&ej                  e%   d'ej                  e&   d(ej                  e'   d)ej                  ej6                     d	ej                  e
   d
ej                  e   dej                  e   dej8                  e	e(f   dej8                  ee(f   dej8                  ee(f   d*ej                  e)   de*fd:Z9ddddddde$e$e$dd$d"ed&ej                  e%   d'ej                  e&   d(ej                  e'   d)ej                  ej6                     d	ej                  e
   d
ej                  e   dej                  e   dej8                  e	e(f   dej8                  ee(f   dej8                  ee(f   d*ej                  e)   de*fd;Z:ddde$e$e$dd5d"ed	ej                  e
   d
ej                  e   dej                  e   dej8                  e	e(f   dej8                  ee(f   dej8                  ee(f   d*ej                  e)   de*fd<Z;dDd=Z<d>e=de=fd?Z>	 	 	 dEd@ej                  ej~                  e@      dAej                  e@   dBej                  eA   ddfdCZB xZCS )Fr8   a  
    An HTTP client, with connection pooling, HTTP/2, redirects, cookie persistence, etc.

    It can be shared between threads.

    Usage:

    ```python
    >>> client = httpx.Client()
    >>> response = client.get('https://example.org')
    ```

    **Parameters:**

    * **auth** - *(optional)* An authentication class to use when sending
    requests.
    * **params** - *(optional)* Query parameters to include in request URLs, as
    a string, dictionary, or sequence of two-tuples.
    * **headers** - *(optional)* Dictionary of HTTP headers to include when
    sending requests.
    * **cookies** - *(optional)* Dictionary of Cookie items to include when
    sending requests.
    * **verify** - *(optional)* SSL certificates (a.k.a CA bundle) used to
    verify the identity of requested hosts. Either `True` (default CA bundle),
    a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
    (which will disable verification).
    * **cert** - *(optional)* An SSL certificate used by the requested host
    to authenticate the client. Either a path to an SSL certificate file, or
    two-tuple of (certificate file, key file), or a three-tuple of (certificate
    file, key file, password).
    * **proxies** - *(optional)* A dictionary mapping proxy keys to proxy
    URLs.
    * **timeout** - *(optional)* The timeout configuration to use when sending
    requests.
    * **limits** - *(optional)* The limits configuration to use.
    * **max_redirects** - *(optional)* The maximum number of redirect responses
    that should be followed.
    * **base_url** - *(optional)* A URL to use as the base when building
    request URLs.
    * **transport** - *(optional)* A transport class to use for sending requests
    over the network.
    * **app** - *(optional)* An WSGI application to send requests to,
    rather than sending actual network requests.
    * **trust_env** - *(optional)* Enables or disables usage of environment
    variables for configuration.
    * **default_encoding** - *(optional)* The default encoding to use for decoding
    response text, if no charset information is included in a response Content-Type
    header. Set to a callable for automatic character set detection. Default: "utf-8".
    NTFr{   r|   r~   r   r   r   verifycerthttp1http2r   mountsr   r   limitsr   r   r   	transportappr   r   r~   r   r   r   r  r  r  r  r   r  r   r   r   r   r   r   r!  r"  .r   r   c                   t         |   |||||||||||       |r	 dd l}|xr
 |d u xr |d u }| j	                  |	|      }| j                  ||||||||      | _        |j                         D ci c]+  \  }}t        |      |d n| j                  |||||||      - c}}| _
        |
F| j                  j                  |
j                         D ci c]  \  }}t        |      | c}}       t        t        | j                  j                                     | _
        y # t        $ r t        d      d w xY wc c}}w c c}}w Nr}   r   zuUsing http2=True, but the 'h2' package is not installed. Make sure to install httpx using `pip install httpx[http2]`.)r  r  r  r  r   r!  r"  r   r  r  r  r  r   r   superr\   h2ImportErrorr   _init_transport
_transportr   r3   _init_proxy_transport_mountsr   r   sortedr[   r~   r   r   r   r  r  r  r  r   r  r   r   r   r   r   r   r!  r"  r   r   r(  r   	proxy_mapr   r   	__class__s                             rD   r\   zClient.__init__l  s   4 	-'#- 	 	
  &K#+K)t:K''1BC	.. / 	
, (oo/Q
 0
U sO} "++# , 
 0Q
 LLBH,,.Q.YC)+.Q F4<<#5#5#789M  !S &Q
  R   D' 40E E
'D=rS   c	                 H    ||S |t        |      S t        ||||||      S N)r"  r%  )r    r   	r[   r  r  r  r  r   r!  r"  r   s	            rD   r*  zClient._init_transport  s?      ? S))
 	
rC   r   c           	      &    t        |||||||      S )N)r  r  r  r  r   r   r   )r   r[   r   r  r  r  r  r   r   s           rD   r,  zClient._init_proxy_transport  s&     
 	
rC   r   c                     | j                   j                         D ]*  \  }}|j                  |      s|| j                  c S |c S  | j                  S z
        Returns the transport instance that should be used for a given URL.
        This will either be the standard connection pool, or a proxy.
        r-  r   matchesr+  r[   r   patternr!  s       rD   _transport_for_urlzClient._transport_for_url  L    
 #',,"4"4"6GYs#*3*;tJJ #7 rC   r   r   r   r   r   r   r   r~   r   r   r   r   r   r   r   r   r   c                    |	d}t        j                  |t               | j                  |||||||||	||      }| j	                  ||
|      S )a  
        Build and send a request.

        Equivalent to:

        ```python
        request = client.build_request(...)
        response = client.send(request, ...)
        ```

        See `Client.build_request()`, `Client.send()` and
        [Merging of configuration][0] for how the various parameters
        are merged with client-level configuration.

        [0]: /advanced/#merging-of-configuration
        zSetting per-request cookies=<...> is being deprecated, because the expected behaviour on cookie persistence is ambiguous. Set cookies directly on the client instance instead.r   r   r   r   r   r   r   r   r   r   r   r~   r   )warningswarnDeprecationWarningr   send)r[   r   r   r   r   r   r   r   r   r   r~   r   r   r   messager   s                   rD   r   zClient.request  su    B C 
 MM'#56$$! % 
 yyt>NyOOrC   c             #      K   | j                  |||||||||	||      }| j                  ||
|d      }	 | |j                          y# |j                          w xY wwa  
        Alternative to `httpx.request()` that streams the response body
        instead of loading it into memory at once.

        **Parameters**: See `httpx.request`.

        See also: [Streaming Responses][0]

        [0]: /quickstart#streaming-responses
        rB  T)r   r~   r   rP   N)r   rG  rj   r[   r   r   r   r   r   r   r   r   r   r~   r   r   r   r   rQ   s                   rD   rP   zClient.stream0  s}     8 $$! % 
 99-	  
	NNNHNNs   2AA
 A
AArP   r~   r   r   rP   c                v   | j                   t        j                  k(  rt        d      t        j                  | _         t        |t              r| j                  n|}| j                  ||      }| j                  |||g       }	 |s|j                          |S # t        $ r}|j                          |d}~ww xY w)a  
        Send a request.

        The request is sent as-is, unmodified.

        Typically you'll want to build one with `Client.build_request()`
        so that any client-level configuration is merged into the request,
        but passing an explicit `httpx.Request()` is supported as well.

        See also: [Request instances][0]

        [0]: /advanced/#request-instances
        5Cannot send a request, as the client has been closed.r~   r   historyN)r   rH   rM   RuntimeErrorrL   r   r=   r   r   _send_handling_authreadBaseExceptionrj   r[   r   rP   r~   r   rQ   r  s          rD   rG  zClient.sendd  s    * ;;+,,,VWW!(( *,<= !!! 	 ''6++-	 , 
	O 	NNI	s   B 	B8!B33B8rP  c                    |j                  |      }	 t        |      }	 | j                  |||      }	 	 |j                  |      }t        |      |_        |j                          |}|j                  |       [# t        $ r |cY |j                          S w xY w# t        $ r}|j                          |d }~ww xY w# |j                          w xY wN)r   rP  )sync_auth_flownext_send_handling_redirectsrG  StopIterationrj   r   rP  rS  appendrT  	r[   r   r~   r   rP  	auth_flowrQ   next_requestr  s	            rD   rR  zClient._send_handling_auth  s     ''0		9oG88%5# 9 
('0~~h'? (,G}H$MMO*GNN8,  ) (' OO( % NN$I OOsL    B> A: 3B 9B> :BB BB 	B;$B66B;;B> >Cc                    	 t        |      | j                  kD  rt        d|      | j                  d   D ]
  } ||        | j	                  |      }	 | j                  d   D ]
  } ||        t        |      |_        |j                  s|S | j                  ||      }||gz   }|r|j                          n	||_
        |S 	 # t        $ r}|j                          |d }~ww xY wNz#Exceeded maximum allowed redirects.r   r   rQ   )lenr   r   r   _send_single_requestr   rP  has_redirect_locationr   rS  r_  rT  rj   r[   r   r   rP  hookrQ   r  s          rD   rZ  zClient._send_handling_redirects  s     7|d000&97  )))4W 5 009H --j9DN :#'= 55#O66wI!XJ.#MMO,3H)#O $- 6 !  	s   9C 3C 	C%C  C%c                    | j                  |j                        }t               }|j                          t	        |j
                  t              st        d      t        |      5  |j                  |      }ddd       t	        j
                  t              sJ ||_
        t        |j
                  ||      |_        | j                  j                  |       | j                  |_        t         j#                  d|j$                  |j                  |j&                  |j(                  |j*                         |S # 1 sw Y   xY w)L
        Sends a single request, without handling any redirections.
        z?Attempted to send an async request with a sync Client instance.r   NrQ   rR   HTTP Request: %s %s "%s %d %s")r>  r   r2   
sync_startr   rP   r,   rQ  r   handle_requestr   rO   r   extract_cookiesr   r   loggerinfor   http_versionr   reason_phraser[   r   r!  rR   rQ   s        rD   rc  zClient._send_single_request  s    ++GKK8	'...9Q  W- //8H . (//>:::")OOhe
 	$$X.$($:$:!,NNKK!!  ""	
 + .-s   'D;;Er   r   r   r~   r   r   r   c                6    | j                  d||||||||	      S )U
        Send a `GET` request.

        **Parameters**: See `httpx.request`.
        r   rs  r   	r[   r   r   r   r   r~   r   r   r   s	            rD   r   z
Client.get   s5    " ||-!  

 
	
rC   c                6    | j                  d||||||||	      S )Z
        Send an `OPTIONS` request.

        **Parameters**: See `httpx.request`.
        OPTIONSrs  r   rv  s	            rD   optionszClient.options  s5    " ||-!  

 
	
rC   c                6    | j                  d||||||||	      S )V
        Send a `HEAD` request.

        **Parameters**: See `httpx.request`.
        r   rs  r   rv  s	            rD   headzClient.head:  s5    " ||-!  

 
	
rC   c                >    | j                  d|||||||||	|
||      S )V
        Send a `POST` request.

        **Parameters**: See `httpx.request`.
        r   r@  r   r[   r   r   r   r   r   r   r   r   r~   r   r   r   s                rD   postzClient.postW  sA    * ||-!  
 	
rC   c                >    | j                  d|||||||||	|
||      S )U
        Send a `PUT` request.

        **Parameters**: See `httpx.request`.
        PUTr@  r   r  s                rD   putz
Client.put|  sA    * ||-!  
 	
rC   c                >    | j                  d|||||||||	|
||      S )W
        Send a `PATCH` request.

        **Parameters**: See `httpx.request`.
        PATCHr@  r   r  s                rD   patchzClient.patch  sA    * ||-!  
 	
rC   c                6    | j                  d||||||||	      S )X
        Send a `DELETE` request.

        **Parameters**: See `httpx.request`.
        DELETErs  r   rv  s	            rD   deletezClient.delete  s5    " ||-!  

 
	
rC   c                    | j                   t        j                  k7  rbt        j                  | _         | j                  j	                          | j
                  j                         D ]  }||j	                           yyz.
        Close transport and proxies.
        N)r   rH   rM   r+  rj   r-  values)r[   r!  s     rD   rj   zClient.close  s_     ;;+,,,%,,DKOO!!#!\\002	(OO% 3	 -rC   r[   c                 v   | j                   t        j                  k7  r:t        j                  dt        j                  di| j                      }t        |      t        j                  | _         | j                  j                          | j                  j                         D ]  }||j                           | S Nz-Cannot open a client instance more than once.z9Cannot reopen a client instance, once it has been closed.)
r   rH   rK   rL   rM   rQ  r+  	__enter__r-  r  )r[   msgr!  s      rD   r  zClient.__enter__  s    ;;+...""$S""$_ kkC s##!((!!#,,.I$##% / rC   exc_type	exc_value	tracebackc                     t         j                  | _        | j                  j	                  |||       | j
                  j                         D ]  }||j	                  |||        y rU   )rH   rM   r   r+  __exit__r-  r  )r[   r  r  r  r!  s        rD   r  zClient.__exit__  sV     "((  9i@,,.I$""8Y	B /rC   rl   NNN)Dr>   r?   r@   rA   r   r   r   rm   r  r"   r'   r%   r$   r/   r#   r  r&   r  r   r   r-   r   r  r  r  r.   r  r  r  ro   r\   r*  r   r,  r0   r>  r  r(   r)   r+   r=   r*   r   r   r   rn   rP   r   rG  r   rR  rZ  rc  r   rz  r}  r  r  r  r  rj   r7   r  TyperT  r   r  __classcell__r1  s   @rD   r8   r8   9  sm   0j ,0370404"+/15FJ 6!&'2 48AEMT1Q: ooi(Q: 0	Q:
 -Q: -Q: Q: ooi(Q: Q: Q: .Q: sM/A BCQ: Q: Q: Q:  !Q:" __NN3I 667
#Q:( )Q:* ??=1+Q:, __V__S&**_=>-Q:. /Q:0 !,,sFOOUGSL,I'IJ1Q:j #+/'48AE

 ooi(
 	

 
 
 ??=1
 __V__S&**_=>
 
 

: #+/'

 
 ooi(	

 
 
 
 
 

(	c 	m 	  48-1/3,0370404@RAS@R9=6P6P 6P
 06P ook*6P |,6P oofjj)6P 06P -6P -6P ll9&6<=6P !,,t-='=>6P l,<<=6P OO$566P  
!6Pp  48-1/3,0370404@RAS@R9=11 1
 01 ook*1 |,1 oofjj)1 01 -1 -1 ll9&6<=1 !,,t-='=>1 l,<<=1 OO$561  
	"!1 1n @RAS// 	/
 ll9&6<=/ !,,t-='=>/ 
/b     	 
 X&  
 D## # X&	#
 
#J"G " "P 480404:LAS@R9=

 0	

 -
 -
 ll9&667
 !,,t-='=>
 l,<<=
 OO$56
 

B 480404:LAS@R9=

 0	

 -
 -
 ll9&667
 !,,t-='=>
 l,<<=
 OO$56
 

B 480404:LAS@R9=

 0	

 -
 -
 ll9&667
 !,,t-='=>
 l,<<=
 OO$56
 

B 48-1/3,0370404:LAS@R9=#
#
 0	#

 ook*#
 |,#
 oofjj)#
 0#
 -#
 -#
 ll9&667#
 !,,t-='=>#
 l,<<=#
 OO$56#
 
#
R 48-1/3,0370404:LAS@R9=#
#
 0	#

 ook*#
 |,#
 oofjj)#
 0#
 -#
 -#
 ll9&667#
 !,,t-='=>#
 l,<<=#
 OO$56#
 
#
R 48-1/3,0370404:LAS@R9=#
#
 0	#

 ook*#
 |,#
 oofjj)#
 0#
 -#
 -#
 ll9&667#
 !,,t-='=>#
 l,<<=#
 OO$56#
 
#
R 480404:LAS@R9=

 0	

 -
 -
 ll9&667
 !,,t-='=>
 l,<<=
 OO$56
 

:
& a $ AE4848	C//&++m"<=C ??=1C ??=1	C
 
CrC   c            -       J    e Zd ZdZddddddddddedeeddddddddej                  e	   d	ej                  e
   d
ej                  e   dej                  e   dedej                  e   dededej                  e   dej                  ej"                  eef      dededededej                  ej"                  eej.                  ej0                  dej2                  f      f      dedej                  e   dej                  ej0                  dej2                  f      dedej6                  eej0                  egef   f   f( fdZddddedddfdedej                  e   dedededej                  e   dej                  ej0                  dej2                  f      dedefdZddddedfd ededej                  e   dededededefd!Z d"e!defd#Z"ddddddde#e#e#dd$d%ed"ed&ej                  e$   d'ej                  e%   d(ej                  e&   d)ej                  ej2                     d	ej                  e
   d
ej                  e   dej                  e   dej6                  e	e'df   dej6                  ee'f   dej6                  ee'f   d*ej                  e(   de)fd+Z*e+ddddddde#e#e#dd$d%ed"ed&ej                  e$   d'ej                  e%   d(ej                  e&   d)ej                  ej2                     d	ej                  e
   d
ej                  e   dej                  e   dej6                  e	e'f   dej6                  ee'f   dej6                  ee'f   d*ej                  e(   dejX                  e)   fd,       Z-de#e#d-d.e.d/edej6                  e	e'df   dej6                  ee'f   de)f
d0Z/d.e.de0ded1ej.                  e)   de)f
d2Z1d.e.ded1ej.                  e)   de)fd3Z2d.e.de)fd4Z3ddde#e#e#dd5d"ed	ej                  e
   d
ej                  e   dej                  e   dej6                  e	e'df   dej6                  ee'f   dej6                  ee'f   d*ej                  e(   de)fd6Z4ddde#e#e#dd5d"ed	ej                  e
   d
ej                  e   dej                  e   dej6                  e	e'f   dej6                  ee'f   dej6                  ee'f   d*ej                  e(   de)fd7Z5ddde#e#e#dd5d"ed	ej                  e
   d
ej                  e   dej                  e   dej6                  e	e'f   dej6                  ee'f   dej6                  ee'f   d*ej                  e(   de)fd8Z6ddddddde#e#e#dd$d"ed&ej                  e$   d'ej                  e%   d(ej                  e&   d)ej                  ej2                     d	ej                  e
   d
ej                  e   dej                  e   dej6                  e	e'f   dej6                  ee'f   dej6                  ee'f   d*ej                  e(   de)fd9Z7ddddddde#e#e#dd$d"ed&ej                  e$   d'ej                  e%   d(ej                  e&   d)ej                  ej2                     d	ej                  e
   d
ej                  e   dej                  e   dej6                  e	e'f   dej6                  ee'f   dej6                  ee'f   d*ej                  e(   de)fd:Z8ddddddde#e#e#dd$d"ed&ej                  e$   d'ej                  e%   d(ej                  e&   d)ej                  ej2                     d	ej                  e
   d
ej                  e   dej                  e   dej6                  e	e'f   dej6                  ee'f   dej6                  ee'f   d*ej                  e(   de)fd;Z9ddde#e#e#dd5d"ed	ej                  e
   d
ej                  e   dej                  e   dej6                  e	e'f   dej6                  ee'f   dej6                  ee'f   d*ej                  e(   de)fd<Z:dDd=Z;d>e<de<fd?Z=	 	 	 dEd@ej                  ej|                  e?      dAej                  e?   dBej                  e@   ddfdCZA xZBS )Fr;   aC	  
    An asynchronous HTTP client, with connection pooling, HTTP/2, redirects,
    cookie persistence, etc.

    Usage:

    ```python
    >>> async with httpx.AsyncClient() as client:
    >>>     response = await client.get('https://example.org')
    ```

    **Parameters:**

    * **auth** - *(optional)* An authentication class to use when sending
    requests.
    * **params** - *(optional)* Query parameters to include in request URLs, as
    a string, dictionary, or sequence of two-tuples.
    * **headers** - *(optional)* Dictionary of HTTP headers to include when
    sending requests.
    * **cookies** - *(optional)* Dictionary of Cookie items to include when
    sending requests.
    * **verify** - *(optional)* SSL certificates (a.k.a CA bundle) used to
    verify the identity of requested hosts. Either `True` (default CA bundle),
    a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
    (which will disable verification).
    * **cert** - *(optional)* An SSL certificate used by the requested host
    to authenticate the client. Either a path to an SSL certificate file, or
    two-tuple of (certificate file, key file), or a three-tuple of (certificate
    file, key file, password).
    * **http2** - *(optional)* A boolean indicating if HTTP/2 support should be
    enabled. Defaults to `False`.
    * **proxies** - *(optional)* A dictionary mapping HTTP protocols to proxy
    URLs.
    * **timeout** - *(optional)* The timeout configuration to use when sending
    requests.
    * **limits** - *(optional)* The limits configuration to use.
    * **max_redirects** - *(optional)* The maximum number of redirect responses
    that should be followed.
    * **base_url** - *(optional)* A URL to use as the base when building
    request URLs.
    * **transport** - *(optional)* A transport class to use for sending requests
    over the network.
    * **app** - *(optional)* An ASGI application to send requests to,
    rather than sending actual network requests.
    * **trust_env** - *(optional)* Enables or disables usage of environment
    variables for configuration.
    * **default_encoding** - *(optional)* The default encoding to use for decoding
    response text, if no charset information is included in a response Content-Type
    header. Set to a callable for automatic character set detection. Default: "utf-8".
    NTFr{   r|   r  r~   r   r   r   r  r  r  r  r   r  r   r   r   r   r   .r   r!  r"  r   r   c                   t         |   |||||||||||       |r	 dd l}|xr
 |d u xr |d u }| j	                  |	|      }| j                  ||||||||      | _        |j                         D ci c]+  \  }}t        |      |d n| j                  |||||||      - c}}| _
        |
F| j                  j                  |
j                         D ci c]  \  }}t        |      | c}}       t        t        | j                  j                                     | _
        y # t        $ r t        d      d w xY wc c}}w c c}}w r$  r&  r/  s                             rD   r\   zAsyncClient.__init__A  s   4 	-'#- 	 	
  &K#+K)t:K''1BC	.. / 	
. (oo/V
 0
U sO} "++# , 
 0V
 LLBH,,.Q.YC)+.Q F4<<#5#5#789M  !S (V
  Rr2  rS   c	                 H    ||S |t        |      S t        ||||||      S r4  )r   r   r5  s	            rD   r*  zAsyncClient._init_transport  s?      ? S))!
 	
rC   r   c                 $    t        ||||||      S )N)r  r  r  r   r   r   )r   r7  s           rD   r,  z!AsyncClient._init_proxy_transport  s#     "
 	
rC   r   c                     | j                   j                         D ]*  \  }}|j                  |      s|| j                  c S |c S  | j                  S r9  r:  r<  s       rD   r>  zAsyncClient._transport_for_url  r?  rC   r@  r   r   r   r   r   r   c                ~   K   | j                  |||||||||	||      }| j                  ||
|       d{   S 7 w)a  
        Build and send a request.

        Equivalent to:

        ```python
        request = client.build_request(...)
        response = await client.send(request, ...)
        ```

        See `AsyncClient.build_request()`, `AsyncClient.send()`
        and [Merging of configuration][0] for how the various parameters
        are merged with client-level configuration.

        [0]: /advanced/#merging-of-configuration
        rB  rC  N)r   rG  )r[   r   r   r   r   r   r   r   r   r   r~   r   r   r   r   s                  rD   r   zAsyncClient.request  s]     B $$! % 
 YYwTDTYUUUUs   4=;=c                  K   | j                  |||||||||	||      }| j                  ||
|d       d{   }	 | |j                          d{    y7 #7 # |j                          d{  7   w xY wwrJ  )r   rG  rw   rK  s                   rD   rP   zAsyncClient.stream  s     8 $$! % 
 -	 # 
 
	$N//###
 $(//###sD   5A=AA=A A=AA=A=A:3A64A::A=rL  r   rP   c                  K   | j                   t        j                  k(  rt        d      t        j                  | _         t        |t              r| j                  n|}| j                  ||      }| j                  |||g        d{   }	 |s|j                          d{    |S 7 !7 # t        $ r }|j                          d{  7   |d}~ww xY ww)a  
        Send a request.

        The request is sent as-is, unmodified.

        Typically you'll want to build one with `AsyncClient.build_request()`
        so that any client-level configuration is merged into the request,
        but passing an explicit `httpx.Request()` is supported as well.

        See also: [Request instances][0]

        [0]: /advanced/#request-instances
        rN  rO  N)r   rH   rM   rQ  rL   r   r=   r   r   rR  areadrT  rw   rU  s          rD   rG  zAsyncClient.send0  s     * ;;+,,,VWW!(( *,<= !!! 	 ''611-	 2 
 
	nn&&&O
 '  	//###I	sT   BCB*	CB. #B,$B. )C,B. .	C7C
CCCCrP  c                 >  K   |j                  |      }	 |j                          d {   }	 | j                  |||       d {   }	 	 |j                  |       d {   }t        |      |_        |j                          d {    |}|j                  |       s7 x7 ]7 D# t        $ r |cY |j                          d {  7   S w xY w7 H# t        $ r }|j                          d {  7   |d }~ww xY w# |j                          d {  7   w xY wwrW  )async_auth_flow	__anext__rZ  asendStopAsyncIterationrw   r   rP  r  r\  rT  r]  s	            rD   rR  zAsyncClient._send_handling_autha  s     ((1		%%//11G!%!>!>%5# "? " 
(-6__X-F'F (,G}H$"..****GNN8,  2 (G- (' ""$$$( + % "//+++I ""$$$s   DC? B!C? B#C? B'  B%!B' %#C C	C  C? #C? %B' 'C2C 3DC	DCC 	C<C7/C20C77C<<C? ?DDDDc                 :  K   	 t        |      | j                  kD  rt        d|      | j                  d   D ]  } ||       d {     | j	                  |       d {   }	 | j                  d   D ]  } ||       d {     t        |      |_        |j                  s|S | j                  ||      }||gz   }|r|j                          d {    n	||_
        |S 	 7 7 7 f7 # t        $ r }|j                          d {  7   |d }~ww xY wwra  )rb  r   r   r   rc  r   rP  rd  r   r  r_  rT  rw   re  s          rD   rZ  z$AsyncClient._send_handling_redirects  s.     7|d000&97  )))47m## 5 "66w??H --j9Dx.(( : $(= 55#O66wI!XJ.#"..***,3H)#O +/  $? ) +
 ! oo'''	s   ADC'D!C)"D'C/ C+#C/ (D)-C/ C-C/ $D)D+C/ -C/ /	D8DDDDDc                   K   | j                  |j                        }t               }|j                          d{    t	        |j
                  t              st        d      t        |      5  |j                  |       d{   }ddd       t	        j
                  t              sJ ||_
        t        |j
                  ||      |_        | j                  j                  |       | j                  |_        t         j#                  d|j$                  |j                  |j&                  |j(                  |j*                         |S 7 7 # 1 sw Y   xY ww)rh  Nz?Attempted to send an sync request with an AsyncClient instance.r   ri  rj  )r>  r   r2   async_startr   rP   r!   rQ  r   handle_async_requestr   rq   r   rm  r   r   rn  ro  r   rp  r   rq  rr  s        rD   rc  z AsyncClient._send_single_request  s      ++GKK8	!!!'../:Q  W-&;;GDDH . (//?;;;"*OOhe
 	$$X.$($:$:!,NNKK!!  ""	
 7 	" E .-s:   9EE5E1EEECEEEErs  c                R   K   | j                  d||||||||	       d{   S 7 w)ru  r   rs  Nr   rv  s	            rD   r   zAsyncClient.get  sC     " \\-! " 

 

 
	
 

   '%'c                R   K   | j                  d||||||||	       d{   S 7 w)rx  ry  rs  Nr   rv  s	            rD   rz  zAsyncClient.options  sC     " \\-! " 

 

 
	
 

r  c                R   K   | j                  d||||||||	       d{   S 7 w)r|  r   rs  Nr   rv  s	            rD   r}  zAsyncClient.head  sC     " \\-! " 

 

 
	
 

r  c                Z   K   | j                  d|||||||||	|
||       d{   S 7 w)r  r   r@  Nr   r  s                rD   r  zAsyncClient.post#  sO     * \\-! " 
 
 	
 
   "+)+c                Z   K   | j                  d|||||||||	|
||       d{   S 7 w)r  r  r@  Nr   r  s                rD   r  zAsyncClient.putH  sO     * \\-! " 
 
 	
 
r  c                Z   K   | j                  d|||||||||	|
||       d{   S 7 w)r  r  r@  Nr   r  s                rD   r  zAsyncClient.patchm  sO     * \\-! " 
 
 	
 
r  c                R   K   | j                  d||||||||	       d{   S 7 w)r  r  rs  Nr   rv  s	            rD   r  zAsyncClient.delete  sC     " \\-! " 

 

 
	
 

r  c                 2  K   | j                   t        j                  k7  rrt        j                  | _         | j                  j	                          d{    | j
                  j                         D ]  }||j	                          d{     yy7 @7 
wr  )r   rH   rM   r+  rw   r-  r  )r[   r   s     rD   rw   zAsyncClient.aclose  sy      ;;+,,,%,,DK//((***,,.$,,.(( /	 - + )s*   ABB#B7B
B	BBr[   c                   K   | j                   t        j                  k7  r:t        j                  dt        j                  di| j                      }t        |      t        j                  | _         | j                  j                          d {    | j                  j                         D ]  }||j                          d {     | S 7 @7 
wr  )
r   rH   rK   rL   rM   rQ  r+  
__aenter__r-  r  )r[   r  r   s      rD   r  zAsyncClient.__aenter__  s     ;;+...""$S""$_ kkC s##!((oo((***\\((*E &&((( + 	 	+ )s*   B
CC#C1CC	CCr  r  r  c                   K   t         j                  | _        | j                  j	                  |||       d {    | j
                  j                         D ]   }||j	                  |||       d {    " y 7 B7 	wrU   )rH   rM   r   r+  	__aexit__r-  r  )r[   r  r  r  r   s        rD   r  zAsyncClient.__aexit__  sq      "((oo'')YGGG\\((*E ooh	9EEE + 	H Fs'   6A?A;#A?A?3A=4A?=A?rl   r  )Cr>   r?   r@   rA   r   r   r   rm   r  r"   r'   r%   r$   r/   r#   r  r&   r  r   r   r-   r   r  r  r  r  r.   r  ro   r\   r*  r   r,  r0   r>  r  r(   r)   r+   r=   r*   r   r   r   rx   rP   r   rG  r   rR  rZ  rc  r   rz  r}  r  r  r  r  rw   r:   r  r  rT  r   r  r  r  s   @rD   r;   r;     s   1l ,0370404"+/15KO 6!&'2 9=AEMT1Q: ooi(Q: 0	Q:
 -Q: -Q: Q: ooi(Q: Q: Q: .Q: s4F/F GHQ: Q: Q: Q:  !Q:" __NN3FOOCO,L MMN
#Q:( )Q:* ??#56+Q:, __V__S&**_=>-Q:. /Q:0 !,,sFOOUGSL,I'IJ1Q:j #+/'9=AE

 ooi(
 	

 
 
 ??#56
 __V__S&**_=>
 
 

: #+/'

 
 ooi(	

 
 
 
 
 

&	c 	.@ 	  48-1/3,0370404@RAS@R9=.V.V .V
 0.V ook*.V |,.V oofjj).V 0.V -.V -.V ll9&6<=.V !,,t-='=>.V l,<<=.V OO$56.V  
!.V`  48-1/3,0370404:LAS@R9=1$1$ 1$
 01$ ook*1$ |,1$ oofjj)1$ 01$ -1$ -1$ ll9&6671$ !,,t-='=>1$ l,<<=1$ OO$561$  
		h	'!1$ 1$n @RAS// 	/
 ll9&6<=/ !,,t-='=>/ 
/b % %  % 	 %
 X& % 
 %D$$ $ X&	$
 
$L!' !h !N 480404@RAS@R9=

 0	

 -
 -
 ll9&6<=
 !,,t-='=>
 l,<<=
 OO$56
 

B 480404:LAS@R9=

 0	

 -
 -
 ll9&667
 !,,t-='=>
 l,<<=
 OO$56
 

B 480404:LAS@R9=

 0	

 -
 -
 ll9&667
 !,,t-='=>
 l,<<=
 OO$56
 

B 48-1/3,0370404:LAS@R9=#
#
 0	#

 ook*#
 |,#
 oofjj)#
 0#
 -#
 -#
 ll9&667#
 !,,t-='=>#
 l,<<=#
 OO$56#
 
#
R 48-1/3,0370404:LAS@R9=#
#
 0	#

 ook*#
 |,#
 oofjj)#
 0#
 -#
 -#
 ll9&667#
 !,,t-='=>#
 l,<<=#
 OO$56#
 
#
R 48-1/3,0370404:LAS@R9=#
#
 0	#

 ook*#
 |,#
 oofjj)#
 0#
 -#
 -#
 ll9&667#
 !,,t-='=>#
 l,<<=#
 OO$56#
 
#
R 480404:LAS@R9=

 0	

 -
 -
 ll9&667
 !,,t-='=>
 l,<<=
 OO$56
 

:
)q Q $ AE4848	F//&++m"<=F ??=1F ??=1	F
 
FrC   )\rg   enumloggingrm   rD  
contextlibr   r   typesr   r   r   r   r	   r
   _configr   r   r   r   r   r   	_decodersr   _exceptionsr   r   r   r   _modelsr   r   r   r   _status_codesr   _transports.asgir   _transports.baser   r   _transports.defaultr   r   _transports.wsgir    _typesr!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   _urlsr0   r1   _utilsr2   r3   r4   r5   r6   TypeVarr7   r:   r=   r  	getLoggerrn  r   r  keysr   EnumrH   rO   rq   r  r  r  rz   r8   r;   )r   s   0rD   <module>r     s        :  $ 0 0  *  9 8   + ? B +    " $  FNN3h'FNN3m, ( &'  
		7	#[M*
))+&++-C-S
1BS-C
$)) n .$ $. OOCO,	X XvQCZ QChIF* IFe% Ds   )
F&4F&