/opt/imh-python/lib/python3.9/asyncio/__pycache__
NameSizeModeActions
base_events.cpython-39.opt-1.pyc518380644editdlrm
base_events.cpython-39.opt-2.pyc428090644editdlrm
base_events.cpython-39.pyc520330644editdlrm
base_futures.cpython-39.opt-1.pyc19190644editdlrm
base_futures.cpython-39.opt-2.pyc16650644editdlrm
base_futures.cpython-39.pyc19190644editdlrm
base_subprocess.cpython-39.opt-1.pyc93510644editdlrm
base_subprocess.cpython-39.opt-2.pyc92510644editdlrm
base_subprocess.cpython-39.pyc94210644editdlrm
base_tasks.cpython-39.opt-1.pyc19550644editdlrm
base_tasks.cpython-39.opt-2.pyc19550644editdlrm
base_tasks.cpython-39.pyc19550644editdlrm
constants.cpython-39.opt-1.pyc5920644editdlrm
constants.cpython-39.opt-2.pyc5920644editdlrm
constants.cpython-39.pyc5920644editdlrm
coroutines.cpython-39.opt-1.pyc65840644editdlrm
coroutines.cpython-39.opt-2.pyc63520644editdlrm
coroutines.cpython-39.pyc66480644editdlrm
events.cpython-39.opt-1.pyc280300644editdlrm
events.cpython-39.opt-2.pyc189330644editdlrm
events.cpython-39.pyc281120644editdlrm
exceptions.cpython-39.opt-1.pyc25640644editdlrm
exceptions.cpython-39.opt-2.pyc19200644editdlrm
exceptions.cpython-39.pyc25640644editdlrm
format_helpers.cpython-39.opt-1.pyc23350644editdlrm
format_helpers.cpython-39.opt-2.pyc20910644editdlrm
format_helpers.cpython-39.pyc23350644editdlrm
futures.cpython-39.opt-1.pyc116890644editdlrm
futures.cpython-39.opt-2.pyc81830644editdlrm
futures.cpython-39.pyc118400644editdlrm
locks.cpython-39.opt-1.pyc144400644editdlrm
locks.cpython-39.opt-2.pyc82020644editdlrm
locks.cpython-39.pyc144400644editdlrm
log.cpython-39.opt-1.pyc2370644editdlrm
log.cpython-39.opt-2.pyc1980644editdlrm
log.cpython-39.pyc2370644editdlrm
proactor_events.cpython-39.opt-1.pyc241300644editdlrm
proactor_events.cpython-39.opt-2.pyc237300644editdlrm
proactor_events.cpython-39.pyc243600644editdlrm
protocols.cpython-39.opt-1.pyc86250644editdlrm
protocols.cpython-39.opt-2.pyc33660644editdlrm
protocols.cpython-39.pyc86250644editdlrm
queues.cpython-39.opt-1.pyc85270644editdlrm
queues.cpython-39.opt-2.pyc58480644editdlrm
queues.cpython-39.pyc85270644editdlrm
runners.cpython-39.opt-1.pyc22170644editdlrm
runners.cpython-39.opt-2.pyc15350644editdlrm
runners.cpython-39.pyc22170644editdlrm
selector_events.cpython-39.opt-1.pyc297980644editdlrm
selector_events.cpython-39.opt-2.pyc281520644editdlrm
selector_events.cpython-39.pyc298420644editdlrm
sslproto.cpython-39.opt-1.pyc214030644editdlrm
sslproto.cpython-39.opt-2.pyc146000644editdlrm
sslproto.cpython-39.pyc215670644editdlrm
staggered.cpython-39.opt-1.pyc40180644editdlrm
staggered.cpython-39.opt-2.pyc18850644editdlrm
staggered.cpython-39.pyc41710644editdlrm
streams.cpython-39.opt-1.pyc203700644editdlrm
streams.cpython-39.opt-2.pyc144760644editdlrm
streams.cpython-39.pyc205970644editdlrm
subprocess.cpython-39.opt-1.pyc73310644editdlrm
subprocess.cpython-39.opt-2.pyc72030644editdlrm
subprocess.cpython-39.pyc73450644editdlrm
tasks.cpython-39.opt-1.pyc241600644editdlrm
tasks.cpython-39.opt-2.pyc169090644editdlrm
tasks.cpython-39.pyc242000644editdlrm
threads.cpython-39.opt-1.pyc9890644editdlrm
threads.cpython-39.opt-2.pyc5230644editdlrm
threads.cpython-39.pyc9890644editdlrm
transports.cpython-39.opt-1.pyc122430644editdlrm
transports.cpython-39.opt-2.pyc68420644editdlrm
transports.cpython-39.pyc122570644editdlrm
trsock.cpython-39.opt-1.pyc85800644editdlrm
trsock.cpython-39.opt-2.pyc83240644editdlrm
trsock.cpython-39.pyc85800644editdlrm
unix_events.cpython-39.opt-1.pyc417460644editdlrm
unix_events.cpython-39.opt-2.pyc365230644editdlrm
unix_events.cpython-39.pyc420660644editdlrm
windows_events.cpython-39.opt-1.pyc246300644editdlrm
windows_events.cpython-39.opt-2.pyc235230644editdlrm
windows_events.cpython-39.pyc246460644editdlrm
windows_utils.cpython-39.opt-1.pyc44460644editdlrm
windows_utils.cpython-39.opt-2.pyc40120644editdlrm
windows_utils.cpython-39.pyc45140644editdlrm
__init__.cpython-39.opt-1.pyc7900644editdlrm
__init__.cpython-39.opt-2.pyc7340644editdlrm
__init__.cpython-39.pyc7900644editdlrm
__main__.cpython-39.opt-1.pyc31790644editdlrm
__main__.cpython-39.opt-2.pyc31790644editdlrm
__main__.cpython-39.pyc31790644editdlrm
Edit: /opt/imh-python/lib/python3.9/asyncio/__pycache__/futures.cpython-39.pyc (11840B)
a bh6@sdZdZddlZddlZddlZddlZddlmZddlm Z ddlm Z ddlm Z ej Z ej Z ejZejZejdZGd d d ZeZd d Zd dZddZddZddZddZddddZz ddlZWneyYn 0ejZZdS)z.A Future class similar to the one in PEP 3148.)Future wrap_futureisfutureN) base_futures)events) exceptions)format_helpersc@seZdZdZeZdZdZdZdZ dZ dZ dZ dZ ddddZejZddZd d Zd d Zed dZejddZddZddZd+ddZddZddZddZddZddZdd d!d"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.) NFloopcCs@|durt|_n||_g|_|jr )format __class____name__join _repr_inforrrr__repr__Ys  zFuture.__repr__cCsF|js dS|j}|jjd||d}|jr6|j|d<|j|dS)Nz exception was never retrieved)message exceptionfutureZsource_traceback)_Future__log_traceback _exceptionrrrr Zcall_exception_handler)rexccontextrrr__del__]s  zFuture.__del__cCs|SNr)clstyperrr__class_getitem__mszFuture.__class_getitem__cCs|jSr()r#rrrr_log_tracebackpszFuture._log_tracebackcCst|rtdd|_dS)Nz'_log_traceback can only be set to FalseF)bool ValueErrorr#)rvalrrrr,tscCs|j}|durtd|S)z-Return the event loop the Future is bound to.Nz!Future object is not initialized.)r RuntimeErrorrrrrget_loopzszFuture.get_loopcCs2|jdurt}n t|j}|j|_d|_|S)zCreate 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_messagerCancelledError_cancelled_exc __context__rr%rrr_make_cancelled_errors    zFuture._make_cancelled_errorcCs,d|_|jtkrdSt|_||_|dS)zCancel 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 _CANCELLEDr2_Future__schedule_callbacks)rmsgrrrcancels z Future.cancelcCsH|jdd}|sdSg|jdd<|D]\}}|jj|||dq(dS)zInternal: Ask the event loop to call all callbacks. The callbacks are scheduled to be called as soon as possible. Also clears the callback list. Nr&)rr call_soon)rZ callbackscallbackctxrrrZ__schedule_callbackss  zFuture.__schedule_callbackscCs |jtkS)z(Return True if the future was cancelled.)r8r:rrrr cancelledszFuture.cancelledcCs |jtkS)zReturn True if the future is done. Done means either that a result / exception are available, or that the future was cancelled. )r8r9rrrrdonesz Future.donecCsF|jtkr|}||jtkr*tdd|_|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) r8r:r7 _FINISHEDrInvalidStateErrorr#r$_resultr6rrrresults    z Future.resultcCs6|jtkr|}||jtkr*tdd|_|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)r8r:r7rDrrEr#r$r6rrrr!s   zFuture.exceptionr>cCsB|jtkr|jj|||dn |dur.t}|j||fdS)zAdd 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)r8r9r r? contextvarsZ copy_contextrappend)rfnr&rrradd_done_callbacks  zFuture.add_done_callbackcs<fdd|jD}t|jt|}|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||fqSrr).0frArJrr sz/Future.remove_done_callback..N)rlen)rrJZfiltered_callbacksZ removed_countrrNrremove_done_callbacks zFuture.remove_done_callbackcCs8|jtkr t|jd|||_t|_|dS)zMark the future done and set its result. If the future is already done when this method is called, raises InvalidStateError. : N)r8r9rrErFrDr;)rrGrrr set_results  zFuture.set_resultcCsb|jtkr t|jd|t|tr0|}t|turDtd||_t |_| d|_ dS)zMark the future done and set an exception. If the future is already done when this method is called, raises InvalidStateError. rRzPStopIteration interacts badly with generators and cannot be raised into a FutureTN) r8r9rrE isinstancer* StopIteration TypeErrorr$rDr;r#)rr!rrr set_exceptions   zFuture.set_exceptionccs,|sd|_|V|s$td|S)NTzawait wasn't used with future)rC_asyncio_future_blockingr0rGrrrr __await__s zFuture.__await__)N)&r __module__ __qualname____doc__r9r8rFr$r rr2r4rXr#rrZ_future_repr_inforrr'r+propertyr,setterr1r7r=r;rBrCrGr!rKrQrSrWrY__iter__rrrrrsB     rcCs*z |j}WntyYn0|S|jSr()r1AttributeErrorr )futr1rrr _get_loop(s   rbcCs|r dS||dS)z?Helper setting the result only if the future was not cancelled.N)rBrS)rarGrrr_set_result_unless_cancelled4srccCsXt|}|tjjur tj|jS|tjjur8tj|jS|tjjurPtj|jS|SdSr()r* concurrentfuturesr3rargs TimeoutErrorrE)r%Z exc_classrrr_convert_future_exc;s      rhcCs^|s J|r||s(dS|}|durH|t|n|}||dS)z8Copy state from a future to a concurrent.futures.Future.N) rCrBr=set_running_or_notify_cancelr!rWrhrGrS)rdsourcer!rGrrr_set_concurrent_future_stateGs rkcCsl|s J|rdS|r$J|r6|n2|}|durV|t|n|}||dS)zqInternal helper to copy state from another Future. The other Future may be a concurrent.futures.Future. N)rCrBr=r!rWrhrGrS)rjdestr!rGrrr_copy_future_stateVs   rmcststtjjstdts._set_statecs2|r.dusur"n jdSr()rBr=call_soon_threadsafe) destination) dest_looprj source_looprr_call_check_cancels z)_chain_future.._call_check_cancelcsJrdurrdSdus,ur8|n|dSr()rBZ is_closedrp)rj)rorrrqrsrr_call_set_states z&_chain_future.._call_set_state)rrTrdrerrVrbrK)rjrqrtrur)rorrrqrjrsr _chain_futurejs   rvr cCsNt|r |St|tjjs(Jd||dur8t}|}t|||S)z&Wrap concurrent.futures.Future object.z+concurrent.futures.Future is expected, got N) rrTrdrerrr Z create_futurerv)r"r Z new_futurerrrrs r)r\__all__concurrent.futuresrdrHloggingrrrrr rr9r:rDDEBUGZ STACK_DEBUGrZ _PyFuturerbrcrhrkrmrvrZ_asyncio ImportErrorZ_CFuturerrrrs<        *