%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python37/lib64/python3.7/site-packages/aiohttp/__pycache__/
Upload File :
Create Path :
Current File : //opt/alt/python37/lib64/python3.7/site-packages/aiohttp/__pycache__/client.cpython-37.pyc

B

�Z�_���@s�dZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
mZddlm
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZddlZddlmZm Z m!Z!m"Z"ddl#m$Z$ddl%m&Z&m'Z'm(Z(dd	l)m*Z*dd
l+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>ddl?m@Z@mAZAmBZBmCZCmDZDddlEmFZFdd
lGmHZHmIZImJZJmKZKddlLmMZMddlNmOZOmPZPmQZQmRZRmSZSmTZTmUZUmVZVmWZWddl'mXZXmYZYmZZZm[Z[ddl\m]Z]m^Z^m_Z_m`Z`ddlambZbddlcmdZdmeZeddlfmgZgmhZhmiZimjZjdZkyddllmmZmWnenk
�rFeoZmYnXejpdddd�Gdd�d��Zqeqdd�Zred�ZsGdd�d�ZtGd d!�d!ee
e
esfees�ZuGd"d#�d#eueA�ZvGd$d%�d%eueF�ZwGd&d'�d'�Zxdddddddd(ddd)ddddeVde'jydddd*�ezejeeezezfe
e
eeieeezeeQe{e|eezee{e{ee{e{eejeeQeeqeofeeheYeeHee|eej}exd+�d,d-�Z~dS).zHTTP Client for asyncio.�N)�SimpleNamespace�
TracebackType)�Any�	Awaitable�Callable�	Coroutine�	FrozenSet�	Generator�Generic�Iterable�List�Mapping�Optional�Set�Tuple�Type�TypeVar�Union)�CIMultiDict�	MultiDict�MultiDictProxy�istr)�URL�)�hdrs�http�payload)�AbstractCookieJar)�ClientConnectionError�ClientConnectorCertificateError�ClientConnectorError�ClientConnectorSSLError�ClientError�ClientHttpProxyError�
ClientOSError�ClientPayloadError�ClientProxyConnectionError�ClientResponseError�ClientSSLError�ContentTypeError�
InvalidURL�ServerConnectionError�ServerDisconnectedError�ServerFingerprintMismatch�ServerTimeoutError�TooManyRedirects�WSServerHandshakeError)�
ClientRequest�ClientResponse�Fingerprint�RequestInfo�_merge_ssl_params)�ClientWebSocketResponse)�
BaseConnector�NamedPipeConnector�TCPConnector�
UnixConnector)�	CookieJar)	�DEBUG�PY_36�	BasicAuth�CeilTimeout�
TimeoutHandle�get_running_loop�proxies_from_env�sentinel�strip_auth_from_url)�WS_KEY�HttpVersion�WebSocketReader�WebSocketWriter)�WSHandshakeError�	WSMessage�
ws_ext_gen�ws_ext_parse)�FlowControlDataQueue)�Trace�TraceConfig)�JSONEncoder�LooseCookies�LooseHeaders�StrOrURL)rrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r7r9r:r8r6�
ClientSession�
ClientTimeout�request)�
SSLContextT)Zauto_attribs�frozen�slotsc@sNeZdZUdZeeed<dZeeed<dZeeed<dZ	eeed<dS)rUN�total�connect�	sock_read�sock_connect)
�__name__�
__module__�__qualname__rZr�float�__annotations__r[r\r]�rcrc�A/opt/alt/python37/lib64/python3.7/site-packages/aiohttp/client.pyrU�s
rUi,)rZ�_RetTypecseZdZdZedddddddd	d
ddd
dddddddddg�ZdZddddddeje	e
eej
dddededddddd�eeeejeeeeeeeeeeee	ee
eeeeeeeeeefeeeee feeeee!e"e#dd�dd�Z$eddd�d d!�Z%e&�r*ee'dd"��fd#d$�Z(e)fe'dd%�d&d'�Z*ee+e'd(d)�d*d+�Z,ddddddddd,dddddddedddddddd-�ee+ee-eefe'e'eeeeeeeeeee#eeeeeeeeee+eeee efeeee.ee/eee/ee0feeee1ee#e
d.�d/d0�Z2e3j4d1d2ddddddddddddddd3d4d5�e+eeeeeeeeeeeeeeeeee+eeee/ede0feeee.ee/eee#e#d6d7�d8d9�Z5e3j4d1d2ddddddddddddddd3d4d5�e+eeeeeeeeeeeeeeeeee+eeee/ede0feeee.ee/eee#e#ed7�d:d;�Z6eed<d=�d>d?�Z7dd@�e+ee'd(dA�dBdC�Z8dd@�e+ee'd(dA�dDdE�Z9dd@�e+ee'd(dA�dFdG�Z:ddH�e+e'e'd(dI�dJdK�Z;ddH�e+e'e'd(dI�dLdM�Z<ddH�e+e'e'd(dI�dNdO�Z=e+e'd(dP�dQdR�Z>ddS�dTdU�Z?e@edS�dVdW��ZAe@eedS�dXdY��ZBe@edS�dZd[��ZCe@eDe#e#fdS�d\d]��ZEe@edS�d^d_��ZFeFjGedd`�dad_��ZFe@ejdS�dbdc��ZHe@eee fdS�ddde��ZIe@d<dS�dfdg��ZJe@eKeLdS�dhdi��ZMe@eedS�djdk��ZNe@edS�dldm��ZOe@edS�dndo��ZPe@eeeQe
geRdffdS�dpdq��ZSe@edS�drds��ZTe@edS�dtdu��ZUe@e!e"dS�dvdw��ZVddS�dxdy�ZWddS�dzd{�ZXeeeYeeYeeZdd|�d}d~�Z[ddS�dd��Z\eeeYeeYeeZdd|�d�d��Z]�Z^S)�rTz/First-class interface for making HTTP requests.�_source_traceback�
_connector�requote_redirect_url�_loop�_cookie_jar�_connector_owner�
_default_auth�_version�_json_serialize�_requote_redirect_url�_timeout�_raise_for_status�_auto_decompress�
_trust_env�_default_headers�_skip_auto_headers�_request_class�_response_class�_ws_response_class�_trace_configs�
_read_bufsizeNTFi)�	connector�loop�cookies�headers�skip_auto_headers�auth�json_serialize�
request_class�response_class�ws_response_class�version�
cookie_jar�connector_owner�raise_for_status�read_timeout�conn_timeout�timeout�auto_decompress�	trust_envrh�
trace_configs�read_bufsize)r{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�rhr�r��returncCs�|dkr|dk	r|j}t|�}|dkr0t|d�}|j|k	rBtd��||_|��rbt�t�d��|_	|dkrtt
|d�}||_|dk	r�|j�|�||_
|
|_||_||_||_|tk�rt|_|tk	r�tjdtdd�tj|j|d�|_|dk	�r>tj|j|d�|_tjd	tdd�n*||_|tk	�r,td
��|dk	�r>td��||_||_||_||_||_|�rlt |�}nt �}||_!|dk	�r�t"dd
�|D��|_#nt"�|_#||_$|	|_%|
|_&|�p�g|_'x|j'D]}|�(��q�WdS)N)r|z0Session and connector has to use same event looprz8read_timeout is deprecated, use timeout argument instead�)�
stacklevel)rZ)r[z8conn_timeout is deprecated, use timeout argument insteadzGread_timeout and timeout parameters conflict, please setup timeout.readzJconn_timeout and timeout parameters conflict, please setup timeout.connectcSsg|]}t|��qSrc)r)�.0�ircrcrd�
<listcomp>%sz*ClientSession.__init__.<locals>.<listcomp>))rirAr9�RuntimeErrorZ	get_debug�	traceback�
extract_stack�sys�	_getframerfr;rj�update_cookiesrgrkrlrmrnrC�DEFAULT_TIMEOUTrp�warnings�warn�DeprecationWarning�attrZevolve�
ValueErrorrqrrrsrorzrrt�	frozensetrurvrwrxryZfreeze)�selfr{r|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�rhr�r��real_headers�trace_configrcrcrd�__init__�sx









zClientSession.__init__)�clsr�cCstjd�|j�tdd�dS)Nz6Inheritance class {} from ClientSession is discouragedr�)r�)r�r��formatr^r�)r�rcrcrd�__init_subclass__1s
zClientSession.__init_subclass__)�name�valr�cs2||jkr tjd�|�tdd�t��||�dS)Nz8Setting custom ClientSession.{} attribute is discouragedr�)r�)�ATTRSr�r�r�r��super�__setattr__)r�r�r�)�	__class__rcrdr�;s
zClientSession.__setattr__)�	_warningsr�cCs\|jsXtrd|i}ni}|jd|��tf|�|dd�}|jdk	rL|j|d<|j�|�dS)N�sourcezUnclosed client session zUnclosed client session)Zclient_session�messageZsource_traceback)�closedr=r��ResourceWarningrfriZcall_exception_handler)r�r��kwargs�contextrcrcrd�__del__Es



zClientSession.__del__�_RequestContextManager)�method�urlr�r�cKst|j||f|��S)zPerform HTTP request.)r��_request)r�r�r�r�rcrcrdrVSszClientSession.request�
)�params�data�jsonr}r~rr��allow_redirects�
max_redirects�compress�chunked�	expect100r��read_until_eof�proxy�
proxy_authr��
verify_ssl�fingerprint�ssl_context�ssl�
proxy_headers�trace_request_ctxr�)r��
str_or_urlr�r�r�r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�c4�sJ�jrtd��t||||�}|dk	r6|dk	r6td��n|dk	rNtj|�jd�}t|
t�sl|
dk	rlt	�
dt�d}g}�j}��
|�}��
|�}yt|�}Wn,tk
r�}zt|�|�Wdd}~XYnXt�j�} |dk	r�x|D]}!| �t|!��q�W|dk	�r<yt|�}Wn.tk
�r:}zt|�|�Wdd}~XYnX|tk�rN�j}"nt|t��sft|d�}"n|}"t�j|"j�}#|#��}$|dk�r��j}��fdd��jD�}%x"|%D]}&|&�|||�IdH�q�W|#��}'�y
|'��~�xtt|�\}}(|	�r|(�rtd	��|	dk�r|(}	|	dk�r �j }	|dk	�rH|	dk	�rHt!j"|k�rHtd
���j#�$|�})|dk	�r�t%�}*|*�&|�|*�$|�}+|+�r�|)�'|+�|dk	�r�t|�}n<�j(�r�x2t)��*�D]$\},}-|,|j+k�r�|-j,}|-j-}P�q�W�j.||||| ||)|	|||
|�j�j/|||'�|||%d�}.yHt0|"j1�jd��.�j2dk	�s4t3��j2j1|.|%|"d
�IdH}/WdQRXWn6t4j5k
�r�}0zt6d�7|��|0�Wdd}0~0XYnX|/j8dk	�s�t3�|/j9dk	�s�t3�|/j9j:|'|�;�dk|�j<|"j=|d�ypyJ|.�>|/�IdH}1y|1�|/�IdHWn t?k
�r|1�@��YnXWn t?k
�r@|/�@��YnXWnFtAk
�r\�Yn0tBk
�r�}0ztC|0jD�|0�Wdd}0~0XYnX�j#�&|1jE|1jF�|1jGdk�rN|
�rNx$|%D]}&|&�H||||1�IdH�q�W|d7}|�I|1�|�r||k�r|1�@�tJ|djKtL|���|1jGdk�r.|1jMt!jNk�sH|1jGdk�rl|1jMt!jOk�rlt!jP}d}|�Qt!jR��rl|�St!jR�|1jT�Qt!jU��p�|1jT�Qt!jV�}2|2dk�r�Pn|1�W�yt|2�jXd�}3Wn.tk
�r�}zt|2�|�Wdd}~XYnX|3j+},|,dk�r|1�@�td��n|,�s|�Y|3�}3|�Z�|3�Z�k�r:d}	|�St!j"d�|3}d}|1�W��q�P�q�WWdQRX|dk�rp�j[}|�r~|1�\�|$dk	�r�|1j]dk	�r�|1j]�^|$j_�n|$�_�tL|�|1_`x$|%D]}&|&�a||||1�IdH�q�W|1St?k
�rD}zF|#�@�|$�r|$�_�d}$x$|%D]}&|&�b||||�IdH�qW�Wdd}~XYnXdS)NzSession is closedz9data and json parameters can not be used at the same time)�dumpszChunk size is deprecated #1615r)rZcs g|]}t�||j�d���qS))r�)rNZtrace_config_ctx)r�r�)r�r�rcrdr��sz*ClientSession._request.<locals>.<listcomp>z<Cannot combine AUTH argument with credentials encoded in URLzTCannot combine AUTHORIZATION header with AUTH argument or credentials encoded in URL)r�r~rr�r}r�r�r�r�r�r|r�r�r��timer�sessionr�r��traces)r|)r�r�zConnection timeout to host {}ZHEAD)r�Zskip_payloadr�r�r�r�)i-i.i/i3i4ri/)i-i.)Zencoded)rZhttps�z"Can redirect only to http or https)cr�r�r5r�rZJsonPayloadrn�
isinstance�boolr�r�r�rm�_prepare_headersrr*�setru�addrrCrprUr@rirZ�startrzryZsend_request_startr�rDrlrZ
AUTHORIZATIONrjZfilter_cookiesr;r��loadrsrB�items�schemer�r�rvrwr?r[rg�AssertionError�asyncio�TimeoutErrorr.r��	transport�protocolZset_response_params�upperrrr\�send�
BaseException�closer"�OSErrorr$�argsr}r��statusZsend_request_redirect�appendr/�request_info�tupler��	METH_HEAD�	METH_POST�METH_GET�getZCONTENT_LENGTH�popr~ZLOCATIONZURI�releasero�join�originrqr��
connectionZadd_callbackZcancelZ_historyZsend_request_endZsend_request_exception)4r�r�r�r�r�r�r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�Z	redirects�historyr�r��eZskip_headersr�Zreal_timeoutZtmZhandler�Ztracer�Z
auth_from_urlZall_cookiesZtmp_cookie_jarZreq_cookiesr�Z
proxy_infoZreq�conn�exc�respZr_urlZ
parsed_urlrc)r�r�rdr�Ysz#


















 












zClientSession._requestrcg$@ri@)r��	protocolsr��receive_timeout�	autoclose�autoping�	heartbeatr�r�r~r�r�r�r�r�r�r�r��max_msg_size�_WSRequestContextManager)r�r�r�r�r�r�r�r�r�r�r~r�r�r�r�r�r�r�r�r�r�cCs6t|j|||||||||	|
|||
|||||||d��S)zInitiate websocket connection.)r�r�r�r�r�r�r�r�r�r~r�r�r�r�r�r�r�r�r�)r�_ws_connect)r�r�r�r�r�r�r�r�r�r�r�r~r�r�r�r�r�r�r�r�r�rcrcrd�
ws_connect�s,zClientSession.ws_connectc)�sN|dkrt�}nt|�}tjdtjdtjdi}x |��D]\}}|�||�q8Wt�t	�
d��}|��|tj<|r�d�
|�|tj<|
dk	r�|
|tj<|r�t|d�}||tj<t||||�}|j|||d|	||
||d�	IdH}�y&|jd	k�rt|j|jd
|j|jd��|j�tjd���dk�r:t|j|jd
|j|jd��|j�tjd���dk�rnt|j|jd|j|jd��|j�tjd�}t�t�|t������}||k�r�t|j|jd|j|jd��d}|�rtj|jk�rdd�|jtj� d�D�}x|D]} | |k�r�| }P�q�Wd}!|�r�|j�tj�}"|"�r�yt!|"�\}}!WnFt"k
�r�}#z&t|j|j|#j#d|j|jd�|#�Wdd}#~#XYnXnd}d}!|j$}$|$dk	�s�t%�|$j&}%|%dk	�s�t%�|$j'}&|&dk	�s�t%�t(|%d|j)d�}'|%�*t+|'|�|'�t,|%|&d||!d�}(Wn t-k
�r$|�.��Yn&X|j/|'|(||||||j)||||!d�SdS)NZ	websocketZupgradeZ13��,)r�F)r~r�r�r�r�r�r��ezInvalid response status)r�r�r~r�zInvalid upgrade headerzInvalid connection headerzInvalid challenge responsecSsg|]}|���qSrc)�strip)r��protorcrcrdr�+sz-ClientSession._ws_connect.<locals>.<listcomp>ri)r|T)Zuse_maskr��
notakeover)r�r�r�Zclient_notakeover)0rrZUPGRADEZ
CONNECTIONZSEC_WEBSOCKET_VERSIONr��
setdefault�base64Z	b64encode�os�urandom�decodeZSEC_WEBSOCKET_KEYr�ZSEC_WEBSOCKET_PROTOCOLZORIGINrKZSEC_WEBSOCKET_EXTENSIONSr5rVr�r0r�r�r~r��lowerZSEC_WEBSOCKET_ACCEPT�hashlibZsha1rEZdigest�splitrLrIr�r�r�r�r�rMriZ
set_parserrGrHr�r�rx))r�r�r�r�r�r�r�r�r�r�r�r~r�r�r�r�r�r�r�r�r�r�Zdefault_headers�key�valueZsec_keyZextstrr�Zr_key�matchr�Zresp_protocolsrrZ
compress_hdrsr�r�Z
conn_protor��reader�writerrcrcrdr�s�










zClientSession._ws_connectzCIMultiDict[str])r~r�cCslt|j�}|rht|ttf�s$t|�}t�}x<|��D]0\}}||krR|�||�q4|||<|�|�q4W|S)z3Add default headers and transform it to CIMultiDict)rrtr�rrr�r�r�)r�r~�resultZadded_namesrrrcrcrdr�ks
zClientSession._prepare_headers)r�)r�r�r�r�cKst|jtj|fd|i|���S)zPerform HTTP GET request.r�)r�r�rr�)r�r�r�r�rcrcrdr�{szClientSession.getcKst|jtj|fd|i|���S)zPerform HTTP OPTIONS request.r�)r�r�rZMETH_OPTIONS)r�r�r�r�rcrcrd�options�szClientSession.optionscKst|jtj|fd|i|���S)zPerform HTTP HEAD request.r�)r�r�rr�)r�r�r�r�rcrcrd�head�szClientSession.head)r�)r�r�r�r�cKst|jtj|fd|i|���S)zPerform HTTP POST request.r�)r�r�rr�)r�r�r�r�rcrcrd�post�szClientSession.postcKst|jtj|fd|i|���S)zPerform HTTP PUT request.r�)r�r�rZMETH_PUT)r�r�r�r�rcrcrd�put�szClientSession.putcKst|jtj|fd|i|���S)zPerform HTTP PATCH request.r�)r�r�rZ
METH_PATCH)r�r�r�r�rcrcrd�patch�szClientSession.patch)r�r�r�cKst|jtj|f|��S)zPerform HTTP DELETE request.)r�r�rZMETH_DELETE)r�r�r�rcrcrd�delete�szClientSession.delete)r�c�s0|js,|jdk	r&|jr&|j��IdHd|_dS)zMClose underlying connector.

        Release all acquired resources.
        N)r�rgrkr�)r�rcrcrdr��szClientSession.closecCs|jdkp|jjS)z@Is client session closed.

        A readonly property.
        N)rgr�)r�rcrcrdr��szClientSession.closedcCs|jS)z(Connector instance used for the session.)rg)r�rcrcrdr{�szClientSession.connectorcCs|jS)zThe session cookies.)rj)r�rcrcrdr��szClientSession.cookie_jarcCs|jS)z"The session HTTP protocol version.)rm)r�rcrcrdr��szClientSession.versioncCs|jS)z)Do URL requoting on redirection handling.)ro)r�rcrcrdrh�sz"ClientSession.requote_redirect_url)r�r�cCstjdtdd�||_dS)z)Do URL requoting on redirection handling.z=session.requote_redirect_url modification is deprecated #2778r�)r�N)r�r�r�ro)r�r�rcrcrdrh�s
cCstjdtdd�|jS)zSession's loop.z"client.loop property is deprecatedr�)r�)r�r�r�ri)r�rcrcrdr|�szClientSession.loopcCs|jS)zTimeout for the session.)rp)r�rcrcrdr��szClientSession.timeoutcCs|jS)z*The default headers of the client session.)rt)r�rcrcrdr~�szClientSession.headerscCs|jS)z2Headers for which autogeneration should be skipped)ru)r�rcrcrdr�szClientSession.skip_auto_headerscCs|jS)z2An object that represents HTTP Basic Authorization)rl)r�rcrcrdr��szClientSession.authcCs|jS)zJson serializer callable)rn)r�rcrcrdr��szClientSession.json_serializecCs|jS)z-Should connector be closed on session closing)rk)r�rcrcrdr�szClientSession.connector_ownercCs|jS)z`
        Should `ClientResponse.raise_for_status()`
        be called for each response
        )rq)r�rcrcrdr�	szClientSession.raise_for_statuscCs|jS)z6Should the body response be automatically decompressed)rr)r�rcrcrdr�szClientSession.auto_decompresscCs|jS)z�
        Should get proxies information
        from HTTP_PROXY / HTTPS_PROXY environment variables
        or ~/.netrc file if present
        )rs)r�rcrcrdr�szClientSession.trust_envcCs|jS)z7A list of TraceConfig instances used for client tracing)ry)r�rcrcrdr�!szClientSession.trace_configscCs
d|_dS)zwDetach connector from session without closing the former.

        Session is switched to closed state anyway.
        N)rg)r�rcrcrd�detach&szClientSession.detachcCstd��dS)NzUse async with instead)�	TypeError)r�rcrcrd�	__enter__-szClientSession.__enter__)�exc_type�exc_val�exc_tbr�cCsdS)Nrc)r�r r!r"rcrcrd�__exit__0szClientSession.__exit__c�s|S)Nrc)r�rcrcrd�
__aenter__9szClientSession.__aenter__c�s|��IdHdS)N)r�)r�r r!r"rcrcrd�	__aexit__<szClientSession.__aexit__)_r^r_r`�__doc__r�r�rfr�r�r1r2r6r�
HttpVersion11rCrr7r��AbstractEventLooprQrRr�strr>rPrrFrr�rra�objectrUrrO�intr�r�r<rr�r�r�rSrVr
�bytesrWr3rr�rr�rrr�r�rrrrrrr��propertyr�r{r�rr�rh�setterr|r�r~rrrr�r�r�rrr�r�r�r�rrr�rr#r$r%�
__classcell__rcrc)r�rdrT�sj|V
	�jj		
	&

rTc@s�eZdZdZeddefdd�dd�Zddd�dd	�Zedd�d
d�Z	dd�d
d�Z
eedefd�dd�Z
eedefd�dd�Zed�dd�ZdS)�_BaseRequestContextManager)�_coro�_respzasyncio.Future[Any]N)�coror�cCs
||_dS)N)r1)r�r3rcrcrdr�Isz#_BaseRequestContextManager.__init__)�argr�cCs|j�|�S)N)r1r�)r�r4rcrcrdr�Lsz_BaseRequestContextManager.sendcCs|j�|�dS)N)r1�throw)r�r4rcrcrdr5Osz _BaseRequestContextManager.throw)r�cCs
|j��S)N)r1r�)r�rcrcrdr�Rsz _BaseRequestContextManager.closecCs|j��}|S)N)r1�	__await__)r�Zretrcrcrdr6Us
z$_BaseRequestContextManager.__await__cCs|��S)N)r6)r�rcrcrd�__iter__Ysz#_BaseRequestContextManager.__iter__c�s|jIdH|_|jS)N)r1r2)r�rcrcrdr$\sz%_BaseRequestContextManager.__aenter__)r^r_r`�	__slots__rrer�r�r�r5r�r	rr6r7r$rcrcrcrdr0Esr0c@s0eZdZeeeeeeedd�dd�ZdS)r�N)r r��tbr�c�s|j��dS)N)r2r�)r�r r�r9rcrcrdr%bsz _RequestContextManager.__aexit__)r^r_r`rrr�rr%rcrcrcrdr�as
r�c@s0eZdZeeeeeeedd�dd�ZdS)rN)r r�r9r�c�s|j��IdHdS)N)r2r�)r�r r�r9rcrcrdr%qsz"_WSRequestContextManager.__aexit__)r^r_r`rrr�rr%rcrcrcrdrps
rc@s^eZdZdZeddefedd�dd�Zed�dd	�Ze	e
ee	ee	edd
�dd�Z
dS)
�_SessionRequestContextManager)r1r2�_sessionzasyncio.Future[Any]N)r3r�r�cCs||_d|_||_dS)N)r1r2r;)r�r3r�rcrcrdr�~sz&_SessionRequestContextManager.__init__)r�c�sDy|jIdH|_Wn&tk
r8|j��IdH�YnX|jSdS)N)r1r2r�r;r�)r�rcrcrdr$�sz(_SessionRequestContextManager.__aenter__)r r�r9r�c�s,|jdk	st�|j��|j��IdHdS)N)r2r�r�r;)r�r r�r9rcrcrdr%�s
z'_SessionRequestContextManager.__aexit__)r^r_r`r8rr2rTr�r$rrr�rr%rcrcrcrdr:zs
r:r�F)r�r�r�r~rr�r�r�r�r�r�r�r�r�r�r�r}r�r{r�r|)r�r�r�r�r�r~rr�r�r�r�r�r�r�r�r�r�r�r}r�r{r�r|r�cCsdd}|dkrd}t|dd�}t||||||d�}t|j||||||||||	|
|||
||||d�|�S)a�Constructs and sends a request. Returns response object.
    method - HTTP method
    url - request url
    params - (optional) Dictionary or bytes to be sent in the query
      string of the new request
    data - (optional) Dictionary, bytes, or file-like object to
      send in the body of the request
    json - (optional) Any json compatible python object
    headers - (optional) Dictionary of HTTP Headers to send with
      the request
    cookies - (optional) Dict object to send with the request
    auth - (optional) BasicAuth named tuple represent HTTP Basic Auth
    auth - aiohttp.helpers.BasicAuth
    allow_redirects - (optional) If set to False, do not follow
      redirects
    version - Request HTTP version.
    compress - Set to True if request has to be compressed
       with deflate encoding.
    chunked - Set to chunk size for chunked transfer encoding.
    expect100 - Expect 100-continue response from server.
    connector - BaseConnector sub-class instance to support
       connection pooling.
    read_until_eof - Read response until eof if response
       does not have Content-Length header.
    loop - Optional event loop.
    timeout - Optional ClientTimeout settings structure, 5min
       total timeout by default.
    Usage::
      >>> import aiohttp
      >>> resp = await aiohttp.request('GET', 'http://python.org/')
      >>> resp
      <ClientResponse(python.org/) [200]>
      >>> data = await resp.read()
    FNT)r|Zforce_close)r|r}r�r�r{r�)r�r�r�r~rr�r�r�r�r�r�r�r�r�r�r�)r9rTr:r�)r�r�r�r�r�r~rr�r�r�r�r�r�r�r�r�r�r�r}r�r{r�r|r�r�rcrcrdrV�s@<rV)r&r�r
rr�rr�r�r��typesrr�typingrrrrrr	r
rrr
rrrrrrr�Z	multidictrrrrZyarlrr�rrr�abcrZclient_exceptionsrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0Z
client_reqrepr1r2r3r4r5Z	client_wsr6r{r7r8r9r:Z	cookiejarr;Zhelpersr<r=r>r?r@rArBrCrDrErFrGrHZhttp_websocketrIrJrKrLZstreamsrM�tracingrNrOZtypedefsrPrQrRrS�__all__r�rW�ImportErrorr*�srUr�rerTr0r�rr:r'r)r�r+r(rVrcrcrcrd�<module>s�HT,&

) 
%~

Zerion Mini Shell 1.0