
    g	                   j   d dl mZ 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l0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z? ddl@mAZAmBZB ddlCmDZDmEZEmFZFmGZGmHZH g dZI ej                  dd      ZK ej                  dd      ZL G d d      ZM eM       ZN ej                  d      ZPde ZQdj                   ej                         D  cg c]
  } | dk7  s	|  c}       ZT G d  d!ej                        ZV G d" d#e=      ZW G d$ d%e1      ZXej                  d&ej                  f   Z[ G d' d(      Z\ G d) de\      Z] G d* de\      Z^yc c} w )+    )annotationsN)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
ProxyTypesQueryParamTypesRequestContentRequestDataRequestExtensionsRequestFilesSyncByteStreamTimeoutTypesVerifyTypes)URLQueryParams)Timer
URLPatternget_environment_proxiesis_https_redirectsame_origin)USE_CLIENT_DEFAULTAsyncClientClientTr:   )boundUr9   c                      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__     B/var/www/openai/venv/lib/python3.12/site-packages/httpx/_client.pyr?   r?   D   s    rE   r?   httpxzpython-httpx/z, identityc                      e Zd ZdZdZdZy)ClientStater         N)r@   rA   rB   UNOPENEDOPENEDCLOSEDrD   rE   rF   rJ   rJ   c   s     H F FrE   rJ   c                  8    e Zd ZdZ	 	 	 	 	 	 	 	 ddZd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.
    c                .    || _         || _        || _        y N_stream	_response_timerselfstreamresponsetimers       rF   __init__zBoundSyncStream.__init__w        !rE   c              #  6   K   | j                   D ]  }|  y wrS   rU   rY   chunks     rF   __iter__zBoundSyncStream.__iter__~   s     \\EK "s   c                    | j                   j                         }t        j                  |      | j                  _        | j                  j                          y N)seconds)rW   sync_elapseddatetime	timedeltarV   elapsedrU   closerY   rf   s     rF   rk   zBoundSyncStream.close   s;    ++**,!)!3!3G!DrE   N)rZ   r.   r[   r   r\   r3   returnNone)rm   ztyping.Iterator[bytes]rm   rn   )r@   rA   rB   rC   r]   rc   rk   rD   rE   rF   rQ   rQ   q   s6    
$08AF	rE   rQ   c                  8    e Zd ZdZ	 	 	 	 	 	 	 	 ddZd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.
    c                .    || _         || _        || _        y rS   rT   rX   s       rF   r]   zBoundAsyncStream.__init__   r^   rE   c               H   K   | j                   2 3 d {   }| 7 
6 y wrS   r`   ra   s     rF   	__aiter__zBoundAsyncStream.__aiter__   s!     << 	%K	<s   "  " "c                   K   | j                   j                          d {   }t        j                  |      | j                  _        | j                  j                          d {    y 7 L7 wre   )rW   async_elapsedrh   ri   rV   rj   rU   acloserl   s     rF   rw   zBoundAsyncStream.aclose   sQ     1133!)!3!3G!Dll!!### 4#s"   A1A-AA1'A/(A1/A1N)rZ   r"   r[   r   r\   r3   rm   rn   )rm   ztyping.AsyncIterator[bytes]ro   )r@   rA   rB   rC   r]   rt   rw   rD   rE   rF   rq   rq      s6    
%19BG	$rE   rq   .c                     e Zd Zddddededdddd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d(dZed)d       Zed)d	       Zd*d
Z		 	 	 	 	 	 d+dZ
ed,d       Zej                  d-d       Zed.d       Zej                  d/d       Zed0d       Zej                  d1d       Zed2d       Zej                  d3d       Zed4d       Zej                  d5d       Zed6d       Zej                  d7d       Zed8d       Zej                  d9d       Zdddddddedd		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d:dZd;dZd<d=dZd<d>dZ	 d<	 	 	 d?dZd@d Zef	 	 	 	 	 dAd!ZdBd"ZdCd#ZdDd$ZdEd%Z	 	 	 	 	 	 dFd&ZdGd'Z y)H
BaseClientNF Tutf-8authparamsheaderscookiestimeoutfollow_redirectsmax_redirectsevent_hooksbase_url	trust_envdefault_encodingc                  |i n|}| j                  t        |	            | _        | j                  |      | _        t        |      | _        t        |      | _        t        |      | _
        t        |      | _        || _        || _        t        |j!                  dg             t        |j!                  dg             d| _        |
| _        || _        t(        j*                  | _        y Nrequestr[   )r   r[   )_enforce_trailing_slashr1   	_base_url_build_auth_authr2   _paramsr   r   r   _cookiesr   _timeoutr   r   listget_event_hooks
_trust_env_default_encodingrJ   rM   _state)rY   r}   r~   r   r   r   r   r   r   r   r   r   s               rF   r]   zBaseClient.__init__   s     (/b[55c(mD%%d+
"6*w'(( 0*KOOIr:;[__Z<=
 $!1!**rE   c                <    | j                   t        j                  k(  S )z2
        Check if the client being closed
        )r   rJ   rO   rY   s    rF   	is_closedzBaseClient.is_closed   s    
 {{k0000rE   c                    | j                   S rS   )r   r   s    rF   r   zBaseClient.trust_env   s    rE   c                z    |j                   j                  d      r|S |j                  |j                   dz         S )N   /raw_path)r   endswith	copy_withrY   urls     rF   r   z"BaseClient._enforce_trailing_slash   s3    <<  &J}}cllT&9}::rE   c                   |>|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://)r5   itemsr   
isinstancedictstrr1   )rY   proxiesallow_env_proxieskeyr   new_proxiesvalueproxys           rF   _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 rS   )r   r   s    rF   r   zBaseClient.timeout   s    }}rE   c                $    t        |      | _        y rS   )r   r   )rY   r   s     rF   r   zBaseClient.timeout       (rE   c                    | j                   S rS   )r   r   s    rF   r   zBaseClient.event_hooks   s       rE   c                |    t        |j                  dg             t        |j                  dg             d| _        y r   )r   r   r   )rY   r   s     rF   r   zBaseClient.event_hooks   s4     KOOIr:;[__Z<=
rE   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    rF   r}   zBaseClient.auth   s     zzrE   c                0    | j                  |      | _        y rS   )r   r   rY   r}   s     rF   r}   zBaseClient.auth  s    %%d+
rE   c                    | j                   S )zK
        Base URL to use when sending requests with relative URLs.
        )r   r   s    rF   r   zBaseClient.base_url  s    
 ~~rE   c                B    | j                  t        |            | _        y rS   )r   r1   r   r   s     rF   r   zBaseClient.base_url  s    55c#h?rE   c                    | j                   S )z@
        HTTP headers to include when sending requests.
        )_headersr   s    rF   r   zBaseClient.headers      
 }}rE   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   )rY   r   client_headerss      rF   r   zBaseClient.headers  sJ     !$3$:$:7$C,)009	
 	g&&rE   c                    | j                   S )zA
        Cookie values to include when sending requests.
        )r   r   s    rF   r   zBaseClient.cookies*  r   rE   c                $    t        |      | _        y rS   )r   r   )rY   r   s     rF   r   zBaseClient.cookies1  r   rE   c                    | j                   S )zO
        Query parameters to include in the URL when sending requests.
        )r   r   s    rF   r~   zBaseClient.params5  s    
 ||rE   c                $    t        |      | _        y rS   )r2   r   )rY   r~   s     rF   r~   zBaseClient.params<  s    "6*rE   )	contentdatafilesjsonr~   r   r   r   
extensionsc       	        P   | j                  |      }| j                  |      }| j                  |	      }	| j                  |      }|i n|}d|vrDt	        |
t
              r| j                  n
t        |
      }
t        di |d|
j                         i}t        |||||||||	|
      S )aR  
        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/clients/#request-instances
        r   )r   r   r   r   r~   r   r   r   rD   )
_merge_url_merge_headers_merge_cookies_merge_queryparamsr   r?   r   r   r   as_dictr   )rY   methodr   r   r   r   r   r~   r   r   r   r   s               rF   build_requestzBaseClient.build_request@  s    4 ooc"%%g.%%g.((0%-R:
J& g'78 W% 
 F
FGOO4EFJ!
 	
rE   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   )r1   is_relative_urlr   r   lstripr   )rY   r   	merge_urlmerge_raw_paths       rF   r   zBaseClient._merge_urls  s\    
 H	$$ "]]33i6H6H6O6OPT6UUN==**N*CCrE   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   )rY   r   merged_cookiess      rF   r   zBaseClient._merge_cookies  s4    
 dll$T\\2N!!'*!!rE   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   )rY   r   merged_headerss      rF   r   zBaseClient._merge_headers  s&    
 !.g&rE   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~   r2   merge)rY   r~   merged_queryparamss      rF   r   zBaseClient._merge_queryparams  s2     T[[!,T[[!9%++F33rE   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     rF   r   zBaseClient._build_auth  s]    <e$d1gQ@@d#Kd^T**7x@AArE   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	   )rY   r   r}   r   r   s        rF   _build_request_authzBaseClient._build_request_auth  sk     %T+;<DJJ$BRBRSWBX 	 K$[[117;;3G3G(xhBBvrE   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   rZ   r   )_redirect_method_redirect_url_redirect_headers_redirect_streamr   r   r   r   )rY   r   r[   r   r   r   rZ   r   s           rF   _build_redirect_requestz"BaseClient._build_redirect_request  s    
 &&w9  (3((#v>&&w7$,,'))
 	
rE   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)rY   r   r[   r   s       rF   r   zBaseClient._redirect_method  st    
  5??2v7GF 5;;.6V3CF 5#:#::v?OFrE   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   r1   r   r   schemer   r   r   r   joinr   )rY   r   r[   locationr   excs         rF   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   r7   r   r6   popnetlocdecoder   )rY   r   r   r   r   s        rF   r   zBaseClient._redirect_headers  s     '//*3,$W[[#6 OT2 "jj//8GFOW^^#% KK($/KK+T2 	Hd#rE   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   rZ   )rY   r   r   s      rF   r   zBaseClient._redirect_stream)  s#     W^^#%~~rE   c                    d|j                   vrht        | j                  t              r| j                  nt	        | j                        }t        di |j                   d|j                         i|_         y y )Nr   rD   )r   r   r   r?   r   r   r   )rY   r   r   s      rF   _set_timeoutzBaseClient._set_timeout4  sd    G... dll,<= T\\* 
 "&!V(:(:!VGOODU!VG /rE   )r}   AuthTypes | Noner~   QueryParamTypes | Noner   HeaderTypes | Noner   CookieTypes | Noner   r/   r   boolr   intr   +None | typing.Mapping[str, list[EventHook]]r   	URL | strr   r  r   #str | typing.Callable[[bytes], str]rm   rn   )rm   r  )r   r1   rm   r1   )r   ProxiesTypes | Noner   r  rm   zdict[str, Proxy | None])rm   r   )r   r/   rm   rn   )rm   dict[str, list[EventHook]])r   r  rm   rn   )rm   Auth | None)r}   r#   rm   rn   )rm   r1   )r   r  rm   rn   )rm   r   )r   r&   rm   rn   )rm   r   )r   r%   rm   rn   )rm   r2   )r~   r)   rm   rn   )r   r   r   r  r   RequestContent | Noner   RequestData | Noner   RequestFiles | Noner   typing.Any | Noner~   r  r   r  r   r  r   TimeoutTypes | UseClientDefaultr   RequestExtensions | Nonerm   r   )r   r  rm   r1   rS   )r   r  rm   r  )r   r  rm   r  )r~   r  rm   r  )r}   r  rm   r  )r   r   r}   #AuthTypes | UseClientDefault | Nonerm   r	   )r   r   r[   r   rm   r   )r   r   r[   r   rm   r   )r   r   r[   r   rm   r1   )r   r   r   r1   r   r   rm   r   )r   r   r   r   rm   z'SyncByteStream | AsyncByteStream | None)r   r   rm   rn   )!r@   rA   rB   r   r   r]   propertyr   r   r   r   r   setterr   r}   r   r   r   r~   r8   r   r   r   r   r   r   r   r   r   r   r   r   r  rD   rE   rF   ry   ry      sL    "&)-&*&* 6!&2EI @G +  + '	 +
 $ + $ +  +  +  + C +  +  + > + 
 +D 1 1  ;
%*%?C%	 %(   ^^) ) ! ! 
 
   
[[, ,   __@ @   ^^
' 
'   ^^) )   ]]+ + *.#'%)"&)-&*&*3E/31
1
 1

 '1
 !1
 #1
  1
 '1
 $1
 $1
 11
 -1
 
1
f,	 04
,
	

B 5G 2 
	$
&.:6		(+		0	WrE   ry   c                  T    e Zd ZdZdddddddddddedeeddddddd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d fdZddddedddf	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d d	Zddddedf	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d!d
Z	d"dZ
dddddddeeedd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d#dZedddddddeeedd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d$d       Zdeed	 	 	 	 	 	 	 	 	 d%dZ	 	 	 	 	 	 	 	 	 	 d&dZ	 	 	 	 	 	 	 	 d'dZd(dZdddeeedd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d)dZdddeeedd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d*dZdddeeedd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d*dZdddddddeeedd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d+dZdddddddeeedd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d+dZdddddddeeedd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d+dZdddeeedd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d*dZd,dZd-dZ	 	 	 d.	 	 	 	 	 	 	 d/dZ xZS )0r:   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).
    * **http2** - *(optional)* A boolean indicating if HTTP/2 support should be
    enabled. Defaults to `False`.
    * **proxy** - *(optional)* A proxy URL where all the traffic should be routed.
    * **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".
    NTFrz   r{   r}   r~   r   r   verifycerthttp1http2r   r   mountsr   r   limitsr   r   r   	transportappr   r   c               2   t         |   |||||||||||       |r	 dd l}|
r)d}t	        j
                  |t               |	rt        d      |rd}t	        j
                  |t               |xr
 |d u xr |d u }| j                  |
xs |	|      }| 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   uUsing http2=True, but the 'h2' package is not installed. Make sure to install httpx using `pip install httpx[http2]`.JThe 'proxies' argument is now deprecated. Use 'proxy' or 'mounts' instead.*Use either `proxy` or 'proxies', not both.zhThe 'app' shortcut is now deprecated. Use the explicit style 'transport=WSGITransport(app=...)' instead.r$  r%  r&  r'  r)  r*  r+  r   r$  r%  r&  r'  r)  r   superr]   h2ImportErrorwarningswarnDeprecationWarningRuntimeErrorr   _init_transport
_transportr   r4   _init_proxy_transport_mountsr   r   sortedrY   r}   r~   r   r   r$  r%  r&  r'  r   r   r(  r   r   r)  r   r   r   r*  r+  r   r   r4  messager   	proxy_mapr   	__class__s                              rF   r]   zClient.__init__t  s   2 	-'#- 	 	
  4  MM'#56"#OPPV  MM'#56%K#+K)t:K''(85:KL	.. / 	
, (oo/@
 0
U sO} "++# , 
 0@
 LLBH,,.Q.YC)+.Q F4<<#5#5#789m  !S F@
  R   E4 0F$F
4F
c	                H    ||S |t        |      S t        ||||||      S N)r+  r1  )r!   r    	rY   r$  r%  r&  r'  r)  r*  r+  r   s	            rF   r:  zClient._init_transport  s?      ? S))
 	
rE   c           	     &    t        |||||||      S N)r$  r%  r&  r'  r)  r   r   )r    rY   r   r$  r%  r&  r'  r)  r   s           rF   r<  zClient._init_proxy_transport  s&     
 	
rE   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;  rY   r   patternr*  s       rF   _transport_for_urlzClient._transport_for_url  L    
 #',,"4"4"6GYs#*3*;tJJ #7 rE   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/clients/#merging-of-configuration
        Setting 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   r6  r7  r8  r   sendrY   r   r   r   r   r   r   r~   r   r   r}   r   r   r   r@  r   s                   rF   r   zClient.request  su    B C 
 MM'#56$$! % 
 yyt>NyOOrE   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
        rU  T)r   r}   r   rZ   N)r   rX  rk   rY   r   r   r   r   r   r   r~   r   r   r}   r   r   r   r   r[   s                   rF   rZ   zClient.streamG  s}     8 $$! % 
 99-	  
	NNNHNNs   2AA
 A
AArZ   r}   r   c                  | j                   t        j                  k(  rt        d      t        j                  | _         t        |t              r| j                  n|}| j                  |       | 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/clients/#request-instances
        5Cannot send a request, as the client has been closed.r}   r   historyN)r   rJ   rO   r9  rN   r   r?   r   r  r   _send_handling_authreadBaseExceptionrk   rY   r   rZ   r}   r   r[   r  s          rF   rX  zClient.send{  s    * ;;+,,,VWW!(( *,<= !!! 	 	'"''6++-	 , 
	O 	NNI	s   B) )	C	2CC	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   ra  )sync_auth_flownext_send_handling_redirectsrX  StopIterationrk   r   ra  rc  appendrd  	rY   r   r}   r   ra  	auth_flowr[   next_requestr  s	            rF   rb  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   r[   )lenr   r   r   _send_single_requestr   ra  has_redirect_locationr   rc  ro  rd  rk   rY   r   r   ra  hookr[   r  s          rF   rj  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r[   r\   HTTP Request: %s %s "%s %d %s")rP  r   r3   
sync_startr   rZ   r.   r9  r   handle_requestr   rQ   r   extract_cookiesr   r   loggerinfor   http_versionr   reason_phraserY   r   r*  r\   r[   s        rF   rs  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   r  r   	rY   r   r~   r   r   r}   r   r   r   s	            rF   r   z
Client.get  s5    " ||-!  

 
	
rE   c               6    | j                  d||||||||	      S )Z
        Send an `OPTIONS` request.

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

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

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

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

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

        **Parameters**: See `httpx.request`.
        DELETEr  r   r  s	            rF   deletezClient.delete  s5    " ||-!  

 
	
rE   c                   | j                   t        j                  k7  rbt        j                  | _         | j                  j	                          | j
                  j                         D ]  }||j	                           yyz.
        Close transport and proxies.
        N)r   rJ   rO   r;  rk   r=  values)rY   r*  s     rF   rk   zClient.close  s_     ;;+,,,%,,DKOO!!#!\\002	(OO% 3	 -rE   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   rJ   rM   rN   rO   r9  r;  	__enter__r=  r  )rY   msgr*  s      rF   r  zClient.__enter__  s    ;;+...""$S""O
 kkC s##!((!!#,,.I$##% / rE   c                    t         j                  | _        | j                  j	                  |||       | j
                  j                         D ]  }||j	                  |||        y rS   )rJ   rO   r   r;  __exit__r=  r  )rY   exc_type	exc_value	tracebackr*  s        rF   r  zClient.__exit__  sV     "((  9i@,,.I$""8Y	B /rE   ),r}   r  r~   r  r   r  r   r  r$  r0   r%  CertTypes | Noner&  r  r'  r  r   ProxyTypes | Noner   r  r(  z0None | typing.Mapping[str, BaseTransport | None]r   r/   r   r  r)  r   r   r  r   r  r   r  r*  BaseTransport | Noner+  'typing.Callable[..., typing.Any] | Noner   r  r   r  rm   rn   )r$  r0   r%  r  r&  r  r'  r  r)  r   r*  r  r+  r  r   r  rm   r   )r   r   r$  r0   r%  r  r&  r  r'  r  r)  r   r   r  rm   r   )r   r1   rm   r   r   r   r   r  r   r  r   r  r   r  r   r  r~   r  r   r  r   r  r}   r  r   bool | UseClientDefaultr   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  r   r  r   r  r   r  rm   ztyping.Iterator[Response]
r   r   rZ   r  r}   r  r   r  rm   r   
r   r   r}   r	   r   r  ra  list[Response]rm   r   r   r   r   r  ra  r  rm   r   r   r   rm   r   r   r  r~   r  r   r  r   r  r}   r  r   r  r   r  r   r  rm   r   r   r  r~   r  r   r  r   r  r}   AuthTypes | UseClientDefaultr   r  r   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  r   r  r   r  rm   r   ro   )rY   r;   rm   r;   NNNr  ztype[BaseException] | Noner  zBaseException | Noner  zTracebackType | Nonerm   rn   )r@   rA   rB   rC   r   r   r   r]   r:  r<  rP  r8   r   r   rZ   rX  rb  rj  rs  r   r  r  r  r  r  r  rk   r  r  __classcell__rB  s   @rF   r:   r:   >  sh   3p "&)-&*&*"!%#''+EI 6!&'2EI *.7;@G/`: `: '	`:
 $`: $`: `: `: `: `: !`: %`: C`: `: `:  !`:" #`:$ C%`:& '`:( ()`:* 5+`:, -`:. >/`:0 
1`:H #!%'*.7;

 
 	

 
 
 (
 5
 
 

: #!%'

 
 	

 
 
 
 
 

(	  *.#'%)"&)-&*&*4F4F3E/36P6P 6P
 '6P !6P #6P  6P '6P $6P $6P 26P 26P 16P -6P  
!6Pp  *.#'%)"&)-&*&*4F4F3E/311 1
 '1 !1 #1  1 '1 $1 $1 21 21 11 -1  
#!1 1n 4F4F11 	1
 21 21 
1f     	 
    
 D## #  	#
 
#J"P *.&*&*4F4F3E/3

 '	

 $
 $
 2
 2
 1
 -
 

B *.&*&*-?4F3E/3

 '	

 $
 $
 +
 2
 1
 -
 

B *.&*&*-?4F3E/3

 '	

 $
 $
 +
 2
 1
 -
 

B *.#'%)"&)-&*&*-?4F3E/3#
#
 '	#

 !#
 ##
  #
 '#
 $#
 $#
 +#
 2#
 1#
 -#
 
#
R *.#'%)"&)-&*&*-?4F3E/3#
#
 '	#

 !#
 ##
  #
 '#
 $#
 $#
 +#
 2#
 1#
 -#
 
#
R *.#'%)"&)-&*&*-?4F3E/3#
#
 '	#

 !#
 ##
  #
 '#
 $#
 $#
 +#
 2#
 1#
 -#
 
#
R *.&*&*-?4F3E/3

 '	

 $
 $
 +
 2
 1
 -
 

:
&( 04*.*.	C,C (C (	C
 
CrE   c                  T    e Zd ZdZdddddddddddedeeddddddd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d fdZddddedddf	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d d	Zddddedf	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d!d
Z	d"dZ
dddddddeeedd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d#dZedddddddeeedd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d$d       Zdeed	 	 	 	 	 	 	 	 	 d%dZ	 	 	 	 	 	 	 	 	 	 d&dZ	 	 	 	 	 	 	 	 d'dZd(dZdddeeedd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d)dZdddeeedd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d*dZdddeeedd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d*dZdddddddeeedd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d+dZdddddddeeedd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d+dZdddddddeeedd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d+dZdddeeedd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d*dZd,dZd-dZ	 	 	 d.	 	 	 	 	 	 	 d/dZ xZS )0r9   a	  
    An asynchronous HTTP client, with connection pooling, HTTP/2, redirects,
    cookie persistence, etc.

    It can be shared between tasks.

    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`.
    * **proxy** - *(optional)* A proxy URL where all the traffic should be routed.
    * **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".
    NTFrz   r{   r#  c               2   t         |   |||||||||||       |r	 dd l}|
r)d}t	        j
                  |t               |	rt        d      |rd}t	        j
                  |t               |xr
 |d u xr |d u }| j                  |
xs |	|      }| 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   r-  r.  r/  zhThe 'app' shortcut is now deprecated. Use the explicit style 'transport=ASGITransport(app=...)' instead.r0  r1  r2  r?  s                              rF   r]   zAsyncClient.__init___  s   2 	-'#- 	 	
  4  MM'#56"#OPPV  MM'#56%K#+K)t:K''(85:KL	.. / 	
. (oo/E
 0
U sO} "++# , 
 0E
 LLBH,,.Q.YC)+.Q F4<<#5#5#789m  !S HE
  RrC  c	                H    ||S |t        |      S t        ||||||      S rE  )r   r   rF  s	            rF   r:  zAsyncClient._init_transport  s?      ? S))!
 	
rE   c           	     &    t        |||||||      S rH  )r   rI  s           rF   r<  z!AsyncClient._init_proxy_transport  s&     "
 	
rE   c                    | j                   j                         D ]*  \  }}|j                  |      s|| j                  c S |c S  | j                  S rK  rL  rN  s       rF   rP  zAsyncClient._transport_for_url  rQ  rE   rR  c                  K   |	d}t        j                  |t               | 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/clients/#merging-of-configuration
        NrT  rU  rV  rW  rY  s                   rF   r   zAsyncClient.request  s     D C 
 MM'#56$$! % 
 YYwTDTYUUUUs   AAAAc                 K   | j                  |||||||||	||      }| j                  ||
|d       d{   }	 | |j                          d{    y7 #7 # |j                          d{  7   w xY wwr[  )r   rX  rw   r\  s                   rF   rZ   zAsyncClient.stream3  s     8 $$! % 
 -	 # 
 
	$N//###
 $(//###sD   5A=AA=A A=AA=A=A:3A64A::A=r]  c                 K   | j                   t        j                  k(  rt        d      t        j                  | _         t        |t              r| j                  n|}| j                  |       | 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/clients/#request-instances
        r_  r`  N)r   rJ   rO   r9  rN   r   r?   r   r  r   rb  areadrd  rw   re  s          rF   rX  zAsyncClient.sendg  s     * ;;+,,,VWW!(( *,<= !!! 	 	'"''611-	 2 
 
	nn&&&O
 '  	//###I	sT   BC+B;C+B? 4B=5B? :C+=B? ?	C(C#CC##C((C+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rg  )async_auth_flow	__anext__rj  asendStopAsyncIterationrw   r   ra  r  rl  rd  rm  s	            rF   rb  zAsyncClient._send_handling_auth  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rq  )rr  r   r   r   rs  r   ra  rt  r   r  ro  rd  rw   ru  s          rF   rj  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)rx  Nz?Attempted to send an sync request with an AsyncClient instance.r   ry  rz  )rP  r   r3   async_startr   rZ   r"   r9  r   handle_async_requestr   rq   r   r}  r   r   r~  r  r   r  r   r  r  s        rF   rs  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r  c               R   K   | j                  d||||||||	       d{   S 7 w)r  r   r  Nr   r  s	            rF   r   zAsyncClient.get  sC     " \\-! " 

 

 
	
 

   '%'c               R   K   | j                  d||||||||	       d{   S 7 w)r  r  r  Nr   r  s	            rF   r  zAsyncClient.options"  sC     " \\-! " 

 

 
	
 

r  c               R   K   | j                  d||||||||	       d{   S 7 w)r  r   r  Nr   r  s	            rF   r  zAsyncClient.head?  sC     " \\-! " 

 

 
	
 

r  c               Z   K   | j                  d|||||||||	|
||       d{   S 7 w)r  r   rR  Nr   r  s                rF   r  zAsyncClient.post\  sO     * \\-! " 
 
 	
 
   "+)+c               Z   K   | j                  d|||||||||	|
||       d{   S 7 w)r  r  rR  Nr   r  s                rF   r  zAsyncClient.put  sO     * \\-! " 
 
 	
 
r  c               Z   K   | j                  d|||||||||	|
||       d{   S 7 w)r  r  rR  Nr   r  s                rF   r  zAsyncClient.patch  sO     * \\-! " 
 
 	
 
r  c               R   K   | j                  d||||||||	       d{   S 7 w)r  r  r  Nr   r  s	            rF   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   rJ   rO   r;  rw   r=  r  )rY   r   s     rF   rw   zAsyncClient.aclose  sy      ;;+,,,%,,DK//((***,,.$,,.(( /	 - + )s*   ABB#B7B
B	BB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   rJ   rM   rN   rO   r9  r;  
__aenter__r=  r  )rY   r  r   s      rF   r  zAsyncClient.__aenter__  s     ;;+...""$S""O
 kkC s##!((oo((***\\((*E &&((( + 	 	+ )s*   B
CC#C1CC	CCc                  K   t         j                  | _        | j                  j	                  |||       d {    | j
                  j                         D ]   }||j	                  |||       d {    " y 7 B7 	wrS   )rJ   rO   r   r;  	__aexit__r=  r  )rY   r  r  r  r   s        rF   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?),r}   r  r~   r  r   r  r   r  r$  r0   r%  r  r&  r  r'  r  r   r  r   r  r(  z5None | typing.Mapping[str, AsyncBaseTransport | None]r   r/   r   r  r)  r   r   r  r   r  r   r  r*  AsyncBaseTransport | Noner+  r  r   r  r   r  rm   rn   )r$  r0   r%  r  r&  r  r'  r  r)  r   r*  r  r+  r  r   r  rm   r   )r   r   r$  r0   r%  r  r&  r  r'  r  r)  r   r   r  rm   r   )r   r1   rm   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   r  r   r  rm   ztyping.AsyncIterator[Response]r  r  r  r  r  r  r  ro   )rY   r=   rm   r=   r  r  )r@   rA   rB   rC   r   r   r   r]   r:  r<  rP  r8   r   r   rZ   rX  rb  rj  rs  r   r  r  r  r  r  r  rw   r  r  r  r  s   @rF   r9   r9   (  sh   4r "&)-&*&*"!%#''+JN 6!&'2EI /37;@G/`: `: '	`:
 $`: $`: `: `: `: `: !`: %`: H`: `: `:  !`:" #`:$ C%`:& '`:( -)`:* 5+`:, -`:. >/`:0 
1`:H #!%'/37;

 
 	

 
 
 -
 5
 
 

: #!%'

 
 	

 
 
 
 
 

(	  *.#'%)"&)-&*&*4F4F3E/37V7V 7V
 '7V !7V #7V  7V '7V $7V $7V 27V 27V 17V -7V  
!7Vr  *.#'%)"&)-&*&*4F4F3E/31$1$ 1$
 '1$ !1$ #1$  1$ '1$ $1$ $1$ 21$ 21$ 11$ -1$  
(!1$ 1$n 4F4F11 	1
 21 21 
1f % %  % 	 %
   % 
 %D$$ $  	$
 
$L!N *.&*&*4F4F3E/3

 '	

 $
 $
 2
 2
 1
 -
 

B *.&*&*-?4F3E/3

 '	

 $
 $
 +
 2
 1
 -
 

B *.&*&*-?4F3E/3

 '	

 $
 $
 +
 2
 1
 -
 

B *.#'%)"&)-&*&*-?4F3E/3#
#
 '	#

 !#
 ##
  #
 '#
 $#
 $#
 +#
 2#
 1#
 -#
 
#
R *.#'%)"&)-&*&*-?4F3E/3#
#
 '	#

 !#
 ##
  #
 '#
 $#
 $#
 +#
 2#
 1#
 -#
 
#
R *.#'%)"&)-&*&*-?4F3E/3#
#
 '	#

 !#
 ##
  #
 '#
 $#
 $#
 +#
 2#
 1#
 -#
 
#
R *.&*&*-?4F3E/3

 '	

 $
 $
 +
 2
 1
 -
 

:
)( 04*.*.	F,F (F (	F
 
FrE   )_
__future__r   rh   enumloggingtypingr6  
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/   r0   _urlsr1   r2   _utilsr3   r4   r5   r6   r7   __all__TypeVarr;   r=   r?   r8   	getLoggerr~  r   r   keysr   EnumrJ   rQ   rq   CallableAny	EventHookry   r:   r9   )r   s   0rF   <module>r     s   "      :  $ 0 0  *  9 8   + ? B +    " $  : FNN3h'FNN3m, ( &'  
		7	#[M*
))+&++-C-S
1BS-C
$)) n .$ $. OOCO,	YW YWxgCZ gCTiF* iFS& Ds   3
F0>F0