/usr/lib64/python3.9/asyncio/__pycache__
NameSizeModeActions
base_events.cpython-39.opt-1.pyc521760644editdlrm
base_events.cpython-39.opt-2.pyc431470644editdlrm
base_events.cpython-39.pyc523000644editdlrm
base_futures.cpython-39.opt-1.pyc19100644editdlrm
base_futures.cpython-39.opt-2.pyc16560644editdlrm
base_futures.cpython-39.pyc19100644editdlrm
base_subprocess.cpython-39.opt-1.pyc93420644editdlrm
base_subprocess.cpython-39.opt-2.pyc92420644editdlrm
base_subprocess.cpython-39.pyc94120644editdlrm
base_tasks.cpython-39.opt-1.pyc19460644editdlrm
base_tasks.cpython-39.opt-2.pyc19460644editdlrm
base_tasks.cpython-39.pyc19460644editdlrm
constants.cpython-39.opt-1.pyc5830644editdlrm
constants.cpython-39.opt-2.pyc5830644editdlrm
constants.cpython-39.pyc5830644editdlrm
coroutines.cpython-39.opt-1.pyc65750644editdlrm
coroutines.cpython-39.opt-2.pyc63430644editdlrm
coroutines.cpython-39.pyc66390644editdlrm
events.cpython-39.opt-1.pyc280780644editdlrm
events.cpython-39.opt-2.pyc189810644editdlrm
events.cpython-39.pyc281600644editdlrm
exceptions.cpython-39.opt-1.pyc25550644editdlrm
exceptions.cpython-39.opt-2.pyc19110644editdlrm
exceptions.cpython-39.pyc25550644editdlrm
format_helpers.cpython-39.opt-1.pyc23260644editdlrm
format_helpers.cpython-39.opt-2.pyc20820644editdlrm
format_helpers.cpython-39.pyc23260644editdlrm
futures.cpython-39.opt-1.pyc116270644editdlrm
futures.cpython-39.opt-2.pyc81210644editdlrm
futures.cpython-39.pyc117780644editdlrm
locks.cpython-39.opt-1.pyc144660644editdlrm
locks.cpython-39.opt-2.pyc82290644editdlrm
locks.cpython-39.pyc144660644editdlrm
log.cpython-39.opt-1.pyc2280644editdlrm
log.cpython-39.opt-2.pyc1890644editdlrm
log.cpython-39.pyc2280644editdlrm
proactor_events.cpython-39.opt-1.pyc241860644editdlrm
proactor_events.cpython-39.opt-2.pyc237860644editdlrm
proactor_events.cpython-39.pyc244160644editdlrm
protocols.cpython-39.opt-1.pyc84370644editdlrm
protocols.cpython-39.opt-2.pyc33570644editdlrm
protocols.cpython-39.pyc84370644editdlrm
queues.cpython-39.opt-1.pyc84660644editdlrm
queues.cpython-39.opt-2.pyc57870644editdlrm
queues.cpython-39.pyc84660644editdlrm
runners.cpython-39.opt-1.pyc22090644editdlrm
runners.cpython-39.opt-2.pyc15270644editdlrm
runners.cpython-39.pyc22090644editdlrm
selector_events.cpython-39.opt-1.pyc296740644editdlrm
selector_events.cpython-39.opt-2.pyc280280644editdlrm
selector_events.cpython-39.pyc297180644editdlrm
sslproto.cpython-39.opt-1.pyc217240644editdlrm
sslproto.cpython-39.opt-2.pyc147730644editdlrm
sslproto.cpython-39.pyc218880644editdlrm
staggered.cpython-39.opt-1.pyc40090644editdlrm
staggered.cpython-39.opt-2.pyc18760644editdlrm
staggered.cpython-39.pyc41620644editdlrm
streams.cpython-39.opt-1.pyc203610644editdlrm
streams.cpython-39.opt-2.pyc144670644editdlrm
streams.cpython-39.pyc205880644editdlrm
subprocess.cpython-39.opt-1.pyc73230644editdlrm
subprocess.cpython-39.opt-2.pyc71950644editdlrm
subprocess.cpython-39.pyc73370644editdlrm
tasks.cpython-39.opt-1.pyc242490644editdlrm
tasks.cpython-39.opt-2.pyc169980644editdlrm
tasks.cpython-39.pyc242890644editdlrm
threads.cpython-39.opt-1.pyc9800644editdlrm
threads.cpython-39.opt-2.pyc5140644editdlrm
threads.cpython-39.pyc9800644editdlrm
transports.cpython-39.opt-1.pyc125220644editdlrm
transports.cpython-39.opt-2.pyc69720644editdlrm
transports.cpython-39.pyc125360644editdlrm
trsock.cpython-39.opt-1.pyc85710644editdlrm
trsock.cpython-39.opt-2.pyc83150644editdlrm
trsock.cpython-39.pyc85710644editdlrm
unix_events.cpython-39.opt-1.pyc417260644editdlrm
unix_events.cpython-39.opt-2.pyc365030644editdlrm
unix_events.cpython-39.pyc420460644editdlrm
windows_events.cpython-39.opt-1.pyc247170644editdlrm
windows_events.cpython-39.opt-2.pyc236100644editdlrm
windows_events.cpython-39.pyc247330644editdlrm
windows_utils.cpython-39.opt-1.pyc44370644editdlrm
windows_utils.cpython-39.opt-2.pyc40030644editdlrm
windows_utils.cpython-39.pyc45050644editdlrm
__init__.cpython-39.opt-1.pyc7810644editdlrm
__init__.cpython-39.opt-2.pyc7250644editdlrm
__init__.cpython-39.pyc7810644editdlrm
__main__.cpython-39.opt-1.pyc32120644editdlrm
__main__.cpython-39.opt-2.pyc32120644editdlrm
__main__.cpython-39.pyc32120644editdlrm
Edit: /usr/lib64/python3.9/asyncio/__pycache__/streams.cpython-39.pyc (20588B)
a i h@s&dZddlZddlZddlZddlZeedr6ed7ZddlmZddlmZddlm Z dd lm Z dd lm Z dd l m Z dd lmZd ZddedddZd dedddZeedrd!dedddZd"dedddZGddde jZGdddee jZGdddZGdddZdS)#) StreamReader StreamWriterStreamReaderProtocolopen_connection start_serverNAF_UNIX)open_unix_connectionstart_unix_server) coroutines)events) exceptions)format_helpers) protocols)logger)sleepi)looplimitc sx|durt}ntjdtddt||d}t||d|jfdd||fi|IdH\}}t|||}||fS) aA wrapper for create_connection() returning a (reader, writer) pair. The reader returned is a StreamReader instance; the writer is a StreamWriter instance. The arguments are all the usual arguments to create_connection() except protocol_factory; most common are positional host and port, with various optional keyword arguments following. Additional optional keyword arguments are loop (to set the event loop instance to use) and limit (to set the buffer limit passed to the StreamReader). (If you want to customize the StreamReader and/or StreamReaderProtocol classes, just copy the code -- there's really nothing special here except some convenience.) N[The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10. stacklevelrrrcsSNrprotocolr'/usr/lib64/python3.9/asyncio/streams.py5z!open_connection..) r get_event_loopwarningswarnDeprecationWarningrrcreate_connectionr) hostportrrkwdsreader transport_writerrrrrs   rcsNdurtntjdtddfdd}j|||fi|IdHS)aStart a socket server, call back for each client connected. The first parameter, `client_connected_cb`, takes two parameters: client_reader, client_writer. client_reader is a StreamReader object, while client_writer is a StreamWriter object. This parameter can either be a plain callback function or a coroutine; if it is a coroutine, it will be automatically converted into a Task. The rest of the arguments are all the usual arguments to loop.create_server() except protocol_factory; most common are positional host and port, with various optional keyword arguments following. The return value is the same as loop.create_server(). Additional optional keyword arguments are loop (to set the event loop instance to use) and limit (to set the buffer limit passed to the StreamReader). The return value is the same as loop.create_server(), i.e. a Server object which can be used to stop the service. Nrrrcstd}t|d}|SNrrrrr)rclient_connected_cbrrrrfactoryXs  zstart_server..factory)r r!r"r#r$ create_server)r1r&r'rrr(r2rr0rr:s rcsv|durt}ntjdtddt||d}t||d|jfdd|fi|IdH\}}t|||}||fS) z@Similar to `open_connection` but works with UNIX Domain Sockets.NrrrrrcsSrrrrrrrpr z&open_unix_connection..) r r!r"r#r$rrZcreate_unix_connectionr)pathrrr(r)r*r+r,rrrrds    rcsLdurtntjdtddfdd}j||fi|IdHS)z=Similar to `start_server` but works with UNIX Domain Sockets.Nrrrcstd}t|d}|Sr-r.r/r0rrr2~s  z"start_unix_server..factory)r r!r"r#r$Zcreate_unix_server)r1r4rrr(r2rr0rr ts r c@sBeZdZdZdddZddZddZd d Zd d Zd dZ dS)FlowControlMixina)Reusable flow control logic for StreamWriter.drain(). This implements the protocol methods pause_writing(), resume_writing() and connection_lost(). If the subclass overrides these it must call the super methods. StreamWriter.drain() must wait for _drain_helper() coroutine. NcCs0|durt|_n||_d|_d|_d|_dSNF)r r!_loop_paused _drain_waiter_connection_lost)selfrrrr__init__s  zFlowControlMixin.__init__cCs*|jr Jd|_|jr&td|dS)NTz%r pauses writing)r8r7 get_debugrdebugr;rrr pause_writings  zFlowControlMixin.pause_writingcCsP|js Jd|_|jr&td||j}|durLd|_|sL|ddS)NFz%r resumes writing)r8r7r=rr>r9done set_resultr;waiterrrrresume_writings   zFlowControlMixin.resume_writingcCsVd|_|jsdS|j}|dur"dSd|_|r4dS|durH|dn ||dSNT)r:r8r9rArB set_exceptionr;excrDrrrconnection_losts z FlowControlMixin.connection_lostcsP|jrtd|jsdS|j}|dus2|s2J|j}||_|IdHdS)NzConnection lost)r:ConnectionResetErrorr8r9 cancelledr7 create_futurerCrrr _drain_helpers zFlowControlMixin._drain_helpercCstdSr)NotImplementedErrorr;streamrrr_get_close_waitersz"FlowControlMixin._get_close_waiter)N) __name__ __module__ __qualname____doc__r<r@rErJrNrRrrrrr5s   r5csfeZdZdZdZdfdd ZeddZddZfd d Z d d Z d dZ ddZ ddZ ZS)ra=Helper class to adapt between Protocol and StreamReader. (This is a helper class instead of making StreamReader itself a Protocol subclass, because the StreamReader has other potential uses, and to prevent the user of the StreamReader to accidentally call inappropriate methods of the protocol.) Ncsntj|d|dur,t||_|j|_nd|_|dur@||_d|_d|_d|_ ||_ d|_ |j |_dS)NrF)superr<weakrefref_stream_reader_wr_source_traceback_strong_reader_reject_connection_stream_writer _transport_client_connected_cb _over_sslr7rM_closed)r;Z stream_readerr1r __class__rrr<s  zStreamReaderProtocol.__init__cCs|jdurdS|Sr)rZr?rrr_stream_readers z#StreamReaderProtocol._stream_readercCs|jr6ddi}|jr|j|d<|j||dS||_|j}|durT|||ddu|_ |j durt ||||j|_ | ||j }t |r|j|d|_dS)NmessagezpAn open stream was garbage collected prior to establishing network connection; call "stream.close()" explicitly.Zsource_tracebackZ sslcontext)r]r[r7Zcall_exception_handlerabortr_re set_transportget_extra_inforar`rr^r Z iscoroutineZ create_taskr\)r;r*contextr)resrrrconnection_mades0      z$StreamReaderProtocol.connection_madecsx|j}|dur*|dur |n |||jsV|durJ|jdn |j|t|d|_d|_ d|_ dSr) refeed_eofrGrbrArBrWrJrZr^r_)r;rIr)rcrrrJ s     z$StreamReaderProtocol.connection_lostcCs|j}|dur||dSr)re feed_data)r;datar)rrr data_receivedsz"StreamReaderProtocol.data_receivedcCs$|j}|dur||jr dSdS)NFT)rermra)r;r)rrr eof_received s z!StreamReaderProtocol.eof_receivedcCs|jSr)rbrPrrrrR+sz&StreamReaderProtocol._get_close_waitercCs"|j}|r|s|dSr)rbrArL exception)r;closedrrr__del__.szStreamReaderProtocol.__del__)NN)rSrTrUrVr[r<propertyrerlrJrprqrRrt __classcell__rrrcrrs   rc@sveZdZdZddZddZeddZdd Zd d Z d d Z ddZ ddZ ddZ ddZdddZddZdS)ra'Wraps a Transport. This exposes write(), writelines(), [can_]write_eof(), get_extra_info() and close(). It adds drain() which returns an optional Future on which you can wait for flow control. It also adds a transport property which references the Transport directly. cCsJ||_||_|dus"t|ts"J||_||_|j|_|jddSr) r_ _protocol isinstancer_readerr7rMZ _complete_futrB)r;r*rr)rrrrr<@s zStreamWriter.__init__cCs@|jjd|jg}|jdur0|d|jdd|S)N transport=zreader=<{}> )rdrSr_ryappendformatjoinr;inforrr__repr__Js zStreamWriter.__repr__cCs|jSrr_r?rrrr*PszStreamWriter.transportcCs|j|dSr)r_writer;rorrrrTszStreamWriter.writecCs|j|dSr)r_ writelinesrrrrrWszStreamWriter.writelinescCs |jSr)r_ write_eofr?rrrrZszStreamWriter.write_eofcCs |jSr)r_ can_write_eofr?rrrr]szStreamWriter.can_write_eofcCs |jSr)r_closer?rrrr`szStreamWriter.closecCs |jSr)r_ is_closingr?rrrrcszStreamWriter.is_closingcs|j|IdHdSr)rwrRr?rrr wait_closedfszStreamWriter.wait_closedNcCs|j||Sr)r_ri)r;namedefaultrrrriiszStreamWriter.get_extra_infocsL|jdur |j}|dur ||jr8tdIdH|jIdHdS)zyFlush the write buffer. The intended use is to write w.write(data) await w.drain() Nr)ryrrr_rrrwrN)r;rIrrrdrainls   zStreamWriter.drain)N)rSrTrUrVr<rrur*rrrrrrrrirrrrrr6s    rc@seZdZdZedfddZddZddZdd Zd d Z d d Z ddZ ddZ ddZ ddZddZddZd&ddZd'ddZd d!Zd"d#Zd$d%ZdS)(rNcCsv|dkrtd||_|dur*t|_n||_t|_d|_d|_d|_ d|_ d|_ |j rrt td|_dS)NrzLimit cannot be <= 0Fr ) ValueError_limitr r!r7 bytearray_buffer_eof_waiter _exceptionr_r8r=r extract_stacksys _getframer[)r;rrrrrr<s   zStreamReader.__init__cCsdg}|jr"|t|jd|jr2|d|jtkrN|d|j|jrf|d|j|jr~|d|j|jr|d|j|j r|dd d |S) Nrz byteseofzlimit=zwaiter=z exception=rzZpausedr{r|) rr}lenrr_DEFAULT_LIMITrrr_r8r~rrrrrrs    zStreamReader.__repr__cCs|jSr)rr?rrrrrszStreamReader.exceptioncCs0||_|j}|dur,d|_|s,||dSr)rrrLrGrHrrrrGs zStreamReader.set_exceptioncCs*|j}|dur&d|_|s&|ddS)z1Wakeup read*() functions waiting for data or EOF.N)rrLrBrCrrr_wakeup_waiters zStreamReader._wakeup_waitercCs|jdusJd||_dS)NzTransport already setr)r;r*rrrrhszStreamReader.set_transportcCs*|jr&t|j|jkr&d|_|jdSr6)r8rrrr_resume_readingr?rrr_maybe_resume_transportsz$StreamReader._maybe_resume_transportcCsd|_|dSrF)rrr?rrrrmszStreamReader.feed_eofcCs|jo |j S)z=Return True if the buffer is empty and 'feed_eof' was called.)rrr?rrrat_eofszStreamReader.at_eofcCs|jrJd|sdS|j|||jdur||js|t|jd|jkr|z|jWnt ytd|_Yn0d|_dS)Nzfeed_data after feed_eofrT) rrextendrr_r8rrZ pause_readingrOrrrrrns    zStreamReader.feed_datacsl|jdurt|d|jr&Jd|jrs>         ! '   DkP