$87 GRAYBYTE WORDPRESS FILE MANAGER $12

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/python37/lib64/python3.7/asyncio/__pycache__/

HOME
Current File : /opt/alt/python37/lib64/python3.7/asyncio/__pycache__//futures.cpython-37.opt-1.pyc
B

� f2�@s�dZdZddlZddlZddlZddlZddlmZddlm	Z	ddlm
Z
ejZejZej
Z
ejZejZejZejZejdZGdd	�d	�ZeZd
d�Zdd
�Zdd�Zdd�Zdd�Zdd�dd�ZyddlZWnek
r�YnXejZZdS)z.A Future class similar to the one in PEP 3148.)�CancelledError�TimeoutError�InvalidStateError�Future�wrap_future�isfuture�N�)�base_futures)�events)�format_helpersc@s�eZdZdZeZdZdZdZdZ	dZ
dZdd�dd�Ze
jZdd�Zd	d
�Zedd��Zejd
d��Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�dd�Zdd �Zd!d"�Zd#d$�Zd%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@|dkrt��|_n||_g|_|j��r<t�t�d��|_	dS)z�Initialize the future.

        The optional event_loop argument allows explicitly setting the event
        loop object used by the future. If it's not provided, the future uses
        the default event loop.
        Nr)
r
�get_event_loop�_loop�
_callbacksZ	get_debugr�
extract_stack�sys�	_getframe�_source_traceback)�selfr�r�4/opt/alt/python37/lib64/python3.7/asyncio/futures.py�__init__Gs
zFuture.__init__cCsd�|jjd�|����S)Nz<{} {}>� )�format�	__class__�__name__�join�
_repr_info)rrrr�__repr__Ys
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_tracebackmszFuture._log_tracebackcCst|�rtd��d|_dS)Nz'_log_traceback can only be set to FalseF)�bool�
ValueErrorr")r�valrrrr'qscCs|j}|dkrtd��|S)z-Return the event loop the Future is bound to.Nz!Future object is not initialized.)r�RuntimeError)rrrrr�get_loopwszFuture.get_loopcCs&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�
_CANCELLED�_Future__schedule_callbacks)rrrr�cancel~s
z
Future.cancelcCsL|jdd�}|sdSg|jdd�<x"|D]\}}|jj|||d�q*WdS)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.)r-r/)rrrr�	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.
        )r-r.)rrrr�done�szFuture.donecCs<|jtkrt�|jtkr td��d|_|jdk	r6|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)r-r/r�	_FINISHEDrr"r#�_result)rrrr�result�s


z
Future.resultcCs,|jtkrt�|jtkr td��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)r-r/rr7rr"r#)rrrrr �s

zFuture.exception)r%cCsB|jtkr|jj|||d�n |dkr.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)r-r.rr2�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�fr4)r<rr�
<listcomp>�sz/Future.remove_done_callback.<locals>.<listcomp>N)r�len)rr<Zfiltered_callbacksZ
removed_countr)r<r�remove_done_callback�s

zFuture.remove_done_callbackcCs4|jtkrtd�|j|���||_t|_|��dS)z�Mark the future done and set its result.

        If the future is already done when this method is called, raises
        InvalidStateError.
        z{}: {!r}N)r-r.rrr8r7r0)rr9rrr�
set_result�s

zFuture.set_resultcCs^|jtkrtd�|j|���t|t�r,|�}t|�tkr@td��||_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.
        z{}: {!r}zPStopIteration interacts badly with generators and cannot be raised into a FutureTN)r-r.rr�
isinstance�type�
StopIteration�	TypeErrorr#r7r0r")rr rrr�
set_exception�s

zFuture.set_exceptionccs,|��sd|_|V|��s$td��|��S)NTzawait wasn't used with future)r6�_asyncio_future_blockingr+r9)rrrr�	__await__szFuture.__await__)"r�
__module__�__qualname__�__doc__r.r-r8r#rrrIr"rr	Z_future_repr_inforrr&�propertyr'�setterr,r1r0r5r6r9r r=rBrCrHrJ�__iter__rrrrr s6rcCs,y
|j}Wntk
rYnX|�S|jS)N)r,�AttributeErrorr)�futr,rrr�	_get_loops
rScCs|��rdS|�|�dS)z?Helper setting the result only if the future was not cancelled.N)r5rC)rRr9rrr�_set_result_unless_cancelledsrTcCsN|��r|��|��sdS|��}|dk	r8|�|�n|��}|�|�dS)z8Copy state from a future to a concurrent.futures.Future.N)r5r1Zset_running_or_notify_cancelr rHr9rC)�
concurrent�sourcer r9rrr�_set_concurrent_future_state&srWcCsP|��rdS|��r|��n.|��}|dk	r:|�|�n|��}|�|�dS)zqInternal helper to copy state from another Future.

    The other Future may be a concurrent.futures.Future.
    N)r5r1r rHr9rC)rV�destr r9rrr�_copy_future_state5s
rYcs�t��st�tjj�std��t��s<t�tjj�s<td��t��rLt��nd�t��r`t��nd�dd�����fdd�}����fdd	�}��|���|�dS)
aChain two futures so that when one completes, so does the other.

    The result (or exception) of source will be copied to destination.
    If destination is cancelled, source gets cancelled too.
    Compatible with both asyncio.Future and concurrent.futures.Future.
    z(A future is required for source argumentz-A future is required for destination argumentNcSs"t|�rt||�n
t||�dS)N)rrYrW)r!�otherrrr�
_set_stateYsz!_chain_future.<locals>._set_statecs2|��r.�dks��kr"���n���j�dS)N)r5r1�call_soon_threadsafe)�destination)�	dest_looprV�source_looprr�_call_check_cancel_s
z)_chain_future.<locals>._call_check_cancelcsJ���r�dk	r���rdS�dks,��kr8��|�n����|�dS)N)r5Z	is_closedr\)rV)r[r^r]r_rr�_call_set_statefsz&_chain_future.<locals>._call_set_state)rrDrUZfuturesrrGrSr=)rVr]r`rar)r[r^r]rVr_r�
_chain_futureIs

	
rb)rcCs2t|�r|S|dkrt��}|��}t||�|S)z&Wrap concurrent.futures.Future object.N)rr
r
Z
create_futurerb)r!rZ
new_futurerrrrss
r)rM�__all__Zconcurrent.futuresrUr:Zloggingr�r	r
rrrrrr.r/r7�DEBUGZSTACK_DEBUGrZ	_PyFuturerSrTrWrYrbrZ_asyncio�ImportErrorZ_CFuturerrrr�<module>s<
q*



Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
24 May 2024 8.34 AM
root / linksafe
0755
__init__.cpython-37.opt-1.pyc
0.671 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
__init__.cpython-37.opt-2.pyc
0.616 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
__init__.cpython-37.pyc
0.671 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
base_events.cpython-37.opt-1.pyc
47.163 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
base_events.cpython-37.opt-2.pyc
38.447 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
base_events.cpython-37.pyc
47.384 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
base_futures.cpython-37.opt-1.pyc
2.05 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
base_futures.cpython-37.opt-2.pyc
1.714 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
base_futures.cpython-37.pyc
2.05 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
base_subprocess.cpython-37.opt-1.pyc
8.881 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
base_subprocess.cpython-37.opt-2.pyc
8.781 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
base_subprocess.cpython-37.pyc
8.973 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
base_tasks.cpython-37.opt-1.pyc
1.819 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
base_tasks.cpython-37.opt-2.pyc
1.819 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
base_tasks.cpython-37.pyc
1.819 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
constants.cpython-37.opt-1.pyc
0.574 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
constants.cpython-37.opt-2.pyc
0.574 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
constants.cpython-37.pyc
0.574 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
coroutines.cpython-37.opt-1.pyc
6.143 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
coroutines.cpython-37.opt-2.pyc
5.916 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
coroutines.cpython-37.pyc
6.226 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
events.cpython-37.opt-1.pyc
27.128 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
events.cpython-37.opt-2.pyc
18.081 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
events.cpython-37.pyc
27.233 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
format_helpers.cpython-37.opt-1.pyc
2.26 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
format_helpers.cpython-37.opt-2.pyc
2.021 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
format_helpers.cpython-37.pyc
2.26 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
futures.cpython-37.opt-1.pyc
10.39 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
futures.cpython-37.opt-2.pyc
7.152 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
futures.cpython-37.pyc
10.561 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
locks.cpython-37.opt-1.pyc
15.537 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
locks.cpython-37.opt-2.pyc
9.08 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
locks.cpython-37.pyc
15.537 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
log.cpython-37.opt-1.pyc
0.231 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
log.cpython-37.opt-2.pyc
0.193 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
log.cpython-37.pyc
0.231 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
proactor_events.cpython-37.opt-1.pyc
19.409 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
proactor_events.cpython-37.opt-2.pyc
19.019 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
proactor_events.cpython-37.pyc
19.614 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
protocols.cpython-37.opt-1.pyc
8.521 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
protocols.cpython-37.opt-2.pyc
3.118 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
protocols.cpython-37.pyc
8.521 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
queues.cpython-37.opt-1.pyc
7.979 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
queues.cpython-37.opt-2.pyc
5.346 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
queues.cpython-37.pyc
7.979 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
runners.cpython-37.opt-1.pyc
1.894 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
runners.cpython-37.opt-2.pyc
1.228 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
runners.cpython-37.pyc
1.894 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
selector_events.cpython-37.opt-1.pyc
27.724 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
selector_events.cpython-37.opt-2.pyc
26.114 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
selector_events.cpython-37.pyc
27.784 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
sslproto.cpython-37.opt-1.pyc
20.564 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
sslproto.cpython-37.opt-2.pyc
13.895 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
sslproto.cpython-37.pyc
20.758 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
streams.cpython-37.opt-1.pyc
19.541 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
streams.cpython-37.opt-2.pyc
13.449 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
streams.cpython-37.pyc
19.81 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
subprocess.cpython-37.opt-1.pyc
6.562 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
subprocess.cpython-37.opt-2.pyc
6.435 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
subprocess.cpython-37.pyc
6.591 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
tasks.cpython-37.opt-1.pyc
21.738 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
tasks.cpython-37.opt-2.pyc
14.681 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
tasks.cpython-37.pyc
21.793 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
transports.cpython-37.opt-1.pyc
11.893 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
transports.cpython-37.opt-2.pyc
6.364 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
transports.cpython-37.pyc
11.922 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
unix_events.cpython-37.opt-1.pyc
31.249 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
unix_events.cpython-37.opt-2.pyc
27.637 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
unix_events.cpython-37.pyc
31.586 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
windows_events.cpython-37.opt-1.pyc
22.524 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
windows_events.cpython-37.opt-2.pyc
21.44 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
windows_events.cpython-37.pyc
22.524 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
windows_utils.cpython-37.opt-1.pyc
4.213 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
windows_utils.cpython-37.opt-2.pyc
3.789 KB
17 Apr 2024 5.35 PM
root / linksafe
0644
windows_utils.cpython-37.pyc
4.295 KB
17 Apr 2024 5.36 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF