/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__/futures.cpython-39.opt-1.pyc (11627B)
a ´iÚ6ã@sdZdZddlZddlZddlZddlZddlmZddl m Z ddl m Z ddl m Z dd l m Z e jZe jZe jZe jZejdZGd d „d ƒZeZd d „Zdd„Zdd„Zdd„Zdd„Zdd„Zddœdd„Zz ddlZWneyôYn 0ejZZdS)z.A Future class similar to the one in PEP 3148.)ÚFutureÚ wrap_futureÚisfutureéN)Ú GenericAliasé)Ú base_futures)Úevents)Ú exceptions)Úformat_helpersc@sîeZdZdZeZdZdZdZdZ dZ dZ dZ dZ ddœdd„ZejZdd„Zd d „ZeeƒZed d „ƒZejd d „ƒZdd„Zdd„Zd)dd„Zdd„Zdd„Zdd„Zdd„Z dd„Z!ddœdd „Z"d!d"„Z#d#d$„Z$d%d&„Z%d'd(„Z&e&Z'dS)*ra,This class is *almost* compatible with concurrent.futures.Future. Differences: - This class is not thread-safe. - result() and exception() do not take a timeout argument and raise an exception when the future isn't done yet. - Callbacks registered with add_done_callback() are always called via the event loop's call_soon(). - This class is not compatible with the wait() and as_completed() methods in the concurrent.futures package. (In Python 3.4 or later we may be able to unify the implementations.) NF©ÚloopcCs@|durt ¡|_n||_g|_|j ¡rú )ÚformatÚ __class__Ú__name__ÚjoinÚ _repr_info©rrrrÚ__repr__Zs  ÿzFuture.__repr__cCsF|js dS|j}|jj›d�||dœ}|jr6|j|d<|j |¡dS)Nz exception was never retrieved)ÚmessageÚ exceptionÚfutureZsource_traceback)Ú_Future__log_tracebackÚ _exceptionrrrrZcall_exception_handler)rÚexcÚcontextrrrÚ__del__^s ü zFuture.__del__cCs|jS©N)r$rrrrÚ_log_tracebackpszFuture._log_tracebackcCst|ƒrtdƒ‚d|_dS)Nz'_log_traceback can only be set to FalseF)ÚboolÚ ValueErrorr$)rÚvalrrrr*tscCs|j}|durtdƒ‚|S)z-Return the event loop the Future is bound to.Nz!Future object is not initialized.)rÚ RuntimeErrorrrrrÚget_loopzszFuture.get_loopcCs2|jdurt ¡}n t |j¡}|j|_d|_|S)zÈCreate the CancelledError to raise if the Future is cancelled. This should only be called once when handling a cancellation since it erases the saved context exception value. N)Ú_cancel_messager ÚCancelledErrorÚ_cancelled_excÚ __context__©rr&rrrÚ_make_cancelled_error�s    zFuture._make_cancelled_errorcCs,d|_|jtkrdSt|_||_| ¡dS)záCancel the future and schedule callbacks. If the future is already done or cancelled, return False. Otherwise, change the future's state to cancelled, schedule the callbacks and return True. FT)r$Ú_stateÚ_PENDINGÚ _CANCELLEDr0Ú_Future__schedule_callbacks)rÚmsgrrrÚcancel�s z Future.cancelcCsH|jdd…}|sdSg|jdd…<|D]\}}|jj|||d�q(dS)zªInternal: Ask the event loop to call all callbacks. The callbacks are scheduled to be called as soon as possible. Also clears the callback list. N©r')rrÚ call_soon)rZ callbacksÚcallbackÚctxrrrZ__schedule_callbacksŸs  zFuture.__schedule_callbackscCs |jtkS)z(Return True if the future was cancelled.)r6r8rrrrÚ cancelled­szFuture.cancelledcCs |jtkS)z™Return True if the future is done. Done means either that a result / exception are available, or that the future was cancelled. )r6r7rrrrÚdone³sz Future.donecCsF|jtkr| ¡}|‚|jtkr*t d¡‚d|_|jdur@|j‚|jS)aReturn the result this future represents. If the future has been cancelled, raises CancelledError. If the future's result isn't yet available, raises InvalidStateError. If the future is done and has an exception set, this exception is raised. zResult is not ready.FN) r6r8r5Ú _FINISHEDr ÚInvalidStateErrorr$r%Ú_resultr4rrrÚresult»s    z Future.resultcCs6|jtkr| ¡}|‚|jtkr*t d¡‚d|_|jS)a&Return the exception that was set on this future. The exception (or None if no exception was set) is returned only if the future is done. If the future has been cancelled, raises CancelledError. If the future isn't done yet, raises InvalidStateError. zException is not set.F)r6r8r5rBr rCr$r%r4rrrr"Ìs   zFuture.exceptionr<cCsB|jtkr|jj|||d�n |dur.t ¡}|j ||f¡dS)zøAdd a callback to be run when the future becomes done. The callback is called with a single argument - the future object. If the future is already done when this is called, the callback is scheduled with call_soon. r<N)r6r7rr=Ú contextvarsZ copy_contextrÚappend)rÚfnr'rrrÚadd_done_callbackÜs  zFuture.add_done_callbackcs<‡fdd„|jDƒ}t|jƒt|ƒ}|r8||jdd…<|S)z}Remove all instances of a callback from the "call when done" list. Returns the number of callbacks removed. cs g|]\}}|ˆkr||f‘qSrr)Ú.0Úfr?©rHrrÚ ñsþz/Future.remove_done_callback..N)rÚlen)rrHZfiltered_callbacksZ removed_countrrLrÚremove_done_callbackìs ÿzFuture.remove_done_callbackcCs8|jtkr t |j›d|›�¡‚||_t|_| ¡dS)z–Mark the future done and set its result. If the future is already done when this method is called, raises InvalidStateError. ú: N)r6r7r rCrDrBr9)rrErrrÚ set_resultûs  zFuture.set_resultcCsb|jtkr t |j›d|›�¡‚t|tƒr0|ƒ}t|ƒturDtdƒ‚||_t |_|  ¡d|_ dS)z˜Mark the future done and set an exception. If the future is already done when this method is called, raises InvalidStateError. rPzPStopIteration interacts badly with generators and cannot be raised into a FutureTN) r6r7r rCÚ isinstanceÚtypeÚ StopIterationÚ TypeErrorr%rBr9r$)rr"rrrÚ set_exceptions   zFuture.set_exceptionccs,| ¡sd|_|V| ¡s$tdƒ‚| ¡S)NTzawait wasn't used with future)rAÚ_asyncio_future_blockingr.rErrrrÚ __await__s zFuture.__await__)N)(rÚ __module__Ú __qualname__Ú__doc__r7r6rDr%rrr0r2rWr$rrZ_future_repr_inforr r(Ú classmethodrÚ__class_getitem__Úpropertyr*Úsetterr/r5r;r9r@rArEr"rIrOrQrVrXÚ__iter__rrrrrsB     rcCs*z |j}WntyYn0|ƒS|jSr))r/ÚAttributeErrorr)Úfutr/rrrÚ _get_loop(s   rccCs| ¡r dS| |¡dS)z?Helper setting the result only if the future was not cancelled.N)r@rQ)rbrErrrÚ_set_result_unless_cancelled4srdcCsXt|ƒ}|tjjur tj|jŽS|tjjur8tj|jŽS|tjjurPtj|jŽS|SdSr))rSÚ concurrentÚfuturesr1r ÚargsÚ TimeoutErrorrC)r&Z exc_classrrrÚ_convert_future_exc;s      ricCsR| ¡r| ¡| ¡sdS| ¡}|dur<| t|ƒ¡n| ¡}| |¡dS)z8Copy state from a future to a concurrent.futures.Future.N)r@r;Úset_running_or_notify_cancelr"rVrirErQ)reÚsourcer"rErrrÚ_set_concurrent_future_stateGsrlcCsT| ¡r dS| ¡r| ¡n2| ¡}|dur>| t|ƒ¡n| ¡}| |¡dS)zqInternal helper to copy state from another Future. The other Future may be a concurrent.futures.Future. N)r@r;r"rVrirErQ)rkÚdestr"rErrrÚ_copy_future_stateVs rncs¦tˆƒstˆtjjƒstdƒ‚tˆƒs._set_statecs2| ¡r.ˆdusˆˆur"ˆ ¡n ˆ ˆj¡dSr))r@r;Úcall_soon_threadsafe)Ú destination)Ú dest_looprkÚ source_looprrÚ_call_check_cancel€s z)_chain_future.._call_check_cancelcsJˆ ¡rˆdurˆ ¡rdSˆdus,ˆˆur8ˆˆ|ƒnˆ ˆˆ|¡dSr))r@Z is_closedrq)rk)rprsrrrtrrÚ_call_set_state‡sÿÿ z&_chain_future.._call_set_state)rrRrerfrrUrcrI)rkrrrurvr)rprsrrrkrtrÚ _chain_futurejs ÿ ÿ rwr cCs2t|ƒr |S|durt ¡}| ¡}t||ƒ|S)z&Wrap concurrent.futures.Future object.N)rrr Z create_futurerw)r#r Z new_futurerrrr”s r) r[Ú__all__Úconcurrent.futuresrerFÚloggingrÚtypesrÚrrr r rr7r8rBÚDEBUGZ STACK_DEBUGrZ _PyFuturercrdrirlrnrwrZ_asyncioÚ ImportErrorZ_CFuturerrrrÚs>         *