/usr/local/lib64/python3.6/site-packages/aiohttp/__pycache__
NameSizeModeActions
abc.cpython-36.pyc85280644editdlrm
base_protocol.cpython-36.pyc28240644editdlrm
client.cpython-36.pyc299650644editdlrm
client_exceptions.cpython-36.pyc113690644editdlrm
client_proto.cpython-36.pyc60410644editdlrm
client_reqrep.cpython-36.pyc277000644editdlrm
client_ws.cpython-36.pyc88240644editdlrm
connector.cpython-36.pyc352730644editdlrm
cookiejar.cpython-36.pyc108520644editdlrm
formdata.cpython-36.pyc44400644editdlrm
hdrs.cpython-36.pyc44730644editdlrm
helpers.cpython-36.pyc260370644editdlrm
http.cpython-36.pyc14220644editdlrm
http_exceptions.cpython-36.pyc43960644editdlrm
http_parser.cpython-36.pyc191820644editdlrm
http_websocket.cpython-36.pyc149420644editdlrm
http_writer.cpython-36.pyc54930644editdlrm
locks.cpython-36.pyc15820644editdlrm
log.cpython-36.pyc4230644editdlrm
multipart.cpython-36.pyc263120644editdlrm
payload.cpython-36.pyc134330644editdlrm
payload_streamer.cpython-36.pyc31820644editdlrm
pytest_plugin.cpython-36.pyc98700644editdlrm
resolver.cpython-36.pyc39400644editdlrm
streams.cpython-36.pyc186050644editdlrm
tcp_helpers.cpython-36.pyc10760644editdlrm
test_utils.cpython-36.pyc216670644editdlrm
tracing.cpython-36.pyc148570644editdlrm
typedefs.cpython-36.pyc14820644editdlrm
web.cpython-36.pyc107440644editdlrm
web_app.cpython-36.pyc151180644editdlrm
web_exceptions.cpython-36.pyc127660644editdlrm
web_fileresponse.cpython-36.pyc59350644editdlrm
web_log.cpython-36.pyc71820644editdlrm
web_middlewares.cpython-36.pyc38630644editdlrm
web_protocol.cpython-36.pyc157610644editdlrm
web_request.cpython-36.pyc238740644editdlrm
web_response.cpython-36.pyc210930644editdlrm
web_routedef.cpython-36.pyc79730644editdlrm
web_runner.cpython-36.pyc117550644editdlrm
web_server.cpython-36.pyc26810644editdlrm
web_urldispatcher.cpython-36.pyc422300644editdlrm
web_ws.cpython-36.pyc132810644editdlrm
worker.cpython-36.pyc69630644editdlrm
__init__.cpython-36.pyc42700644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/aiohttp/__pycache__/streams.cpython-36.pyc (18605B)
3 8%EgQ@s UddlZddlZddlZddlmZmZmZmZmZm Z m Z m Z ddl m Z ddlmZmZmZddlmZddlmZdZe d ZGdd d eZGdddeeZGdddZGdddZGdd d eZGdddeZeZeeGdd d eeZ Gdd d e eZ!dS)N) AwaitableCallableDequeGenericListOptionalTupleTypeVar) BaseProtocol)BaseTimerContext set_exception set_result)internal_logger)Final EMPTY_PAYLOAD EofStream StreamReader DataQueueFlowControlDataQueue_Tc@seZdZdZdS)rzeof stream indication.N)__name__ __module__ __qualname____doc__rr;/usr/local/lib64/python3.6/site-packages/aiohttp/streams.pyrsc@sDeZdZegeefddddZddddZedd d ZdS) AsyncStreamIteratorN) read_funcreturncCs ||_dS)N)r)selfrrrr__init__szAsyncStreamIterator.__init__zAsyncStreamIterator[_T])rcCs|S)Nr)r rrr __aiter__szAsyncStreamIterator.__aiter__c s<y|jIdH}Wntk r*tYnX|dkr8t|S)N)rrStopAsyncIteration)r rvrrr __anext__!s zAsyncStreamIterator.__anext__) rrrrrrr!r"r&rrrrrsrc@s@eZdZdddddZddddZeeefdd d ZdS) ChunkTupleAsyncStreamIteratorrN)streamrcCs ||_dS)N)_stream)r r(rrrr!,sz&ChunkTupleAsyncStreamIterator.__init__)rcCs|S)Nr)r rrrr"/sz'ChunkTupleAsyncStreamIterator.__aiter__cs |jjIdH}|dkrt|S)Nr#F)r#F)r) readchunkr$)r r%rrrr&2sz'ChunkTupleAsyncStreamIterator.__anext__) rrrr!r"rbytesboolr&rrrrr'+sr'c@sReZdZeedddZeeedddZeedddZe dd d Z d S) AsyncStreamReaderMixin)rcCs t|jS)N)rreadline)r rrrr":sz AsyncStreamReaderMixin.__aiter__)nrcstfddS)zzReturns an asynchronous iterator that yields chunks of size n. Python-3.5 available for Python 3.5+ only cs jS)N)readr)r/r rrCsz5AsyncStreamReaderMixin.iter_chunked..)r)r r/r)r/r r iter_chunked=sz#AsyncStreamReaderMixin.iter_chunkedcCs t|jS)zoYield all available data as soon as it is received. Python-3.5 available for Python 3.5+ only )rreadany)r rrriter_anyFszAsyncStreamReaderMixin.iter_anycCst|S)zYield 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_chunksMsz"AsyncStreamReaderMixin.iter_chunksN) rrrrr+r"intr2r4r'r5rrrrr-9s r-c@seZdZdZdZdddeeeeee j ddddZ e dd d Z eeefdd d Zeedd dZeddddZegdfddddZddddZedddZedddZddddZeddddZd@eedd d!d"Zddd#d$Zddd%d&Ze dd'd(d)Zedd*d+Z dAeed-d.d/Z!dCeed1d2d3Z"edd4d5Z#eeefdd6d7Z$eed1d8d9Z%dEeed1d:d;Z&eed1dd?Z(dS)Fra*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)timerloop)protocollimitr7r8rcCsv||_||_|d|_|dkr&tj}||_d|_d|_d|_t j |_ d|_ d|_ d|_d|_d|_||_g|_dS)NrF) _protocol _low_water _high_waterasyncioget_event_loop_loop_size_cursor_http_chunk_splits collectionsdeque_buffer_buffer_offset_eof_waiter _eof_waiter _exception_timer_eof_callbacks)r r9r:r7r8rrrr!hs"  zStreamReader.__init__)rcCs|jjg}|jr |jd|j|jr0|jd|jd krP|jd|j|jf|jrf|jd|j|jr||jd|jdd j |S) Nz%d byteseofr;zlow=%d high=%dzw=%rze=%rz<%s> i) __class__rrBappendrIr=r>rJrLjoin)r inforrr__repr__s   zStreamReader.__repr__cCs |j|jfS)N)r=r>)r rrrget_read_buffer_limitssz#StreamReader.get_read_buffer_limitscCs|jS)N)rL)r rrr exceptionszStreamReader.exception)excrcCsP||_|jj|j}|dk r.d|_t|||j}|dk rLd|_t||dS)N)rLrNclearrJr rK)r rYwaiterrrrr s  zStreamReader.set_exception)callbackrc CsB|jr2y |Wq>tk r.tjdYq>Xn |jj|dS)NzException in eof callback)rI ExceptionrrXrNrS)r r\rrron_eofs  zStreamReader.on_eofc Csd|_|j}|dk r$d|_t|d|j}|dk rBd|_t|dx8|jD].}y |WqJtk rvtjdYqJXqJW|jjdS)NTzException in eof callback) rIrJrrKrNr]rrXrZ)r r[cbrrrfeed_eofs    zStreamReader.feed_eofcCs|jS)z&Return True if 'feed_eof' was called.)rI)r rrris_eofszStreamReader.is_eofcCs|jo |j S)z=Return True if the buffer is empty and 'feed_eof' was called.)rIrG)r rrrat_eofszStreamReader.at_eofc sB|jr dS|jdkst|jj|_z|jIdHWdd|_XdS)N)rIrKAssertionErrorrA create_future)r rrrwait_eofs zStreamReader.wait_eof)datarcCsxtjdtdd|sdS|jr>|jd|jd|jd<d|_|jt|7_|jt|8_|jj|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)r;) stacklevelNr) warningswarnDeprecationWarningrHrGrBlenrC appendleft _eof_counter)r rfrrr unread_datas zStreamReader.unread_data)rfsizercCs|j std|sdS|jt|7_|jj||jt|7_|j}|dk rfd|_t|d|j|j kr|j j r|j j dS)Nzfeed_data after feed_eof) rIrcrBrkrGrS total_bytesrJrr>r<_reading_paused pause_reading)r rfror[rrr feed_datas  zStreamReader.feed_datacCs"|jdkr|jrtdg|_dS)Nz?Called begin_http_chunk_receiving whensome data was already fed)rDrp RuntimeError)r rrrbegin_http_chunk_receivings  z'StreamReader.begin_http_chunk_receivingcCsd|jdkrtd|jr"|jdnd}|j|kr4dS|jj|j|j}|dk r`d|_t|ddS)NzFCalled end_chunk_receiving without calling begin_chunk_receiving firstr r)rDrtrprSrJr)r posr[rrrend_http_chunk_receivings   z%StreamReader.end_http_chunk_receiving) func_namercsf|jdk rtd||jj}|_z2|jrL|j|IdHWdQRXn |IdHWdd|_XdS)NzH%s() called while another coroutine is already waiting for incoming data)rJrtrArdrM)r ryr[rrr_wait!s zStreamReader._waitcs|jIdHS)N) readuntil)r rrrr.6szStreamReader.readline ) separatorrc st|}|dkrtd|jdk r(|jd}d}d}x|rxn|jr|r|j}|jdj||d}|j|rr||nd }||7}|t|7}|rd}||jkrrIrz) r r}seplenchunk chunk_sizeZ not_enoughoffsetZicharrfrrrr{9s0     zStreamReader.readuntilr )r/rcs|jdk r|j|jrH|j rHt|ddd|_|jdkrHtjddd|sPdS|dkrg}x"|jIdH}|srP|j|q^Wdj |Sx$|j r|j r|j d IdHqW|j |S) Nrmrr zEMultiple access to StreamReader in eof state, might be infinite loop.T) stack_infor#r0) rLrIrGgetattrrmrwarningr3rSrTrz _read_nowait)r r/blocksblockrrrr0[s*   zStreamReader.readcs@|jdk r|jx$|j r4|j r4|jdIdHqW|jdS)Nr3r rv)rLrGrIrzr)r rrrr3s  zStreamReader.readanycsx|jdk r|jxL|jr^|jjd}||jkr4d S||jkrR|j||jdfStjdqW|jrt|jd dfS|j r~d S|j dIdHqWdS) aReturns 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. Nrr#TzESkipping HTTP chunk end due to data consumption beyond chunk boundaryr Fr*)r#Trv)r#F) rLrDpoprCrrrrGrrIrz)r rwrrrr*s      zStreamReader.readchunkcst|jdk r|jg}xT|dkrh|j|IdH}|sPdj|}tj|t|||j||t|8}qWdj|S)Nrr#)rLr0rTr?IncompleteReadErrorrkrS)r r/rrpartialrrr readexactlys    zStreamReader.readexactlycCs4|jdk r|j|jr*|jj r*td|j|S)Nz9Called while some coroutine is waiting for incoming data.)rLrJdonertr)r r/rrr read_nowaits  zStreamReader.read_nowaitcCs|jd}|j}|dkrHt|||krH||||}|j|7_n,|rj|jj||d}d|_n |jj}|jt|8_|jt|7_|j}x |r|d|jkr|jdqW|j|jkr|j j r|j j |S)Nrr rv) rGrHrkpopleftrBrCrDrr=r<rqresume_reading)r r/Z first_bufferrrfZ chunk_splitsrrrrs$     zStreamReader._read_nowait_chunkcCsTg}x<|jr@|j|}|j||dkr|t|8}|dkrPqW|rPdj|SdS)z6Read not more than n bytes, or whole buffer if n == -1r rr#rv)rGrrSrkrT)r r/chunksrrrrrs   zStreamReader._read_nowait)r)r|rv)rvrv)rv))rrrrrpr r6rr r?AbstractEventLoopr!strrVrrW BaseExceptionrXr rr^r`r,rarbrer+rnrsrurxrzr.r{r0r3r*rrrrrrrrrXs8   "* "c@seZdZddddZeedddZedddd Zegdfdd d d Z ddd dZ e dddZ e dddZ ddddZd'eeddddZedddZd)eedddZeddd Zeee fdd!d"Zeedd#d$Zd+eedd%d&ZdS),EmptyStreamReaderN)rcCsdS)Nr)r rrrr!szEmptyStreamReader.__init__cCsdS)Nr)r rrrrXszEmptyStreamReader.exception)rYrcCsdS)Nr)r rYrrrr szEmptyStreamReader.set_exception)r\rc Cs.y |Wntk r(tjdYnXdS)NzException in eof callback)r]rrX)r r\rrrr^s zEmptyStreamReader.on_eofcCsdS)Nr)r rrrr` szEmptyStreamReader.feed_eofcCsdS)NTr)r rrrraszEmptyStreamReader.is_eofcCsdS)NTr)r rrrrbszEmptyStreamReader.at_eofcsdS)Nr)r rrrreszEmptyStreamReader.wait_eofr)rfr/rcCsdS)Nr)r rfr/rrrrsszEmptyStreamReader.feed_datacsdS)Nr#r)r rrrr.szEmptyStreamReader.readliner )r/rcsdS)Nr#r)r r/rrrr0szEmptyStreamReader.readcsdS)Nr#r)r rrrr3"szEmptyStreamReader.readanycsdS)Nr#T)r#Tr)r rrrr*%szEmptyStreamReader.readchunkcstjd|dS)Nr#)r?r)r r/rrrr(szEmptyStreamReader.readexactlycCsdS)Nr#r)r r/rrrr+szEmptyStreamReader.read_nowait)rrv)rvrv)rv)rrrr!rrrXr rr^r`r,rarbrer+r6rsr.r0r3rr*rrrrrrrsrc@seZdZdZejddddZedddZe dd d Z e dd d Z e e dd dZe ddddZdeeddddZddddZedddZeedddZdS)rz>DataQueue is a general-purpose blocking queue with one reader.N)r8rcCs,||_d|_d|_d|_d|_tj|_dS)NFr)rArIrJrLrBrErFrG)r r8rrrr!5s zDataQueue.__init__)rcCs t|jS)N)rkrG)r rrr__len__=szDataQueue.__len__cCs|jS)N)rI)r rrrra@szDataQueue.is_eofcCs|jo |j S)N)rIrG)r rrrrbCszDataQueue.at_eofcCs|jS)N)rL)r rrrrXFszDataQueue.exception)rYrcCs.d|_||_|j}|dk r*d|_t||dS)NT)rIrLrJr )r rYr[rrrr Is zDataQueue.set_exceptionr)rfrorcCs@|j|7_|jj||f|j}|dk rs4(   &4I