Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
øEYc@sçddlZddlZddlZddlZddlZddlZdZdZdZdZ	dZ
dZdZd	Z
d
ZdZeee
eegZide6d
e6de
6de6de6ZejdƒZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd „ƒYZd!„Zed"„Z ej!d#d$ƒZ"ee	d%„Z#d&efd'„ƒYZ$d(efd)„ƒYZ%dS(*iÿÿÿÿNs"Brian Quinlan (brian@sweetapp.com)tFIRST_COMPLETEDtFIRST_EXCEPTIONt
ALL_COMPLETEDt
_AS_COMPLETEDtPENDINGtRUNNINGt	CANCELLEDtCANCELLED_AND_NOTIFIEDtFINISHEDtpendingtrunningt	cancelledtfinishedsconcurrent.futurestErrorcBseZdZRS(s-Base class for all future-related exceptions.(t__name__t
__module__t__doc__(((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyR
.stCancelledErrorcBseZdZRS(sThe Future was cancelled.(RRR(((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyR2stTimeoutErrorcBseZdZRS(s*The operation exceeded the given deadline.(RRR(((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyR6st_WaitercBs2eZdZd„Zd„Zd„Zd„ZRS(s;Provides the event that wait() and as_completed() block on.cCstjƒ|_g|_dS(N(t	threadingtEventteventtfinished_futures(tself((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyt__init__<scCs|jj|ƒdS(N(Rtappend(Rtfuture((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyt
add_result@scCs|jj|ƒdS(N(RR(RR((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyt
add_exceptionCscCs|jj|ƒdS(N(RR(RR((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyt
add_cancelledFs(RRRRRRR(((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyR:s
			t_AsCompletedWaitercBs2eZdZd„Zd„Zd„Zd„ZRS(sUsed by as_completed().cCs&tt|ƒjƒtjƒ|_dS(N(tsuperRRRtLocktlock(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyRLscCs7|j(tt|ƒj|ƒ|jjƒWdQXdS(N(R"R RRRtset(RR((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyRPs
cCs7|j(tt|ƒj|ƒ|jjƒWdQXdS(N(R"R RRRR#(RR((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyRUs
cCs7|j(tt|ƒj|ƒ|jjƒWdQXdS(N(R"R RRRR#(RR((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyRZs
(RRRRRRR(((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyRIs
			t_FirstCompletedWaitercBs)eZdZd„Zd„Zd„ZRS(s*Used by wait(return_when=FIRST_COMPLETED).cCs'tt|ƒj|ƒ|jjƒdS(N(R R$RRR#(RR((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyRbscCs'tt|ƒj|ƒ|jjƒdS(N(R R$RRR#(RR((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyRfscCs'tt|ƒj|ƒ|jjƒdS(N(R R$RRR#(RR((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyRjs(RRRRRR(((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyR$_s		t_AllCompletedWaitercBs;eZdZd„Zd„Zd„Zd„Zd„ZRS(s<Used by wait(return_when=FIRST_EXCEPTION and ALL_COMPLETED).cCs8||_||_tjƒ|_tt|ƒjƒdS(N(tnum_pending_callststop_on_exceptionRR!R"R R%R(RR&R'((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyRqs		cCs<|j-|jd8_|js2|jjƒnWdQXdS(Ni(R"R&RR#(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyt_decrement_pending_callsws
	cCs$tt|ƒj|ƒ|jƒdS(N(R R%RR((RR((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyR}scCs=tt|ƒj|ƒ|jr/|jjƒn
|jƒdS(N(R R%RR'RR#R((RR((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyRs	cCs$tt|ƒj|ƒ|jƒdS(N(R R%RR((RR((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyRˆs(RRRRR(RRR(((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyR%ns				t_AcquireFuturescBs)eZdZd„Zd„Zd„ZRS(sDA context manager that does an ordered acquire of Future conditions.cCst|dtƒ|_dS(Ntkey(tsortedtidtfutures(RR-((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyRscCs%x|jD]}|jjƒq
WdS(N(R-t
_conditiontacquire(RR((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyt	__enter__’scGs%x|jD]}|jjƒq
WdS(N(R-R.trelease(RtargsR((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyt__exit__–s(RRRRR0R3(((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyR)Œs		cCs½|tkrtƒ}n€|tkr0tƒ}nhtd„|Dƒƒ}|tkrgt|dtƒ}n1|tkrˆt|dt	ƒ}nt
d|ƒ‚x|D]}|jj|ƒqŸW|S(Ncss$|]}|jttgkVqdS(N(t_stateRR(t.0tf((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pys	<genexpr>¡sR'sInvalid return condition: %r(
RRRR$tsumRR%tTrueRtFalset
ValueErrort_waitersR(tfstreturn_whentwaitert
pending_countR6((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyt_create_and_install_waitersšs
c	cs…|dk	r|tjƒ}nt|ƒ}t|ƒ4td„|Dƒƒ}||}t|tƒ}WdQXzßx|D]}|VqwWxÂ|rJ|dkr¤d}nA|tjƒ}|dkråtdt|ƒt|ƒfƒ‚n|jj	|ƒ|j
$|j}g|_|jjƒWdQXx |D]}|V|j
|ƒq+Wq‰WWdx.|D]&}|j|jj
|ƒWdQXqVWXdS(snAn iterator over the given futures that yields each as it completes.

    Args:
        fs: The sequence of Futures (possibly created by different Executors) to
            iterate over.
        timeout: The maximum number of seconds to wait. If None, then there
            is no limit on the wait time.

    Returns:
        An iterator that yields the given Futures as they complete (finished or
        cancelled). If any given Futures are duplicated, they will be returned
        once.

    Raises:
        TimeoutError: If the entire result iterator could not be generated
            before the given timeout.
    css*|] }|jttgkr|VqdS(N(R4RR(R5R6((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pys	<genexpr>ÇsNis%d (of %d) futures unfinished(tNonettimeR#R)R@RRtlenRtwaitR"RtcleartremoveR.R;(	R<ttimeouttend_timeRR	R>Rtwait_timeoutR6((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pytas_completed¯s<


			
		


tDoneAndNotDoneFuturess
done not_donec
Cs,t|ƒ¶td„|Dƒƒ}t|ƒ|}|tkrR|rRt||ƒS|tkrŠ|rŠtd„|DƒƒrŠt||ƒSnt|ƒt|ƒkr¯t||ƒSt||ƒ}WdQX|jj	|ƒx.|D]&}|j
|jj|ƒWdQXqÛW|j
|jƒt|t|ƒ|ƒS(sWait for the futures in the given sequence to complete.

    Args:
        fs: The sequence of Futures (possibly created by different Executors) to
            wait upon.
        timeout: The maximum number of seconds to wait. If None, then there
            is no limit on the wait time.
        return_when: Indicates when this function should return. The options
            are:

            FIRST_COMPLETED - Return when any future finishes or is
                              cancelled.
            FIRST_EXCEPTION - Return when any future finishes by raising an
                              exception. If no future raises an exception
                              then it is equivalent to ALL_COMPLETED.
            ALL_COMPLETED -   Return when all futures finish or are cancelled.

    Returns:
        A named 2-tuple of sets. The first set, named 'done', contains the
        futures that completed (is finished or cancelled) before the wait
        completed. The second set, named 'not_done', contains uncompleted
        futures.
    css*|] }|jttgkr|VqdS(N(R4RR(R5R6((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pys	<genexpr>scss4|]*}|jƒr|jƒdk	r|VqdS(N(Rt	exceptionRA(R5R6((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pys	<genexpr>sN(R)R#RRKRtanyRCR@RRDR.R;RFtupdateR(R<RGR=tdonetnot_doneR>R6((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyRDìs"




tFuturecBs§eZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zdd
„Z
dd„Zdd„Zd
„Zd„Zd„Zd„ZRS(s5Represents the result of an asynchronous computation.cCsItjƒ|_t|_d|_d|_d|_g|_	g|_
dS(s8Initializes the future. Should not be called by clients.N(Rt	ConditionR.RR4RAt_resultt
_exceptiont
_tracebackR;t_done_callbacks(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyR s					cCssxl|jD]a}y||ƒWq
tk
rAtjd|ƒq
tk
rT‚q
tjd|ƒq
Xq
WdS(Ns!exception calling callback for %r(RVt	ExceptiontLOGGERRLt
BaseException(Rtcallback((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyt_invoke_callbacks*s

cCsª|j›|jtkr|jrOdtt|ƒƒt|j|jjjfSdtt|ƒƒt|j|j	jjfSndtt|ƒƒt|jfSWdQXdS(Ns!<Future at %s state=%s raised %s>s#<Future at %s state=%s returned %s>s<Future at %s state=%s>(
R.R4RRTthexR,t_STATE_TO_DESCRIPTION_MAPt	__class__RRS(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyt__repr__As
	

cCsf|jM|jttgkr#tS|jttgkr<tSt|_|jjƒWdQX|j	ƒtS(s»Cancel the future if possible.

        Returns True if the future was cancelled, False otherwise. A future
        cannot be cancelled if it is running or has already completed.
        N(
R.R4RRR9RRR8t
notify_allR[(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pytcancelRs
	
cCs'|j|jttgkSWdQXdS(s(Return True if the future has cancelled.N(R.R4RR(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyRes
cCs!|j|jtkSWdQXdS(s1Return True if the future is currently executing.N(R.R4R(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyR
js
cCs*|j|jtttgkSWdQXdS(s>Return True of the future was cancelled or finished executing.N(R.R4RRR(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyROos
cCs\|jrQt|jtjƒr-|jj}nt|jƒ}||j|j‚n|jSdS(N(RTt
isinstancettypestInstanceTypeR^ttypeRURS(Rtexception_type((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyt__get_resultts	cCsJ|j1|jtttgkr6|jj|ƒdSWdQX||ƒdS(s%Attaches a callable that will be called when the future finishes.

        Args:
            fn: A callable that will be called with this future as its only
                argument when the future completes or is cancelled. The callable
                will always be called by a thread in the same process in which
                it was added. If the future has already completed or been
                cancelled then the callable will be called immediately. These
                callables are called in the order that they were added.
        N(R.R4RRRRVR(Rtfn((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pytadd_done_callbacks


cCs¡|j’|jttgkr+tƒ‚n|jtkrD|jƒS|jj|ƒ|jttgkrutƒ‚n"|jtkrŽ|jƒStƒ‚WdQXdS(sBReturn the result of the call that the future represents.

        Args:
            timeout: The number of seconds to wait for the result if the future
                isn't done. If None, then there is no limit on the wait time.

        Returns:
            The result of the call that the future represents.

        Raises:
            CancelledError: If the future was cancelled.
            TimeoutError: If the future didn't finish executing before the given
                timeout.
            Exception: If the call raised then that exception will be raised.
        N(	R.R4RRRRt_Future__get_resultRDR(RRG((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pytresult’s


cCs­|jž|jttgkr+tƒ‚n|jtkrJ|j|jfS|jj|ƒ|jttgkr{tƒ‚n(|jtkrš|j|jfSt	ƒ‚WdQXdS(sqReturn a tuple of (exception, traceback) raised by the call that the
        future represents.

        Args:
            timeout: The number of seconds to wait for the exception if the
                future isn't done. If None, then there is no limit on the wait
                time.

        Returns:
            The exception raised by the call that the future represents or None
            if the call completed without raising.

        Raises:
            CancelledError: If the future was cancelled.
            TimeoutError: If the future didn't finish executing before the given
                timeout.
        N(
R.R4RRRRRTRURDR(RRG((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pytexception_info±s
cCs|j|ƒdS(sUReturn the exception raised by the call that the future represents.

        Args:
            timeout: The number of seconds to wait for the exception if the
                future isn't done. If None, then there is no limit on the wait
                time.

        Returns:
            The exception raised by the call that the future represents or None
            if the call completed without raising.

        Raises:
            CancelledError: If the future was cancelled.
            TimeoutError: If the future didn't finish executing before the given
                timeout.
        i(Rl(RRG((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyRLÒscCs•|j†|jtkrGt|_x|jD]}|j|ƒq,WtS|jtkrct|_t	St
jdt|ƒ|jƒt
dƒ‚WdQXdS(s¸Mark the future as running or process any cancel notifications.

        Should only be used by Executor implementations and unit tests.

        If the future has been cancelled (cancel() was called and returned
        True) then any threads waiting on the future completing (though calls
        to as_completed() or wait()) are notified and False is returned.

        If the future was not cancelled then it is put in the running state
        (future calls to running() will return True) and True is returned.

        This method should be called by Executor implementations before
        executing the work associated with this future. If this method returns
        False then the work should not be executed.

        Returns:
            False if the Future was cancelled, True otherwise.

        Raises:
            RuntimeError: if this method was already called or if set_result()
                or set_exception() was called.
        s!Future %s in unexpected state: %ssFuture in unexpected stateN(R.R4RRR;RR9RRR8RXtcriticalR,tRuntimeError(RR>((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pytset_running_or_notify_cancelæs
				
cCs^|jE||_t|_x|jD]}|j|ƒq&W|jjƒWdQX|jƒdS(s‹Sets the return value of work associated with the future.

        Should only be used by Executor implementations and unit tests.
        N(R.RSRR4R;RR`R[(RRkR>((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyt
set_results
		cCsg|jN||_||_t|_x|jD]}|j|ƒq/W|jjƒWdQX|jƒdS(s£Sets the result of the future as being the given exception
        and traceback.

        Should only be used by Executor implementations and unit tests.
        N(	R.RTRURR4R;RR`R[(RRLt	tracebackR>((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pytset_exception_infos
			cCs|j|dƒdS(sSets the result of the future as being the given exception.

        Should only be used by Executor implementations and unit tests.
        N(RrRA(RRL((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyt
set_exception*sN(RRRRR[R_RaRR
RORjRiRARkRlRLRoRpRrRs(((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyRQs"	
							
	!	(	
	tExecutorcBs>eZdZd„Zd„Zed„Zd„Zd„ZRS(sCThis is an abstract base class for concrete asynchronous executors.cOs
tƒ‚dS(s Submits a callable to be executed with the given arguments.

        Schedules the callable to be executed as fn(*args, **kwargs) and returns
        a Future instance representing the execution of the callable.

        Returns:
            A Future representing the given call.
        N(tNotImplementedError(RRhR2tkwargs((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pytsubmit4s	csx|jdƒ‰ˆdk	r.ˆtjƒ‰ngtj|ŒD]}|j||Œ^q>‰‡‡‡fd†}|ƒS(s}Returns a iterator equivalent to map(fn, iter).

        Args:
            fn: A callable that will take as many arguments as there are
                passed iterables.
            timeout: The maximum number of seconds to wait. If None, then there
                is no limit on the wait time.

        Returns:
            An iterator equivalent to: map(func, *iterables) but the calls may
            be evaluated out-of-order.

        Raises:
            TimeoutError: If the entire result iterator could not be generated
                before the given timeout.
            Exception: If fn(*args) raises for any values.
        RGc3sjzGx@ˆD]8}ˆdkr*|jƒVq
|jˆtjƒƒVq
WWdxˆD]}|jƒqQWXdS(N(RARkRBRa(R(RHR<RG(sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pytresult_iteratorYs
 
N(tgetRARBt	itertoolstizipRw(RRht	iterablesRvR2Rx((RHR<RGsM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pytmap?s.
cCsdS(s‹Clean-up the resources associated with the Executor.

        It is safe to call this method several times. Otherwise, no other
        methods can be called after this one.

        Args:
            wait: If True then shutdown will not return until all running
                futures have finished executing and the resources used by the
                executor have been reclaimed.
        N((RRD((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pytshutdownescCs|S(N((R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyR0rscCs|jdtƒtS(NRD(R~R8R9(Rtexc_typetexc_valtexc_tb((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyR3us(	RRRRwR}R8R~R0R3(((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyRt1s		&
	(&tcollectionstloggingRRzRBRct
__author__RRRRRRRRRt_FUTURE_STATESR]t	getLoggerRXRWR
RRtobjectRRR$R%R)R@RARJt
namedtupleRKRDRQRt(((sM/home/tvault/.virtenv/lib/python2.7/site-packages/concurrent/futures/_base.pyt<module>sV	
	;1ÿ