[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.142.114.145: ~ $


���Z?A�@sddlZddlZddlmZmZddlmZddddd	fZd
dZGdd�de	�Z
Gd
d�d�ZGdd�de�ZGdd�d�Z
Gdd�de
�ZGdd�de
�Ze�ZGdd�d�ZGdd	�d	e�ZdS)�N�)�
set_exception�
set_result)�internal_logger�
EMPTY_PAYLOAD�	EofStream�StreamReader�	DataQueue�FlowControlDataQueue��c@seZdZdZdS)rzeof stream indication.N)�__name__�
__module__�__qualname__�__doc__�rr�/streams.pyrsc@s4eZdZdd�Zdd�Zdd�ZdS)�AsyncStreamIteratorcCs
||_dS)N)�	read_func)�selfrrrr�__init__szAsyncStreamIterator.__init__cCs|S)Nr)rrrr�	__aiter__szAsyncStreamIterator.__aiter__c�sFy|j�IdH}Wntk
r/t�YnX|dkrBt�|S)N�)rr�StopAsyncIteration)r�rvrrr�	__anext__s
zAsyncStreamIterator.__anext__N)r
rrrrrrrrrrsrc@seZdZdd�ZdS)�ChunkTupleAsyncStreamIteratorc�s'|j�IdH}|dkr#t�|S)NrF)rF)rr)rrrrrr&sz'ChunkTupleAsyncStreamIterator.__anext__N)r
rrrrrrrr%src@s@eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�AsyncStreamReaderMixincCs
t|j�S)N)r�readline)rrrrr/sz AsyncStreamReaderMixin.__aiter__cst��fdd��S)zzReturns an asynchronous iterator that yields chunks of size n.

        Python-3.5 available for Python 3.5+ only
        cs
�j��S)N)�readr)�nrrr�<lambda>7sz5AsyncStreamReaderMixin.iter_chunked.<locals>.<lambda>)r)rr r)r rr�iter_chunked2sz#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�readany)rrrr�iter_any9szAsyncStreamReaderMixin.iter_anycCs
t|j�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�	readchunk)rrrr�iter_chunksAsz"AsyncStreamReaderMixin.iter_chunksN)r
rrrr"r$r&rrrrr-src@s?eZdZdZdZdedddddd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zddd�Zdd�Zdd �Zd!d"�Zd#d$�Zd4d&d'�Zd(d)�Zd*d+�Zd,d-�Zd5d.d/�Zd0d1�Zd2d3�ZdS)6ra*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():
            ...

    r�limit�timerN�loopcCs�||_||_|d|_|dkr7tj�}||_d|_d|_d|_t	j
�|_d|_d|_
d|_d|_d|_||_g|_dS)NrrF)�	_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�protocolr'r(r)rrrr[s"		
										zStreamReader.__init__cCs�|jjg}|jr,|jd|j�|jrB|jd�|jtkrn|jd|j|jf�|jr�|jd|j�|j	r�|jd|j	�ddj
|�S)Nz%d bytes�eofzlow=%d high=%dzw=%rze=%rz<%s>� )�	__class__r
r/�appendr6r+�
DEFAULT_LIMITr,r7r9�join)r�inforrr�__repr__os		
		zStreamReader.__repr__cCs|jS)N)r9)rrrr�	exception}szStreamReader.exceptioncCsp||_|jj�|j}|dk	rAd|_t||�|j}|dk	rlt||�d|_dS)N)r9r;�clearr7rr8)r�exc�waiterrrrr�s	
		
	
zStreamReader.set_exceptioncCsM|jr9y|�WqItk
r5tjd�YqIXn|jj|�dS)NzException in eof callback)r6�	ExceptionrrEr;r@)r�callbackrrr�on_eof�s	
zStreamReader.on_eofcCs�d|_|j}|dk	r4d|_t|d�|j}|dk	r_d|_t|d�x>|jD]3}y|�Wqitk
r�tjd�YqiXqiW|jj�dS)NTzException in eof callback)	r6r7rr8r;rIrrErF)rrH�cbrrr�feed_eof�s			
		

zStreamReader.feed_eofcCs|jS)z&Return True if  'feed_eof' was called.)r6)rrrr�is_eof�szStreamReader.is_eofcCs|jo|jS)z=Return True if the buffer is empty and 'feed_eof' was called.)r6r4)rrrr�at_eof�szStreamReader.at_eofc�sU|jr
dS|jdks"t�|jj�|_z|jIdHWdd|_XdS)N)r6r8�AssertionErrorr.�
create_future)rrrr�wait_eof�s	zStreamReader.wait_eofcCs�|s
dS|jr=|jd|jd�|jd<d|_|jt|�7_|jt|�8_|jj|�d|_dS)zN rollback reading some data from stream, inserting it to buffer head.
        Nr)r5r4r/�lenr0�
appendleft�_eof_counter)r�datarrr�unread_data�s	!	zStreamReader.unread_datacCs�|jstd��|s dS|jt|�7_|jj|�|jt|�7_|j}|dk	r�d|_t|d�|j|j	kr�|j
jr�|j
j�dS)Nzfeed_data after feed_eofF)
r6rPr/rSr4r@�total_bytesr7rr,r*�_reading_paused�
pause_reading)rrV�sizerHrrr�	feed_data�s		

zStreamReader.feed_datacCs|jdkrg|_dS)N)r1)rrrr�begin_http_chunk_receiving�sz'StreamReader.begin_http_chunk_receivingcCsR|jdkrtd��|js;|jd|jkrN|jj|j�dS)NzFCalled end_chunk_receiving without calling begin_chunk_receiving firstr���)r1�RuntimeErrorrXr@)rrrr�end_http_chunk_receiving�s

z%StreamReader.end_http_chunk_receivingc�sy|jdk	rtd|��|jj�}|_z3|jr^|j�|IdHWdQRXn	|IdHWdd|_XdS)NzH%s() called while another coroutine is already waiting for incoming data)r7r_r.rQr:)r�	func_namerHrrr�_wait�s
	

zStreamReader._waitc�s|jdk	r|j�g}d}d}x�|r�x�|jr�|r�|j}|jdjd|�d}|j|r�||nd	�}|j|�|t|�7}|r�d}||jkr6td��q6W|j	r�P|r-|j
d�IdHq-Wdj|�S)
NrTs
rFzLine is too longrrr^)r9r4r5�find�_read_nowait_chunkr@rSr,�
ValueErrorr6rbrB)r�lineZ	line_sizeZ
not_enough�offsetZicharrVrrrrs*			
	zStreamReader.readlinerc�s�|jdk	r|j�|jrf|jrft|dd�d|_|jdkrftjddd�|spdS|dkr�g}x)|j�IdH}|s�P|j|�q�Wdj	|�S|jr�|jr�|j
d	�IdH|j|�S)
NrUrr�zEMultiple access to StreamReader in eof state, might be infinite loop.�
stack_infoTrr)r9r6r4�getattrrUr�warningr#r@rBrb�_read_nowait)rr �blocks�blockrrrrs*	
zStreamReader.readc�sK|jdk	r|j�|jr>|jr>|jd�IdH|jd�S)Nr#rr^)r9r4r6rbrl)rrrrr#Cs
	zStreamReader.readanyc�s|jdk	r|j�|jrw|jrw|jre|j|jdkre|jdd�|_dS|jd�IdH|js�d	S|jdk	rxY|jr�|jd}|jdd�|_||jkr�|j||j�dfSq�W|jd
�dfS|jd�dfSdS)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.
        NrrrTr%F)rT)rFr^r^)r9r4r6r1r0rbrlrd)r�posrrrr%Ls$			
zStreamReader.readchunkc�s�|jdk	r|j�g}xu|dkr�|j|�IdH}|sudj|�}tjj|t|�|��|j|�|t|�8}q!Wdj|�S)Nrr)r9rrBr-�streams�IncompleteReadErrorrSr@)rr rmrn�partialrrr�readexactlyjs		
zStreamReader.readexactlycCsJ|jdk	r|j�|jr=|jj�r=td��|j|�S)Nz9Called while some coroutine is waiting for incoming data.)r9r7�doner_rl)rr rrr�read_nowaitzs		zStreamReader.read_nowaitcCs�|jd}|j}|dkr^t|�||kr^||||�}|j|7_n>|r�|jj�||d�}d|_n|jj�}|jt|�8_|jt|�7_|j|jkr�|jjr�|jj	�|S)Nrrr^)
r4r5rS�popleftr/r0r+r*rY�resume_reading)rr Zfirst_bufferrgrVrrrrd�s
	"

zStreamReader._read_nowait_chunkcCsrg}xR|jrZ|j|�}|j|�|dkr	|t|�8}|dkr	Pq	W|rndj|�SdS)Nrrrr^)r4rdr@rSrB)rr Zchunks�chunkrrrrl�s
zStreamReader._read_nowaitr^r^)r
rrrrXrArrDrErrKrMrNrOrRrWr\r]r`rbrrr#r%rsrurdrlrrrrrKs2	%	c@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zddd�Zdd�Z
dd�Zdd�Zdd�ZdS) �EmptyStreamReadercCsdS)Nr)rrrrrE�szEmptyStreamReader.exceptioncCsdS)Nr)rrGrrrr�szEmptyStreamReader.set_exceptioncCs1y|�Wntk
r,tjd�YnXdS)NzException in eof callback)rIrrE)rrJrrrrK�s
zEmptyStreamReader.on_eofcCsdS)Nr)rrrrrM�szEmptyStreamReader.feed_eofcCsdS)NTr)rrrrrN�szEmptyStreamReader.is_eofcCsdS)NTr)rrrrrO�szEmptyStreamReader.at_eofc�sdS)Nr)rrrrrR�szEmptyStreamReader.wait_eofcCsdS)Nr)rrVrrrr\�szEmptyStreamReader.feed_datac�sdS)Nrr)rrrrr�szEmptyStreamReader.readlinerc�sdS)Nrr)rr rrrr�szEmptyStreamReader.readc�sdS)Nrr)rrrrr#�szEmptyStreamReader.readanyc�sdS)NrF)rFr)rrrrr%�szEmptyStreamReader.readchunkc�stjjd|��dS)Nr)r-rprq)rr rrrrs�szEmptyStreamReader.readexactlycCsdS)Nrr)rrrrru�szEmptyStreamReader.read_nowaitNr^)r
rrrErrKrMrNrOrRr\rrr#r%rsrurrrrry�sryc@s�eZdZdZdddd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	ddd�Z
dd�Zdd�Zdd�Z
dS)r	z>DataQueue is a general-purpose blocking queue with one reader.r)NcCs@||_d|_d|_d|_d|_tj�|_dS)NFr)r.r6r7r9r/r2r3r4)rr)rrrr�s					zDataQueue.__init__cCs
t|j�S)N)rSr4)rrrr�__len__�szDataQueue.__len__cCs|jS)N)r6)rrrrrN�szDataQueue.is_eofcCs|jo|jS)N)r6r4)rrrrrO�szDataQueue.at_eofcCs|jS)N)r9)rrrrrE�szDataQueue.exceptioncCsAd|_||_|j}|dk	r=t||�d|_dS)NT)r6r9r7r)rrGrHrrrr�s			
zDataQueue.set_exceptionrcCsT|j|7_|jj||f�|j}|dk	rPd|_t|d�dS)NT)r/r4r@r7r)rrVr[rHrrrr\�s		zDataQueue.feed_datacCs8d|_|j}|dk	r4d|_t|d�dS)NTF)r6r7r)rrHrrrrMs
			zDataQueue.feed_eofc�s�|jrs|jrs|js$t�|jj�|_y|jIdHWn*tjtjfk
rrd|_�YnX|jr�|jj	�\}}|j
|8_
|S|jdk	r�|j�nt�dS)N)
r4r6r7rPr.rQr-�CancelledError�TimeoutErrorrvr/r9r)rrVr[rrrrs		zDataQueue.readcCs
t|j�S)N)rr)rrrrr$szDataQueue.__aiter__)r
rrrrrzrNrOrErr\rMrrrrrrr	�s		csXeZdZdZdedd�fdd�Z�fdd�Z�fd	d
�Z�S)r
zgFlowControlDataQueue resumes and pauses an underlying stream.

    It is a destination for parsed data.r'r)Ncs-t�jd|�||_|d|_dS)Nr)r)�superrr*�_limit)rr<r'r))r?rrr-s	zFlowControlDataQueue.__init__csCt�j||�|j|jkr?|jjr?|jj�dS)N)r}r\r/r~r*rYrZ)rrVr[)r?rrr\3szFlowControlDataQueue.feed_datac�sIzt�j�IdHSWd|j|jkrD|jjrD|jj�XdS)N)r}rr/r~r*rYrw)r)r?rrr9szFlowControlDataQueue.read)r
rrrrArr\rrr)r?rr
(s)r-r2Zhelpersrr�logr�__all__rArIrrrrrryrr	r
rrrr�<module>s 	
�b0	I

Filemanager

Name Type Size Permission Actions
__init__.cpython-35.opt-1.pyc File 947 B 0644
__init__.cpython-35.pyc File 947 B 0644
abc.cpython-35.opt-1.pyc File 6.08 KB 0644
abc.cpython-35.pyc File 6.08 KB 0644
client.cpython-35.opt-1.pyc File 22.11 KB 0644
client.cpython-35.pyc File 22.11 KB 0644
client_exceptions.cpython-35.opt-1.pyc File 8.04 KB 0644
client_exceptions.cpython-35.pyc File 8.04 KB 0644
client_proto.cpython-35.opt-1.pyc File 5.01 KB 0644
client_proto.cpython-35.pyc File 5.01 KB 0644
client_reqrep.cpython-35.opt-1.pyc File 23.56 KB 0644
client_reqrep.cpython-35.pyc File 23.69 KB 0644
client_ws.cpython-35.opt-1.pyc File 8.09 KB 0644
client_ws.cpython-35.pyc File 8.09 KB 0644
connector.cpython-35.opt-1.pyc File 24.95 KB 0644
connector.cpython-35.pyc File 24.95 KB 0644
cookiejar.cpython-35.opt-1.pyc File 8.4 KB 0644
cookiejar.cpython-35.pyc File 8.4 KB 0644
formdata.cpython-35.opt-1.pyc File 4.19 KB 0644
formdata.cpython-35.pyc File 4.19 KB 0644
frozenlist.cpython-35.opt-1.pyc File 2.73 KB 0644
frozenlist.cpython-35.pyc File 2.73 KB 0644
hdrs.cpython-35.opt-1.pyc File 3.72 KB 0644
hdrs.cpython-35.pyc File 3.72 KB 0644
helpers.cpython-35.opt-1.pyc File 24.01 KB 0644
helpers.cpython-35.pyc File 24.01 KB 0644
http.cpython-35.opt-1.pyc File 1.26 KB 0644
http.cpython-35.pyc File 1.26 KB 0644
http_exceptions.cpython-35.opt-1.pyc File 3.55 KB 0644
http_exceptions.cpython-35.pyc File 3.55 KB 0644
http_parser.cpython-35.opt-1.pyc File 14.1 KB 0644
http_parser.cpython-35.pyc File 14.16 KB 0644
http_websocket.cpython-35.opt-1.pyc File 13.92 KB 0644
http_websocket.cpython-35.pyc File 14.01 KB 0644
http_writer.cpython-35.opt-1.pyc File 4.06 KB 0644
http_writer.cpython-35.pyc File 4.06 KB 0644
locks.cpython-35.opt-1.pyc File 1.39 KB 0644
locks.cpython-35.pyc File 1.39 KB 0644
log.cpython-35.opt-1.pyc File 409 B 0644
log.cpython-35.pyc File 409 B 0644
multipart.cpython-35.opt-1.pyc File 25.14 KB 0644
multipart.cpython-35.pyc File 25.59 KB 0644
payload.cpython-35.opt-1.pyc File 9.29 KB 0644
payload.cpython-35.pyc File 9.42 KB 0644
payload_streamer.cpython-35.opt-1.pyc File 2.58 KB 0644
payload_streamer.cpython-35.pyc File 2.58 KB 0644
pytest_plugin.cpython-35.opt-1.pyc File 9.22 KB 0644
pytest_plugin.cpython-35.pyc File 9.28 KB 0644
resolver.cpython-35.opt-1.pyc File 3.33 KB 0644
resolver.cpython-35.pyc File 3.33 KB 0644
signals.cpython-35.opt-1.pyc File 1.23 KB 0644
signals.cpython-35.pyc File 1.23 KB 0644
streams.cpython-35.opt-1.pyc File 16.41 KB 0644
streams.cpython-35.pyc File 16.74 KB 0644
tcp_helpers.cpython-35.opt-1.pyc File 1.37 KB 0644
tcp_helpers.cpython-35.pyc File 1.37 KB 0644
test_utils.cpython-35.opt-1.pyc File 17.71 KB 0644
test_utils.cpython-35.pyc File 17.76 KB 0644
tracing.cpython-35.opt-1.pyc File 11.2 KB 0644
tracing.cpython-35.pyc File 11.2 KB 0644
web.cpython-35.opt-1.pyc File 4.65 KB 0644
web.cpython-35.pyc File 4.65 KB 0644
web_app.cpython-35.opt-1.pyc File 9.78 KB 0644
web_app.cpython-35.pyc File 10.24 KB 0644
web_exceptions.cpython-35.opt-1.pyc File 11.98 KB 0644
web_exceptions.cpython-35.pyc File 11.98 KB 0644
web_fileresponse.cpython-35.opt-1.pyc File 5.44 KB 0644
web_fileresponse.cpython-35.pyc File 5.44 KB 0644
web_middlewares.cpython-35.opt-1.pyc File 2.63 KB 0644
web_middlewares.cpython-35.pyc File 2.63 KB 0644
web_protocol.cpython-35.opt-1.pyc File 13.36 KB 0644
web_protocol.cpython-35.pyc File 13.39 KB 0644
web_request.cpython-35.opt-1.pyc File 19.16 KB 0644
web_request.cpython-35.pyc File 19.16 KB 0644
web_response.cpython-35.opt-1.pyc File 17.11 KB 0644
web_response.cpython-35.pyc File 17.84 KB 0644
web_runner.cpython-35.opt-1.pyc File 9.55 KB 0644
web_runner.cpython-35.pyc File 9.55 KB 0644
web_server.cpython-35.opt-1.pyc File 2.04 KB 0644
web_server.cpython-35.pyc File 2.04 KB 0644
web_urldispatcher.cpython-35.opt-1.pyc File 37.12 KB 0644
web_urldispatcher.cpython-35.pyc File 38.15 KB 0644
web_ws.cpython-35.opt-1.pyc File 12.52 KB 0644
web_ws.cpython-35.pyc File 12.52 KB 0644
worker.cpython-35.opt-1.pyc File 6.4 KB 0644
worker.cpython-35.pyc File 6.4 KB 0644