ok

Mini Shell

Direktori : /opt/alt/python38/lib64/python3.8/site-packages/aiohttp/__pycache__/
Upload File :
Current File : //opt/alt/python38/lib64/python3.8/site-packages/aiohttp/__pycache__/client.cpython-38.pyc

U

'�7`���@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`ddlambZbddlcmdZdmeZeddlfmgZgmhZhmiZimjZjdZkzddllmmZmWnenk
�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/python38/lib64/python3.8/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_bufsizeNTF�)�	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_envri�
trace_configs�read_bufsize)r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rir�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|_'|j'D]}|�(��q�dS)N�r~z0Session and connector has to use same event looprz8read_timeout is deprecated, use timeout argument instead���
stacklevelre)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>))rjrAr9�RuntimeErrorZ	get_debug�	traceback�
extract_stack�sys�	_getframergr;rk�update_cookiesrhrlrmrnrorC�DEFAULT_TIMEOUTrq�warnings�warn�DeprecationWarning�attrZevolve�
ValueErrorrrrsrtrpr{rru�	frozensetrvrwrxryrzZfreeze)�selfr}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rir�r��real_headers�trace_configrcrcrd�__init__�s�



�
�
�
�


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��ResourceWarningrgrjZcall_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�jsonrr�r�r��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�rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�c4�s6�jrtd��t||||�}|dk	r6|dk	r6td��n|dk	rNtj|�jd�}t|
t�sl|
dk	rlt	�
dt�d}g}�j}��
|�}��
|�}zt|�}Wn,tk
r�}zt|�|�W5d}~XYnXt�j�} |dk	r�|D]}!| �t|!��q�|dk	�r8zt|�}Wn.tk
�r6}zt|�|�W5d}~XYnX|tk�rJ�j}"nt|t��sbt|d�}"n|}"t�j|"j�}#|#��}$|dk�r��j}��fdd��jD�}%|%D]}&|&�|||�IdH�q�|#��}'�z|'��xt|�\}}(|	�r�|(�r�td	��|	dk�r|(}	|	dk�r�j }	|dk	�r<|	dk	�r<t!j"|k�r<td
���j#�$|�})|dk	�r|t%�}*|*�&|�|*�$|�}+|+�r||)�'|+�|dk	�r�t|�}n<�j(�r�t)��*�D](\},}-|,|j+k�r�|-j,}|-j-}�q̐q��j.||||| ||)|	|||
|�j�j/|||'�|||%d�}.zHt0|"j1�jd��.�j2dk	�s(t3��j2j1|.|%|"d
�IdH}/W5QRXWn6t4j5k
�r�}0zt6d�7|��|0�W5d}0~0XYnX|/j8dk	�s�t3�|/j9dk	�s�t3�|/j9j:|'|�;�dk|�j<|"j=|d�zpzJ|.�>|/�IdH}1z|1�|/�IdHWn t?k
�r|1�@��YnXWn t?k
�r4|/�@��YnXWnFtAk
�rP�Yn0tBk
�r~}0ztC|0jD�|0�W5d}0~0XYnX�j#�&|1jE|1jF�|1jGdk�rH|
�rH|%D]}&|&�H||||1�IdH�q�|d7}|�I|1�|�r||k�r|1�@�tJ|djKtL|���|1jGdk�r|1jMt!jNk�s8|1jGdk�r\|1jMt!jOk�r\t!jP}d}|�Qt!jR��r\|�St!jR�|1jT�Qt!jU��px|1jT�Qt!jV�}2|2dk�r��qHn|1�W�zt|2�jXd�}3Wn.tk
�r�}zt|2�|�W5d}~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֐qH�q�W5QRX|dk�rb�j[}|�rp|1�\�|$dk	�r�|1j]dk	�r�|1j]�^|$j_�n|$�_�tL|�|1_`|%D]}&|&�a||||1�IdH�q�|1WSt?k
�r0}zB|#�@�|$�r�|$�_�d}$|%D]}&|&�b||||�IdH�q�W5d}~XYnXdS)NzSession is closedz9data and json parameters can not be used at the same time)�dumpszChunk size is deprecated #1615rrecs g|]}t�||j�d���qS))r�)rNZtrace_config_ctx)r�r��r�r�rcrdr��s�
�z*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�r�r�rr�r�r�r�r�r~r�r�r��timer�sessionr�r��tracesr�)r�r�zConnection timeout to host {}ZHEAD)r�Zskip_payloadr�r�r�r�)�-�.�/i3i4rr�)r�r�)Zencoded)rZhttps�z"Can redirect only to http or https)cr�r�r5r�rZJsonPayloadro�
isinstance�boolr�r�r�rn�_prepare_headersrr*�setrv�addrrCrqrUr@rjrZ�startr{rzZsend_request_startr�rDrmrZ
AUTHORIZATIONrkZfilter_cookiesr;r��loadrtrB�items�schemer�r�rwrxr?r[rh�AssertionError�asyncio�TimeoutErrorr.r��	transport�protocolZset_response_params�upperrsr\�send�
BaseException�closer"�OSErrorr$�argsrr��statusZsend_request_redirect�appendr/�request_info�tupler��	METH_HEAD�	METH_POST�METH_GET�getZCONTENT_LENGTH�popr�ZLOCATIONZURI�releaserp�join�originrrr��
connectionZadd_callbackZcancelZ_historyZsend_request_endZsend_request_exception)4r�r�r�r�r�r�rr�r�r�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_urlrcr�rdr�Ys�#�





�	�

����






����
�	�
��
��
�






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�rr�rrrrr�r�r�r�r�r�r�r�r�r�r�r	r�cCs6t|j|||||||||	|
|||
|||||||d��S)zInitiate websocket connection.r)r
�_ws_connect)r�r�r�rr�rrrrr�r�r�r�r�r�r�r�r�r�r�r	rcrcrd�
ws_connect�s0��zClientSession.ws_connectc)�sJ|dkrt�}nt|�}tjdtjdtjdi}|��D]\}}|�||�q6t�t	�
d��}|��|tj<|r~d�
|�|tj<|
dk	r�|
|tj<|r�t|d�}||tj<t||||�}|j|||d|	||
||d�	IdH}�z&|jd	k�rt|j|jd
|j|jd��|j�tjd���dk�r6t|j|jd
|j|jd��|j�tjd���dk�rjt|j|jd|j|jd��|j�tjd�}t�t�|t������}||k�r�t|j|jd|j|jd��d}|�rtj|jk�rdd�|jtj� d�D�}|D]} | |k�r�| }�q�q�d}!|�r�|j�tj�}"|"�r�zt!|"�\}}!WnFt"k
�r�}#z&t|j|j|#j#d|j|jd�|#�W5d}#~#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�*s�z-ClientSession._ws_connect.<locals>.<listcomp>rr|r�T)Zuse_maskr��
notakeover)rrr�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�rMrjZ
set_parserrGrHr�r�ry))r�r�r�rr�rrrrr�r�r�r�r�r�r�r�r�r�r�r	r�Zdefault_headers�key�valueZsec_keyZextstrrZr_key�matchr�Zresp_protocolsrrZ
compress_hdrsrrZ
conn_protor��reader�writerrcrcrdr�s�


����	
�	�

����
�zClientSession._ws_connectzCIMultiDict[str])r�r�cCsht|j�}|rdt|ttf�s$t|�}t�}|��D]0\}}||krP|�||�q2|||<|�|�q2|S)z3Add default headers and transform it to CIMultiDict)rrur�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�{s�zClientSession.getcKst|jtj|fd|i|���S)zPerform HTTP OPTIONS request.r�)r�r�rZMETH_OPTIONSr!rcrcrd�options�s����zClientSession.optionscKst|jtj|fd|i|���S)zPerform HTTP HEAD request.r�)r�r�rr�r!rcrcrd�head�s����zClientSession.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�s�zClientSession.postcKst|jtj|fd|i|���S)zPerform HTTP PUT request.r�)r�r�rZMETH_PUTr$rcrcrd�put�s�zClientSession.putcKst|jtj|fd|i|���S)zPerform HTTP PATCH request.r�)r�r�rZ
METH_PATCHr$rcrcrd�patch�s�zClientSession.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�rhrlr��r�rcrcrdr��szClientSession.closecCs|jdkp|jjS)z@Is client session closed.

        A readonly property.
        N)rhr�r*rcrcrdr��szClientSession.closedcCs|jS)z(Connector instance used for the session.�rhr*rcrcrdr}�szClientSession.connectorcCs|jS)zThe session cookies.)rkr*rcrcrdr��szClientSession.cookie_jarcCs|jS)z"The session HTTP protocol version.)rnr*rcrcrdr��szClientSession.versioncCs|jS)�)Do URL requoting on redirection handling.)rpr*rcrcrdri�sz"ClientSession.requote_redirect_url)r�r�cCstjdtdd�||_dS)r,z=session.requote_redirect_url modification is deprecated #2778r�r�N)r�r�r�rp)r�r�rcrcrdri�s�cCstjdtdd�|jS)zSession's loop.z"client.loop property is deprecatedr�r�)r�r�r�rjr*rcrcrdr~�s�zClientSession.loopcCs|jS)zTimeout for the session.)rqr*rcrcrdr��szClientSession.timeoutcCs|jS)z*The default headers of the client session.)rur*rcrcrdr��szClientSession.headerscCs|jS)z2Headers for which autogeneration should be skipped)rvr*rcrcrdr��szClientSession.skip_auto_headerscCs|jS)z2An object that represents HTTP Basic Authorization)rmr*rcrcrdr��szClientSession.authcCs|jS)zJson serializer callable)ror*rcrcrdr��szClientSession.json_serializecCs|jS)z-Should connector be closed on session closing)rlr*rcrcrdr�szClientSession.connector_ownercCs|jS)z`
        Should `ClientResponse.raise_for_status()`
        be called for each response
        )rrr*rcrcrdr�	szClientSession.raise_for_statuscCs|jS)z6Should the body response be automatically decompressed)rsr*rcrcrdr�szClientSession.auto_decompresscCs|jS)z�
        Should get proxies information
        from HTTP_PROXY / HTTPS_PROXY environment variables
        or ~/.netrc file if present
        )rtr*rcrcrdr�szClientSession.trust_envcCs|jS)z7A list of TraceConfig instances used for client tracing)rzr*rcrcrdr�!szClientSession.trace_configscCs
d|_dS)zwDetach connector from session without closing the former.

        Session is switched to closed state anyway.
        Nr+r*rcrcrd�detach&szClientSession.detachcCstd��dS)NzUse async with instead)�	TypeErrorr*rcrcrd�	__enter__-szClientSession.__enter__)�exc_type�exc_val�exc_tbr�cCsdS�Nrc�r�r0r1r2rcrcrd�__exit__0szClientSession.__exit__c�s|Sr3rcr*rcrcrd�
__aenter__9szClientSession.__aenter__c�s|��IdHdSr3)r�r4rcrcrd�	__aexit__<szClientSession.__aexit__)_r^r_r`�__doc__r�r�rgr�r�r1r2r6r�
HttpVersion11rCrr7r��AbstractEventLooprQrRr�strr>rPrrFrr�rra�objectrUrrO�intr�r�r<rr�r�r�rSrVr
�bytesrWr3rr�rr�rrr�r�r"r#r%r&r'r(r��propertyr�r}r�rr�ri�setterr~r�r�rrr�r�r�r�rrr�r�r�r�r-r/r�rr5r6r7�
__classcell__rcrcr�rdrT�sv���



�o
��

�8��6��/��	������	��	��
	�	
�	
�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�_resp�asyncio.Future[Any]N)�coror�cCs
||_dSr3)rD)r�rGrcrcrdr�Isz#_BaseRequestContextManager.__init__)�argr�cCs|j�|�Sr3)rDr��r�rHrcrcrdr�Lsz_BaseRequestContextManager.sendcCs|j�|�dSr3)rD�throwrIrcrcrdrJOsz _BaseRequestContextManager.throwr)cCs
|j��Sr3)rDr�r*rcrcrdr�Rsz _BaseRequestContextManager.closecCs|j��}|Sr3)rD�	__await__)r�ZretrcrcrdrKUs
z$_BaseRequestContextManager.__await__cCs|��Sr3)rKr*rcrcrd�__iter__Ysz#_BaseRequestContextManager.__iter__c�s|jIdH|_|jSr3rCr*rcrcrdr6\sz%_BaseRequestContextManager.__aenter__)r^r_r`�	__slots__rrfr�r�r�rJr�r	rrKrLr6rcrcrcrdrBEsrBc@s0eZdZeeeeeeedd�dd�ZdS)r�N�r0r�tbr�c�s|j��dSr3)rEr��r�r0rrOrcrcrdr7bsz _RequestContextManager.__aexit__�r^r_r`rrr�rr7rcrcrcrdr�as

�r�c@s0eZdZeeeeeeedd�dd�ZdS)r
NrNc�s|j��IdHdSr3)rEr�rPrcrcrdr7qsz"_WSRequestContextManager.__aexit__rQrcrcrcrdr
ps

�r
c@s^eZdZdZeddefedd�dd�Zed�dd	�Ze	e
ee	ee	edd
�dd�Z
dS)
�_SessionRequestContextManager�rDrE�_sessionrFN)rGr�r�cCs||_d|_||_dSr3rS)r�rGr�rcrcrdr�~sz&_SessionRequestContextManager.__init__r)c�sDz|jIdH|_Wn&tk
r8|j��IdH�YnX|jSdSr3)rDrEr�rTr�r*rcrcrdr6�sz(_SessionRequestContextManager.__aenter__rNc�s,|jdk	st�|j��|j��IdHdSr3)rEr�r�rTrPrcrcrdr7�s
z'_SessionRequestContextManager.__aexit__)r^r_r`rMrr2rTr�r6rrr�rr7rcrcrcrdrRzs�	
�rRr�F)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�r�r�r�r�r�rr�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~rr�r�r}r�)r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�)r9rTrRr�)r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr�r}r�r~r�r�rcrcrdrV�sF<�	��rV)r8r�rrr�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�rfrTrBr�r
rRr9r;r�r=r:rVrcrcrcrd�<module>s�HT,(

) 
%�

�

Zerion Mini Shell 1.0