/opt/alt/python38/lib64/python3.8/asyncio/__pycache__
NameSizeModeActions
base_events.cpython-38.opt-1.pyc508090644editdlrm
base_events.cpython-38.opt-2.pyc418280644editdlrm
base_events.cpython-38.pyc510350644editdlrm
base_futures.cpython-38.opt-1.pyc19130644editdlrm
base_futures.cpython-38.opt-2.pyc16590644editdlrm
base_futures.cpython-38.pyc19130644editdlrm
base_subprocess.cpython-38.opt-1.pyc93350644editdlrm
base_subprocess.cpython-38.opt-2.pyc92350644editdlrm
base_subprocess.cpython-38.pyc94310644editdlrm
base_tasks.cpython-38.opt-1.pyc19590644editdlrm
base_tasks.cpython-38.opt-2.pyc19590644editdlrm
base_tasks.cpython-38.pyc19590644editdlrm
constants.cpython-38.opt-1.pyc5960644editdlrm
constants.cpython-38.opt-2.pyc5960644editdlrm
constants.cpython-38.pyc5960644editdlrm
coroutines.cpython-38.opt-1.pyc65840644editdlrm
coroutines.cpython-38.opt-2.pyc63520644editdlrm
coroutines.cpython-38.pyc66690644editdlrm
events.cpython-38.opt-1.pyc279640644editdlrm
events.cpython-38.opt-2.pyc189120644editdlrm
events.cpython-38.pyc280720644editdlrm
exceptions.cpython-38.opt-1.pyc25640644editdlrm
exceptions.cpython-38.opt-2.pyc19200644editdlrm
exceptions.cpython-38.pyc25640644editdlrm
format_helpers.cpython-38.opt-1.pyc23470644editdlrm
format_helpers.cpython-38.opt-2.pyc21030644editdlrm
format_helpers.cpython-38.pyc23470644editdlrm
futures.cpython-38.opt-1.pyc110310644editdlrm
futures.cpython-38.opt-2.pyc77250644editdlrm
futures.cpython-38.pyc112080644editdlrm
locks.cpython-38.opt-1.pyc163830644editdlrm
locks.cpython-38.opt-2.pyc97810644editdlrm
locks.cpython-38.pyc163830644editdlrm
log.cpython-38.opt-1.pyc2410644editdlrm
log.cpython-38.opt-2.pyc2020644editdlrm
log.cpython-38.pyc2410644editdlrm
proactor_events.cpython-38.opt-1.pyc238820644editdlrm
proactor_events.cpython-38.opt-2.pyc234820644editdlrm
proactor_events.cpython-38.pyc241600644editdlrm
protocols.cpython-38.opt-1.pyc86290644editdlrm
protocols.cpython-38.opt-2.pyc33700644editdlrm
protocols.cpython-38.pyc86290644editdlrm
queues.cpython-38.opt-1.pyc83960644editdlrm
queues.cpython-38.opt-2.pyc57170644editdlrm
queues.cpython-38.pyc83960644editdlrm
runners.cpython-38.opt-1.pyc19620644editdlrm
runners.cpython-38.opt-2.pyc12800644editdlrm
runners.cpython-38.pyc19620644editdlrm
selector_events.cpython-38.opt-1.pyc296400644editdlrm
selector_events.cpython-38.opt-2.pyc280060644editdlrm
selector_events.cpython-38.pyc297000644editdlrm
sslproto.cpython-38.opt-1.pyc214330644editdlrm
sslproto.cpython-38.opt-2.pyc146300644editdlrm
sslproto.cpython-38.pyc216330644editdlrm
staggered.cpython-38.opt-1.pyc39600644editdlrm
staggered.cpython-38.opt-2.pyc18270644editdlrm
staggered.cpython-38.pyc41330644editdlrm
streams.cpython-38.opt-1.pyc203800644editdlrm
streams.cpython-38.opt-2.pyc144860644editdlrm
streams.cpython-38.pyc206550644editdlrm
subprocess.cpython-38.opt-1.pyc73430644editdlrm
subprocess.cpython-38.opt-2.pyc72150644editdlrm
subprocess.cpython-38.pyc73730644editdlrm
tasks.cpython-38.opt-1.pyc242400644editdlrm
tasks.cpython-38.opt-2.pyc166540644editdlrm
tasks.cpython-38.pyc242960644editdlrm
transports.cpython-38.opt-1.pyc122470644editdlrm
transports.cpython-38.opt-2.pyc68460644editdlrm
transports.cpython-38.pyc122770644editdlrm
trsock.cpython-38.opt-1.pyc84980644editdlrm
trsock.cpython-38.opt-2.pyc82420644editdlrm
trsock.cpython-38.pyc84980644editdlrm
unix_events.cpython-38.opt-1.pyc389700644editdlrm
unix_events.cpython-38.opt-2.pyc343290644editdlrm
unix_events.cpython-38.pyc393510644editdlrm
windows_events.cpython-38.opt-1.pyc245660644editdlrm
windows_events.cpython-38.opt-2.pyc234590644editdlrm
windows_events.cpython-38.pyc245980644editdlrm
windows_utils.cpython-38.opt-1.pyc44020644editdlrm
windows_utils.cpython-38.opt-2.pyc39680644editdlrm
windows_utils.cpython-38.pyc44860644editdlrm
__init__.cpython-38.opt-1.pyc7650644editdlrm
__init__.cpython-38.opt-2.pyc7090644editdlrm
__init__.cpython-38.pyc7650644editdlrm
__main__.cpython-38.opt-1.pyc31510644editdlrm
__main__.cpython-38.opt-2.pyc31510644editdlrm
__main__.cpython-38.pyc31510644editdlrm
Edit: /opt/alt/python38/lib64/python3.8/asyncio/__pycache__/streams.cpython-38.opt-1.pyc (20380B)
U ,a 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_serverNZAF_UNIX)open_unix_connectionstart_unix_server) coroutines)events) exceptions)format_helpers) protocols)logger)sleepi)looplimitc st|dkrt}ntjdtddt||d}t||d|jfdd||f|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. stacklevelrrrcsSNrprotocolr4/opt/alt/python38/lib64/python3.8/asyncio/streams.py5z!open_connection..) r get_event_loopwarningswarnDeprecationWarningrrZcreate_connectionr) hostportrrkwdsreader transport_writerrrrrs"    rcsJdkrtntjdtddfdd}j|||f|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#Z create_server)r/r$r%rrr&r0rr.rr:s rcsr|dkrt}ntjdtddt||d}t||d|jfdd|f|IdH\}}t|||}||fS) z@Similar to `open_connection` but works with UNIX Domain Sockets.NrrrrrcsSrrrrrrrprz&open_unix_connection..) r r r!r"r#rrZcreate_unix_connectionr)pathrrr&r'r(r)r*rrrrds     rcsHdkrtntjdtddfdd}j||f|IdHS)z=Similar to `start_server` but works with UNIX Domain Sockets.Nrrrcstd}t|d}|Sr+r,r-r.rrr0~s  z"start_unix_server..factory)r r r!r"r#Zcreate_unix_server)r/r1rrr&r0rr.rrts rc@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|dkrt|_n||_d|_d|_d|_dSNF)r r _loop_paused _drain_waiter_connection_lost)selfrrrr__init__s  zFlowControlMixin.__init__cCs d|_|jrtd|dS)NTz%r pauses writing)r5r4 get_debugrdebugr8rrr pause_writings zFlowControlMixin.pause_writingcCsFd|_|jrtd||j}|dk rBd|_|sB|ddS)NFz%r resumes writing)r5r4r:rr;r6done set_resultr8waiterrrrresume_writings  zFlowControlMixin.resume_writingcCsVd|_|jsdS|j}|dkr"dSd|_|r4dS|dkrH|dn ||dSNT)r7r5r6r>r? set_exceptionr8excrArrrconnection_losts z FlowControlMixin.connection_lostcs<|jrtd|jsdS|j}|j}||_|IdHdS)NzConnection lost)r7ConnectionResetErrorr5r6r4 create_futurer@rrr _drain_helpers zFlowControlMixin._drain_helpercCstdSr)NotImplementedErrorr8streamrrr_get_close_waitersz"FlowControlMixin._get_close_waiter)N) __name__ __module__ __qualname____doc__r9r=rBrGrJrNrrrrr2s   r2csfeZdZdZdZdfdd 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|dk r,t||_|j|_nd|_|dk r@||_d|_d|_d|_ ||_ d|_ |j |_dS)NrF)superr9weakrefref_stream_reader_wr_source_traceback_strong_reader_reject_connection_stream_writer _transport_client_connected_cb _over_sslr4rI_closed)r8Z stream_readerr/r __class__rrr9s  zStreamReaderProtocol.__init__cCs|jdkrdS|Sr)rVr<rrr_stream_readers z#StreamReaderProtocol._stream_readercCs|jr6ddi}|jr|j|d<|j||dS||_|j}|dk rT|||ddk |_ |j dk rt ||||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)rYrWr4Zcall_exception_handlerabortr[ra set_transportget_extra_infor]r\rrZr Z iscoroutineZ create_taskrX)r8r(contextr'resrrrconnection_mades2      z$StreamReaderProtocol.connection_madecsx|j}|dk r*|dkr |n |||jsV|dkrJ|jdn |j|t|d|_d|_ d|_ dSr) rafeed_eofrDr^r>r?rSrGrVrZr[)r8rFr'r_rrrG s     z$StreamReaderProtocol.connection_lostcCs|j}|dk r||dSr)ra feed_data)r8datar'rrr data_receivedsz"StreamReaderProtocol.data_receivedcCs$|j}|dk r||jr dSdS)NFT)rarir])r8r'rrr eof_received s z!StreamReaderProtocol.eof_receivedcCs|jSr)r^rLrrrrN+sz&StreamReaderProtocol._get_close_waitercCs"|j}|r|s|dSr)r^r> cancelled exception)r8closedrrr__del__.szStreamReaderProtocol.__del__)NN)rOrPrQrRrWr9propertyrarhrGrlrmrNrq __classcell__rrr_rrs   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. cCs4||_||_||_||_|j|_|jddSr)r[ _protocol_readerr4rIZ _complete_futr?)r8r(rr'rrrrr9@s  zStreamWriter.__init__cCs@|jjd|jg}|jdk r0|d|jdd|S)N transport=zreader=<{}> )r`rOr[ruappendformatjoinr8inforrr__repr__Js zStreamWriter.__repr__cCs|jSrr[r<rrrr(PszStreamWriter.transportcCs|j|dSr)r[writer8rkrrrrTszStreamWriter.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)rtrNr<rrr wait_closedfszStreamWriter.wait_closedNcCs|j||Sr)r[re)r8namedefaultrrrreiszStreamWriter.get_extra_infocsL|jdk r |j}|dk r ||jr8tdIdH|jIdHdS)zyFlush the write buffer. The intended use is to write w.write(data) await w.drain() Nr)ruror[rrrtrJ)r8rFrrrdrainls   zStreamWriter.drain)N)rOrPrQrRr9r~rrr(rrrrrrrrerrrrrr6s    rc@seZdZdZedfddZddZddZdd Zd d Z d d Z ddZ ddZ ddZ ddZddZddZd&ddZd'ddZd d!Zd"d#Zd$d%ZdS)(rNcCsv|dkrtd||_|dkr*t|_n||_t|_d|_d|_d|_ d|_ d|_ |j rrt td|_dS)NrzLimit cannot be <= 0Fr ) ValueError_limitr r r4 bytearray_buffer_eof_waiter _exceptionr[r5r:r extract_stacksys _getframerW)r8rrrrrr9s   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=rvZpausedrwrx) rrylenrr_DEFAULT_LIMITrrr[r5rzr{r|rrrr~s    zStreamReader.__repr__cCs|jSr)rr<rrrroszStreamReader.exceptioncCs0||_|j}|dk r,d|_|s,||dSr)rrrnrDrErrrrDs zStreamReader.set_exceptioncCs*|j}|dk r&d|_|s&|ddS)z1Wakeup read*() functions waiting for data or EOF.N)rrnr?r@rrr_wakeup_waiters zStreamReader._wakeup_waitercCs ||_dSrr)r8r(rrrrdszStreamReader.set_transportcCs*|jr&t|j|jkr&d|_|jdSr3)r5rrrr[resume_readingr<rrr_maybe_resume_transportsz$StreamReader._maybe_resume_transportcCsd|_|dSrC)rrr<rrrriszStreamReader.feed_eofcCs|jo |j S)z=Return True if the buffer is empty and 'feed_eof' was called.)rrr<rrrat_eofszStreamReader.at_eofcCst|sdS|j|||jdk rp|jspt|jd|jkrpz|jWntk rhd|_YnXd|_dS)NrT) rextendrr[r5rrZ pause_readingrKrrrrrjs   zStreamReader.feed_datacsX|jdk rt|d|jr.d|_|j|j|_z|jIdHW5d|_XdS)zpWait until feed_data() or feed_eof() is called. If stream was paused, automatically resume it. NzF() called while another coroutine is already waiting for incoming dataF)r RuntimeErrorr5r[rr4rI)r8Z func_namerrr_wait_for_datas   zStreamReader._wait_for_datac sd}t|}z||IdH}Wntjk rN}z|jWYSd}~XYnhtjk r}zH|j||jr|jd|j|=n |j | t |j dW5d}~XYnX|S)aRead chunk of data from the stream until newline (b' ') is found. On success, return chunk that ends with newline. If only partial line can be read due to EOF, return incomplete line without terminating newline. When EOF was reached while no bytes read, empty bytes object is returned. If limit is reached, ValueError will be raised. In that case, if newline was found, complete line including newline will be removed from internal buffer. Else, internal buffer will be cleared. Limit is compared against part of the line without newline. If stream was paused, this function will automatically resume it if needed.  Nr) r readuntilr IncompleteReadErrorpartialLimitOverrunErrorr startswithconsumedclearrrargs)r8sepseplenlineerrrreadline s  zStreamReader.readlinercst|}|dkrtd|jdk r(|jd}t|j}|||kr||j||}|dkrZq|d|}||jkr|td||jrt |j}|j t |d| dIdHq,||jkrtd||jd||}|jd||=| t |S) aVRead data from the stream until ``separator`` is found. On success, the data and separator will be removed from the internal buffer (consumed). Returned data will include the separator at the end. Configured stream limit is used to check result. Limit sets the maximal length of data that can be returned, not counting the separator. If an EOF occurs and the complete separator is still not found, an IncompleteReadError exception will be raised, and the internal buffer will be reset. The IncompleteReadError.partial attribute may contain the separator partially. If the data cannot be read because of over limit, a LimitOverrunError exception will be raised, and the data will be left in the internal buffer, so it can be read again. rz,Separator should be at least one-byte stringNr z2Separator is not found, and chunk exceed the limitrz2Separator is found, but chunk is longer than limit)rrrrfindrr rrbytesrrrr)r8Z separatorroffsetZbuflenZisepchunkrrrr(s>         zStreamReader.readuntilrcs|jdk r|j|dkrdS|dkrVg}||jIdH}|s@qL||q(d|S|jsr|jsr|dIdHt|jd|}|jd|=| |S)aRead up to `n` bytes from the stream. If n is not provided, or set to -1, read until EOF and return all read bytes. If the EOF was received and the internal buffer is empty, return an empty bytes object. If n is zero, return empty bytes object immediately. If n is positive, this function try to read `n` bytes, and may return less or equal bytes than requested, but at least one byte. If EOF was received before any byte is read, this function returns empty byte object. Returned value is not limited with limit, configured at stream creation. If stream was paused, this function will automatically resume it if needed. Nrrread) rrrryr{rrrrr)r8nZblocksblockrkrrrrs"     zStreamReader.readcs|dkrtd|jdk r |j|dkr,dSt|j|krr|jr`t|j}|jt||| dIdHq,t|j|krt|j}|jnt|jd|}|jd|=| |S)aRead exactly `n` bytes. Raise an IncompleteReadError if EOF is reached before `n` bytes can be read. The IncompleteReadError.partial attribute of the exception will contain the partial read bytes. if n is zero, return empty bytes object. Returned value is not limited with limit, configured at stream creation. If stream was paused, this function will automatically resume it if needed. rz*readexactly size can not be less than zeroNr readexactly) rrrrrrrr rrr)r8rZ incompleterkrrrrs&       zStreamReader.readexactlycCs|Srrr<rrr __aiter__szStreamReader.__aiter__cs|IdH}|dkrt|S)Nr)rStopAsyncIteration)r8valrrr __anext__szStreamReader.__anext__)r)r)rOrPrQrWrr9r~rorDrrdrrirrjrrrrrrrrrrrrs$  [ 2)r)NN)NN)N)N)__all__Zsocketrr!rThasattrr r r r rlogrZtasksrrrrrrZProtocolr2rrrrrrrsF         ! '   DkP