[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.146.107.49: ~ $
U

'�7`2P�@s8ddlZddlZddlZddlmZmZmZmZmZm	Z	m
Z
ddlmZddl
mZmZmZddlmZzddlmZWn ek
r�ddlmZYnXdZe
d	�ZGd
d�de�ZGdd
�d
ee�ZGdd�d�ZGdd�d�ZGdd�de�ZGdd�de�Ze�ZGdd�dee�Z Gdd�de e�Z!dS)�N)�	Awaitable�Callable�Generic�List�Optional�Tuple�TypeVar�)�BaseProtocol)�BaseTimerContext�
set_exception�
set_result)�internal_logger)�Deque)�
EMPTY_PAYLOAD�	EofStream�StreamReader�	DataQueue�FlowControlDataQueue�_Tc@seZdZdZdS)rzeof stream indication.N)�__name__�
__module__�__qualname__�__doc__�rr�B/opt/alt/python38/lib64/python3.8/site-packages/aiohttp/streams.pyrsrc@sDeZdZegeefdd�dd�Zdd�dd�Zed�d	d
�ZdS)�AsyncStreamIteratorN)�	read_func�returncCs
||_dS�N)r)�selfrrrr�__init__szAsyncStreamIterator.__init__zAsyncStreamIterator[_T]�rcCs|Srr�r rrr�	__aiter__"szAsyncStreamIterator.__aiter__c�s<z|��IdH}Wntk
r*t�YnX|dkr8t�|S�N�)rr�StopAsyncIteration�r �rvrrr�	__anext__%s
zAsyncStreamIterator.__anext__)	rrrrrrr!r$r*rrrrrsrc@s@eZdZddd�dd�Zdd�dd�Zeeefd�d	d
�ZdS)�ChunkTupleAsyncStreamIteratorrN)�streamrcCs
||_dSr)�_stream)r r,rrrr!0sz&ChunkTupleAsyncStreamIterator.__init__r"cCs|Srrr#rrrr$3sz'ChunkTupleAsyncStreamIterator.__aiter__c�s |j��IdH}|dkrt�|S)N�r&F)r-�	readchunkr'r(rrrr*6sz'ChunkTupleAsyncStreamIterator.__anext__)	rrrr!r$r�bytes�boolr*rrrrr+/sr+c@sReZdZeed�dd�Zeeed�dd�Zeed�dd�Ze	d�d	d
�Z
dS)�AsyncStreamReaderMixinr"cCs
t|j�Sr)r�readliner#rrrr$>sz AsyncStreamReaderMixin.__aiter__��nrcst��fdd��S)zzReturns an asynchronous iterator that yields chunks of size n.

        Python-3.5 available for Python 3.5+ only
        cs
����Sr)�readr�r5r rr�<lambda>Fr&z5AsyncStreamReaderMixin.iter_chunked.<locals>.<lambda>)r�r r5rr7r�iter_chunkedAsz#AsyncStreamReaderMixin.iter_chunkedcCs
t|j�S)z�Returns an asynchronous iterator that yields all the available
        data as soon as it is received

        Python-3.5 available for Python 3.5+ only
        )r�readanyr#rrr�iter_anyHszAsyncStreamReaderMixin.iter_anycCst|�S)a
Returns an asynchronous iterator that yields chunks of data
        as they are received by the server. The yielded objects are tuples
        of (bytes, bool) as returned by the StreamReader.readchunk method.

        Python-3.5 available for Python 3.5+ only
        )r+r#rrr�iter_chunksPsz"AsyncStreamReaderMixin.iter_chunksN)rrrrr0r$�intr:r<r+r=rrrrr2=sr2c@s�eZdZdZdZddd�eeeeee	j
dd�dd�Zed�d	d
�Z
eeefd�dd�Zeed�d
d�Zedd�dd�Zegdfdd�dd�Zdd�dd�Zed�dd�Zed�dd�Zdd�dd�Zedd�dd�Zd<eedd �d!d"�Zdd�d#d$�Zdd�d%d&�Zedd'�d(d)�Zed�d*d+�Z d=eed-�d.d/�Z!ed�d0d1�Z"eeefd�d2d3�Z#eed-�d4d5�Z$d>eed-�d6d7�Z%eed-�d8d9�Z&eed-�d:d;�Z'dS)?ra*An enhancement of asyncio.StreamReader.

    Supports asynchronous iteration by line, chunk or as available::

        async for line in reader:
            ...
        async for chunk in reader.iter_chunked(1024):
            ...
        async for slice in reader.iter_any():
            ...

    rN)�timer�loop)�protocol�limitr?r@rcCsv||_||_|d|_|dkr&t��}||_d|_d|_d|_t	�
�|_d|_d|_
d|_d|_d|_||_g|_dS)N�rF)�	_protocol�
_low_water�_high_water�asyncioZget_event_loop�_loop�_size�_cursor�_http_chunk_splits�collections�deque�_buffer�_buffer_offset�_eof�_waiter�_eof_waiter�
_exception�_timer�_eof_callbacks)r rArBr?r@rrrr!js"

zStreamReader.__init__r"cCs�|jjg}|jr |�d|j�|jr0|�d�|jdkrP|�d|j|jf�|jrf|�d|j�|jr||�d|j�dd�	|�S)	Nz%d bytes�eofizlow=%d high=%dzw=%rze=%rz<%s>� )
�	__class__rrI�appendrPrErFrQrS�join)r �inforrr�__repr__�s


zStreamReader.__repr__cCs|j|jfSr)rErFr#rrr�get_read_buffer_limits�sz#StreamReader.get_read_buffer_limitscCs|jSr�rSr#rrr�	exception�szStreamReader.exception��excrcCsP||_|j��|j}|dk	r.d|_t||�|j}|dk	rLd|_t||�dSr)rSrU�clearrQrrR�r ra�waiterrrrr�s

zStreamReader.set_exception��callbackrcCsB|jr2z
|�Wq>tk
r.t�d�Yq>Xn|j�|�dS�N�Exception in eof callback)rP�	Exceptionrr_rUrY�r rfrrr�on_eof�s
zStreamReader.on_eofc	Cs�d|_|j}|dk	r$d|_t|d�|j}|dk	rBd|_t|d�|jD].}z
|�WqHtk
rtt�d�YqHXqH|j��dS)NTrh)	rPrQr
rRrUrirr_rb)r rd�cbrrr�feed_eof�s



zStreamReader.feed_eofcCs|jS)z&Return True if  'feed_eof' was called.�rPr#rrr�is_eof�szStreamReader.is_eofcCs|jo|jS)z=Return True if the buffer is empty and 'feed_eof' was called.�rPrNr#rrr�at_eof�szStreamReader.at_eofc�s4|jr
dS|j��|_z|jIdHW5d|_XdSr)rPrH�
create_futurerRr#rrr�wait_eof�szStreamReader.wait_eof)�datarcCsxtjdtdd�|sdS|jr>|jd|jd�|jd<d|_|jt|�7_|jt|�8_|j�|�d|_	dS)zDrollback reading some data from stream, inserting it to buffer head.zJunread_data() is deprecated and will be removed in future releases (#3260)rC)�
stacklevelNr)
�warnings�warn�DeprecationWarningrOrNrI�lenrJ�
appendleftZ_eof_counter)r rtrrr�unread_data�s�zStreamReader.unread_data�rt�sizercCsx|sdS|jt|�7_|j�|�|jt|�7_|j}|dk	rVd|_t|d�|j|jkrt|jj	st|j�
�dSr)rIryrNrY�total_bytesrQr
rFrD�_reading_paused�
pause_reading�r rtr}rdrrr�	feed_data�s
zStreamReader.feed_datacCs"|jdkr|jrtd��g|_dS)Nz?Called begin_http_chunk_receiving whensome data was already fed)rKr~�RuntimeErrorr#rrr�begin_http_chunk_receiving�s
�z'StreamReader.begin_http_chunk_receivingcCsd|jdkrtd��|jr"|jdnd}|j|kr4dS|j�|j�|j}|dk	r`d|_t|d�dS)NzFCalled end_chunk_receiving without calling begin_chunk_receiving first���r)rKr�r~rYrQr
)r �posrdrrr�end_http_chunk_receivings
�

z%StreamReader.end_http_chunk_receiving)�	func_namerc	�sf|jdk	rtd|��|j��}|_z2|jrL|j�|IdHW5QRXn
|IdHW5d|_XdS)NzH%s() called while another coroutine is already waiting for incoming data)rQr�rHrrrT)r r�rdrrr�_wait#s
��zStreamReader._waitc�s�|jdk	r|j�g}d}d}|r�|jr�|r�|j}|jd�d|�d}|�|rV||nd�}|�|�|t|�7}|rzd}||jkr td��q |j	r�q�|r|�
d�IdHqd	�|�S)
NrT�
r	r�FzLine is too longr3r&)rSrNrO�find�_read_nowait_chunkrYryrF�
ValueErrorrPr�rZ)r �lineZ	line_sizeZ
not_enough�offsetZicharrtrrrr38s*




zStreamReader.readliner�r4c�sv|jdk	r|j�|sdS|dkrNg}|��IdH}|s8qD|�|�q$d�|�S|jsl|jsl|�d�IdHqN|�	|�S)Nr&rr6)
rS�getattrrr;rYrZrNrPr��_read_nowait)r r5�blocks�blockrrrr6Vs

zStreamReader.readc�s8|jdk	r|j�|js.|js.|�d�IdHq|�d�S)Nr;r�)rSrNrPr�r�r#rrrr;�s

zStreamReader.readanyc�s�|jdk	r|j�|jrZ|j�d�}||jkr0dS||jkrN|�||j�dfSt�d�q|jrn|�d�dfS|j	rxdS|�
d	�IdHqdS)
z�Returns a tuple of (data, end_of_http_chunk). When chunked transfer
        encoding is used, end_of_http_chunk is a boolean indicating if the end
        of the data corresponds to the end of a HTTP chunk , otherwise it is
        always False.
        Nr�r&TTzESkipping HTTP chunk end due to data consumption beyond chunk boundaryr�Fr.r/)rSrK�poprJr�rZwarningrNr�rPr�)r r�rrrr/�s 


�zStreamReader.readchunkc�sp|jdk	r|j�g}|dkrf|�|�IdH}|sNd�|�}t�|t|�|��|�|�|t|�8}qd�|�S)Nrr&)rSr6rZrG�IncompleteReadErrorryrY)r r5r�r��partialrrr�readexactly�s


zStreamReader.readexactlycCs2|jdk	r|j�|jr(|j��s(td��|�|�S)Nz9Called while some coroutine is waiting for incoming data.)rSrQZdoner�r�r9rrr�read_nowait�s
�zStreamReader.read_nowaitcCs�|jd}|j}|dkrHt|�||krH||||�}|j|7_n,|rj|j��||d�}d|_n
|j��}|jt|�8_|jt|�7_|j}|r�|d|jkr�|�d�q�|j|jkr�|j	j
r�|j	��|S)Nrr�)rNrOry�popleftrIrJrKr�rErDr�resume_reading)r r5Zfirst_bufferr�rtZchunk_splitsrrrr��s$



zStreamReader._read_nowait_chunkcCsPg}|jr>|�|�}|�|�|dkr|t|�8}|dkrq>q|rLd�|�SdS)z8 Read not more than n bytes, or whole buffer if n == -1 r�rr&)rNr�rYryrZ)r r5Zchunks�chunkrrrr��s

zStreamReader._read_nowait)r)r�)r�)(rrrrr~r
r>rrrG�AbstractEventLoopr!�strr\rr]�
BaseExceptionr_rrrkrmr1rorqrsr0r{r�r�r�r�r3r6r;r/r�r�r�r�rrrrrZsB
��	* rc@s�eZdZeed�dd�Zedd�dd�Zegdfdd�d	d
�Zdd�dd�Z	e
d�d
d�Ze
d�dd�Zdd�dd�Z
d%eedd�dd�Zed�dd�Zd&eed�dd�Zed�dd�Zeee
fd�dd �Zeed�d!d"�Zed�d#d$�ZdS)'�EmptyStreamReaderr"cCsdSrrr#rrrr_�szEmptyStreamReader.exceptionNr`cCsdSrr)r rarrrr�szEmptyStreamReader.set_exceptionrecCs.z
|�Wntk
r(t�d�YnXdSrg)rirr_rjrrrrk�s
zEmptyStreamReader.on_eofcCsdSrrr#rrrrmszEmptyStreamReader.feed_eofcCsdS�NTrr#rrrroszEmptyStreamReader.is_eofcCsdSr�rr#rrrrqszEmptyStreamReader.at_eofc�sdSrrr#rrrrs
szEmptyStreamReader.wait_eofr)rtr5rcCsdSrr)r rtr5rrrr�
szEmptyStreamReader.feed_datac�sdSr%rr#rrrr3szEmptyStreamReader.readliner�r4c�sdSr%rr9rrrr6szEmptyStreamReader.readc�sdSr%rr#rrrr;szEmptyStreamReader.readanyc�sdS)Nr�rr#rrrr/szEmptyStreamReader.readchunkc�st�d|��dSr%)rGr�r9rrrr�szEmptyStreamReader.readexactlycCsdSr%rr#rrrr�szEmptyStreamReader.read_nowait)r)r�)rrrrr�r_rrrkrmr1rorqrsr0r>r�r3r6r;rr/r�r�rrrrr��sr�c@s�eZdZdZejdd�dd�Zed�dd�Ze	d�d	d
�Z
e	d�dd�Zee
d�d
d�Ze
dd�dd�Zdeedd�dd�Zdd�dd�Zed�dd�Zeed�dd�ZdS)rz>DataQueue is a general-purpose blocking queue with one reader.N)r@rcCs,||_d|_d|_d|_d|_t��|_dS)NFr)rHrPrQrSrIrLrMrN)r r@rrrr!)szDataQueue.__init__r"cCs
t|j�Sr)ryrNr#rrr�__len__1szDataQueue.__len__cCs|jSrrnr#rrrro4szDataQueue.is_eofcCs|jo|jSrrpr#rrrrq7szDataQueue.at_eofcCs|jSrr^r#rrrr_:szDataQueue.exceptionr`cCs.d|_||_|j}|dk	r*d|_t||�dSr�)rPrSrQrrcrrrr=szDataQueue.set_exceptionrr|cCs@|j|7_|j�||f�|j}|dk	r<d|_t|d�dSr)rIrNrYrQr
r�rrrr�FszDataQueue.feed_datacCs(d|_|j}|dk	r$d|_t|d�dSr�)rPrQr
)r rdrrrrmOs
zDataQueue.feed_eofc	�s�|jsN|jsN|j��|_z|jIdHWn$tjtjfk
rLd|_�YnX|jrt|j��\}}|j	|8_	|S|j
dk	r�|j
�nt�dSr)rNrPrHrrrQrGZCancelledError�TimeoutErrorr�rIrSr�r rtr}rrrr6Ws
zDataQueue.readcCs
t|j�Sr)rr6r#rrrr$kszDataQueue.__aiter__)r)rrrrrGr�r!r>r�r1rorqrr�r_rrr�rmr6rr$rrrrr&s		rcsXeZdZdZeeejdd��fdd�Zd
e	edd��fdd	�
Z
e	d
��fdd�Z�ZS)rzgFlowControlDataQueue resumes and pauses an underlying stream.

    It is a destination for parsed data.N)rArBr@rcs"t�j|d�||_|d|_dS)N)r@rC)�superr!rD�_limit)r rArBr@�rXrrr!tszFlowControlDataQueue.__init__rr|cs0t��||�|j|jkr,|jjs,|j��dSr)r�r�rIr�rDrr�r�r�rrr�|szFlowControlDataQueue.feed_datar"c�s:zt���IdHW�S|j|jkr4|jjr4|j��XdSr)rIr�rDrr�r�r6r#r�rrr6�szFlowControlDataQueue.read)r)
rrrrr
r>rGr�r!rr�r6�
__classcell__rrr�rros�r)"rGrLrv�typingrrrrrrrZ
base_protocolr
Zhelpersrrr
�logrr�ImportErrorZtyping_extensions�__all__rrirrr+r2rr�rrrrrrr�<module>s0$/I

Filemanager

Name Type Size Permission Actions
__init__.cpython-38.opt-1.pyc File 3.61 KB 0644
__init__.cpython-38.pyc File 3.61 KB 0644
abc.cpython-38.opt-1.pyc File 8.11 KB 0644
abc.cpython-38.pyc File 8.11 KB 0644
base_protocol.cpython-38.opt-1.pyc File 2.49 KB 0644
base_protocol.cpython-38.pyc File 2.58 KB 0644
client.cpython-38.opt-1.pyc File 27.85 KB 0644
client.cpython-38.pyc File 28 KB 0644
client_exceptions.cpython-38.opt-1.pyc File 10.03 KB 0644
client_exceptions.cpython-38.pyc File 10.03 KB 0644
client_proto.cpython-38.opt-1.pyc File 5.99 KB 0644
client_proto.cpython-38.pyc File 5.99 KB 0644
client_reqrep.cpython-38.opt-1.pyc File 26.76 KB 0644
client_reqrep.cpython-38.pyc File 27.02 KB 0644
client_ws.cpython-38.opt-1.pyc File 8.65 KB 0644
client_ws.cpython-38.pyc File 8.65 KB 0644
connector.cpython-38.opt-1.pyc File 30.14 KB 0644
connector.cpython-38.pyc File 30.27 KB 0644
cookiejar.cpython-38.opt-1.pyc File 9.07 KB 0644
cookiejar.cpython-38.pyc File 9.11 KB 0644
formdata.cpython-38.opt-1.pyc File 4.38 KB 0644
formdata.cpython-38.pyc File 4.41 KB 0644
frozenlist.cpython-38.opt-1.pyc File 2.56 KB 0644
frozenlist.cpython-38.pyc File 2.56 KB 0644
hdrs.cpython-38.opt-1.pyc File 3.53 KB 0644
hdrs.cpython-38.pyc File 3.53 KB 0644
helpers.cpython-38.opt-1.pyc File 22.43 KB 0644
helpers.cpython-38.pyc File 22.43 KB 0644
http.cpython-38.opt-1.pyc File 1.21 KB 0644
http.cpython-38.pyc File 1.21 KB 0644
http_exceptions.cpython-38.opt-1.pyc File 4.17 KB 0644
http_exceptions.cpython-38.pyc File 4.17 KB 0644
http_parser.cpython-38.opt-1.pyc File 15.58 KB 0644
http_parser.cpython-38.pyc File 15.66 KB 0644
http_websocket.cpython-38.opt-1.pyc File 14.34 KB 0644
http_websocket.cpython-38.pyc File 14.46 KB 0644
http_writer.cpython-38.opt-1.pyc File 4.88 KB 0644
http_writer.cpython-38.pyc File 4.88 KB 0644
locks.cpython-38.opt-1.pyc File 1.65 KB 0644
locks.cpython-38.pyc File 1.65 KB 0644
log.cpython-38.opt-1.pyc File 438 B 0644
log.cpython-38.pyc File 438 B 0644
multipart.cpython-38.opt-1.pyc File 25.11 KB 0644
multipart.cpython-38.pyc File 25.55 KB 0644
payload.cpython-38.opt-1.pyc File 12.8 KB 0644
payload.cpython-38.pyc File 12.8 KB 0644
payload_streamer.cpython-38.opt-1.pyc File 3.15 KB 0644
payload_streamer.cpython-38.pyc File 3.15 KB 0644
pytest_plugin.cpython-38.opt-1.pyc File 9.17 KB 0644
pytest_plugin.cpython-38.pyc File 9.22 KB 0644
resolver.cpython-38.opt-1.pyc File 3.7 KB 0644
resolver.cpython-38.pyc File 3.7 KB 0644
signals.cpython-38.opt-1.pyc File 1.26 KB 0644
signals.cpython-38.pyc File 1.26 KB 0644
streams.cpython-38.opt-1.pyc File 17.57 KB 0644
streams.cpython-38.pyc File 17.84 KB 0644
tcp_helpers.cpython-38.opt-1.pyc File 1.08 KB 0644
tcp_helpers.cpython-38.pyc File 1.08 KB 0644
test_utils.cpython-38.opt-1.pyc File 20.44 KB 0644
test_utils.cpython-38.pyc File 20.58 KB 0644
tracing.cpython-38.opt-1.pyc File 13.98 KB 0644
tracing.cpython-38.pyc File 13.98 KB 0644
typedefs.cpython-38.opt-1.pyc File 1.28 KB 0644
typedefs.cpython-38.pyc File 1.28 KB 0644
web.cpython-38.opt-1.pyc File 9.48 KB 0644
web.cpython-38.pyc File 9.48 KB 0644
web_app.cpython-38.opt-1.pyc File 14.85 KB 0644
web_app.cpython-38.pyc File 14.89 KB 0644
web_exceptions.cpython-38.opt-1.pyc File 11.73 KB 0644
web_exceptions.cpython-38.pyc File 11.73 KB 0644
web_fileresponse.cpython-38.opt-1.pyc File 4.47 KB 0644
web_fileresponse.cpython-38.pyc File 4.51 KB 0644
web_log.cpython-38.opt-1.pyc File 6.96 KB 0644
web_log.cpython-38.pyc File 6.96 KB 0644
web_middlewares.cpython-38.opt-1.pyc File 3.72 KB 0644
web_middlewares.cpython-38.pyc File 3.8 KB 0644
web_protocol.cpython-38.opt-1.pyc File 15.28 KB 0644
web_protocol.cpython-38.pyc File 15.46 KB 0644
web_request.cpython-38.opt-1.pyc File 22.07 KB 0644
web_request.cpython-38.pyc File 22.18 KB 0644
web_response.cpython-38.opt-1.pyc File 18.96 KB 0644
web_response.cpython-38.pyc File 19.87 KB 0644
web_routedef.cpython-38.opt-1.pyc File 7.62 KB 0644
web_routedef.cpython-38.pyc File 7.62 KB 0644
web_runner.cpython-38.opt-1.pyc File 11.35 KB 0644
web_runner.cpython-38.pyc File 11.45 KB 0644
web_server.cpython-38.opt-1.pyc File 2.69 KB 0644
web_server.cpython-38.pyc File 2.69 KB 0644
web_urldispatcher.cpython-38.opt-1.pyc File 40.38 KB 0644
web_urldispatcher.cpython-38.pyc File 41.2 KB 0644
web_ws.cpython-38.opt-1.pyc File 12.77 KB 0644
web_ws.cpython-38.pyc File 12.91 KB 0644
worker.cpython-38.opt-1.pyc File 6.7 KB 0644
worker.cpython-38.pyc File 6.77 KB 0644