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€ddlZddlZddlmZddddgZed"ƒZd
efd„ƒYZd„Z	d
„Z
d„Zd„Zd„Z
iZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zgdd„Zedkr|ejj d ƒeƒe!ejd ƒ.Z"e#e"j$ƒejd d!ƒZ%e%dUWdQXndS(#iÿÿÿÿN(tsixtinjecttimport_patchedtmonkey_patchtis_monkey_patchedt__builtins__t__file__t__name__tSysModulesSavercBs,eZdZdd„Zd„Zd„ZRS(s…Class that captures some subset of the current state of
    sys.modules.  Pass in an iterator of module names to the
    constructor.cCs$i|_tjƒ|j|ŒdS(N(t_savedtimptacquire_locktsave(tselftmodule_names((sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pyt__init__s	
cGs1x*|D]"}tjj|dƒ|j|<qWdS(s&Saves the named modules to the object.N(tsystmodulestgettNoneR	(R
Rtmodname((sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pyRs
cCswzex^tj|jƒD]J\}}|dk	r>|tj|<qytj|=Wqtk
r_qXqWWdtjƒXdS(sRRestores the modules that the saver knows about into
        sys.modules.
        N(	Rt	iteritemsR	RRRtKeyErrorR
trelease_lock(R
Rtmod((sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pytrestores
((Rt
__module__t__doc__RRR(((sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pyRs	c	GsHd|}|tjkr$tj|S|sRtƒtƒtƒtƒtƒ}ntg|D]\}}|^q\ƒ}|j|ƒx!|D]\}}|tj|<q‹Wtjj	|dƒz{t|ii|jdƒd ƒ}|dk	r(x9t
|ƒD](}|tkrùt||ƒ||<qùqùWn|tj|<Wd|jƒX|S(sÌBase method for "injecting" greened modules into an imported module.  It
    imports the module specified in *module_name*, arranging things so
    that the already-imported modules in *additional_modules* are used when
    *module_name* makes its imports.

    **Note:** This function does not create or change any sys.modules item, so
    if your greened module use code like 'sys.modules["your_module_name"]', you
    need to update sys.modules by yourself.

    *new_globals* is either None or a globals dictionary that gets populated
    with the contents of the *module_name* module.  This is useful when creating
    a "green" version of some other module.

    *additional_modules* should be a collection of two-element tuples, of the
    form (<name>, <module>).  If it's not specified, a default selection of
    name/module pairs is used, which should cover all use cases but may be
    slower because there are inevitably redundant or unnecessary imports.
    t__patched_module_t.iÿÿÿÿN(RRt_green_os_modulest_green_select_modulest_green_socket_modulest_green_thread_modulest_green_time_modulesRRtpopRt
__import__tsplittdirt	__excludetgetattrR(	tmodule_nametnew_globalstadditional_modulestpatched_nametnametmtsaverRtmodule((sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pyR,s(

%
"cOs t|d|t|jƒƒŒS(sìImports a module in a way that ensures that the module uses "green"
    versions of the standard library modules, so that everything works
    nonblockingly.

    The only required argument is the name of the module to be imported.
    N(RRttupletitems(R)R+tkw_additional_modules((sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pyRmscsDˆs.tƒtƒtƒtƒtƒ‰n‡‡fd†}|S(s Decorator that returns a version of the function that patches
    some modules for the duration of the function call.  This is
    deeply gross and should only be used for functions that import
    network libraries within their function bodies that there is no
    way of getting around.cs]tƒ}x.ˆD]&\}}|j|ƒ|tj|<qWzˆ||ŽSWd|jƒXdS(N(RRRRR(targstkwR/R-R(R+tfunc(sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pytpatched‰s	
(RRR R!R"(R6R+R7((R+R6sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pytpatch_functionzs

	cs‡‡fd†}|S(suKind of the contrapositive of patch_function: decorates a
    function such that when it's called, sys.modules is populated only
    with the unpatched versions of the specified modules.  Unlike
    patch_function, only the names of the modules need be supplied,
    and there are no defaults.  This is a gross hack; tell your kids not
    to import inside function bodies!csStˆƒ}x!ˆD]}t|ƒtj|<qWzˆ||ŽSWd|jƒXdS(N(RtoriginalRRR(R4R5R/R-(R6R(sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pyR7œs
((R6RR7((R6RsE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pyt_original_patch_function•scCsJd|}|tjkr)tjj|ƒSt|fƒ}tjj|d
ƒtjrkidd6dd6}ntjr‹idd6dd6}n||krÄ||}|j	|ƒt
|ƒtj|<nzmt|ii|jdƒd ƒ}|dkr#t
|d	ƒr#t|jjdƒ|j_n|tj|<Wd
|jƒXtj|S(sd This returns an unpatched version of a module; this is useful for
    Eventlet itself (i.e. tpool).t__original_module_tthreadt	threadingtQueuet_threadtqueueRiÿÿÿÿt
_threadingN(sQueuesqueue(RRRRR#RRtPY2tPY3RR9R$R%thasattrR:R>RR(Rt
original_nameR/tdepst
dependencytreal_mod((sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pyR9§s,
		

"	cKsvtdƒ}d
|ko!d|ks+t‚y|jd
ƒ}Wntk
rQnX||d<|jddƒ}x6tj|ƒD]%}||kr~td|ƒ‚q~q~W|dkrÈt|j	ƒk}nx\|D]T}|dkrô|j
|tƒn|dkr|j
|tƒn|j
||ƒqÏW|drKtj
dƒrKtƒng}xdtfdtfdtfdtfdtfdtfdtfd	tfgD]@\}}||r tj
|ƒr ||ƒ7}tt|<q q W|dr=tj
dƒr=y(d
dlm}	|	jƒttd<Wq=tk
r9q=XntjƒzÏxÈ|D]À\}}
tjj
|ƒ}|dkrŠt|ƒ}nxB|
j D]7}t!|
|dƒ}
|
dk	r”t"|||
ƒq”q”Wt!|
dgƒ}x-|D]%}t#||ƒrèt$||ƒqèqèWqQWWdtj%ƒXtj&dkrrd
dl'}t(dƒ}||j)_*d
dl+}|j,|_-ndS(sGlobally patches certain system modules to be greenthread-friendly.

    The keyword arguments afford some control over which modules are patched.
    If no keyword arguments are supplied, all possible modules are patched.
    If keywords are set to True, only the specified modules are patched.  E.g.,
    ``monkey_patch(socket=True, select=True)`` patches only the select and
    socket modules.  Most arguments patch the single module of the same name
    (os, time, select).  The exceptions are socket, which also patches the ssl
    module if present; and thread, which patches thread, threading, and Queue.

    It's safe to call monkey_patch multiple times.
    tostselecttsocketR<ttimetpsycopgtMySQLdbtbuiltinst
subprocesst__builtin__talls4monkey_patch() got an unexpected keyword argument %riÿÿÿÿ(tpsycopg2_patchert__deleted__NiR?(	sossselectssocketsthreadstimeRMsMySQLdbsbuiltinss
subprocess(ii(.tsettAssertionErrorR#RRRtiterkeyst	TypeErrortTruetvaluest
setdefaulttFalsetalready_patchedRt_green_existing_locksRRR R!R"t_green_MySQLdbt_green_builtinst_green_subprocess_modulesteventlet.supportRStmake_psycopg_greentImportErrorR
RRRR$t__patched__R(tsetattrRDtdelattrRtversion_infotimportlib._bootstrapR9t
_bootstrapR?R=t_PyRLocktRLock(tont
accepted_argstbt
default_ontkRtmodules_to_patchR-tmodules_functionRSRtorig_modt	attr_nametpatched_attrtdeletedt	importlibR<R=((sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pyRÔs‚
	



							




cCs"|tkp!t|ddƒtkS(s[Returns True if the given module is monkeypatched currently, False if
    not.  *module* can be either the module itself or its name.

    Based entirely off the name of the module, so if you import a
    module some other way than with the import keyword (including
    import_patched), this might not be correct about that particular
    module.RN(R]R(R(R0((sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pyR;scCsddl}ddl}ddl}t|jƒƒ}t|jƒƒ}tjddkrpt|jƒƒ}n|j	j
jƒ}x‹|jƒD]}}t
||ƒrtjddkrÙt
|j|ƒrÙt||ƒqtjddkrt
||ƒrt|ƒqqqWdS(sMake locks created before monkey-patching safe.

    RLocks rely on a Lock and on Python 2, if an unpatched Lock blocks, it
    blocks the native thread. We need to replace these with green Locks.

    This was originally noticed in the stdlib logging module.iÿÿÿÿNiii(tgcR=teventlet.green.threadttypetLockRlRRhRktgreenR<t	get_identtget_objectst
isinstancet
_RLock__blockt_fix_py2_rlockt_fix_py3_rlock(RyR=teventlett	lock_typet
rlock_typetpyrlock_typettidtobj((sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pyR^Gs cCsVddl}|j}|jjjƒ}||_|jƒrI|jƒn||_dS(Niÿÿÿÿ(teventlet.green.threadingRR}R=R|tlockedtacquiret
_RLock__owner(trlockRˆR„toldtnew((sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pyR‚bs		
cCsìddl}ddl}|jƒ}x$|jƒrJ|jƒ|jƒq'W|jƒrd|jƒn|jƒxw|j|ƒD]f}yt|ƒ}Wnt	k
r§q~Xx9|j
ƒD]+\}}||krµt|||ƒqµqµWq~WdS(Niÿÿÿÿ(RyR=Rkt	_is_ownedtreleaseRŒtcollectt
get_referrerstvarsRXR2Rf(RRyR=Rtreftref_varsRqtv((sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pyRƒls"



cCsddlm}d|fgS(Niÿÿÿÿ(RIRI(teventlet.greenRI(RI((sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pyRscCsXddlm}d|fg}tjdkrTddlm}|jd|fƒn|S(	Niÿÿÿÿ(RJRJii(t	selectorsRš(ii(R™RJRRhRštappend(RJRRš((sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pyR†scCs\ddlm}y*ddlm}d|fd|fgSWntk
rWd|fgSXdS(Niÿÿÿÿ(RK(tsslRKRœ(R™RKRœRd(RKRœ((sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pyR ‘s
cCsddlm}d|fgS(Niÿÿÿÿ(RPRP(R™RP(RP((sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pyRašscCs„ddlm}ddlm}ddlm}tjrXd|fd|fd|fgStjr€d|fd	|fd|fgSdS(
Niÿÿÿÿ(R>(R<(R=R>R<R=R@R?(R™R>R<R=RRBRC(R>R<R=((sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pyR!Ÿs		cCsddlm}d|fgS(Niÿÿÿÿ(RLRL(R™RL(RL((sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pyR"©scCs:y!ddlm}d|fgSWntk
r5gSXdS(Niÿÿÿÿ(RNRN(R™RNRd(RN((sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pyR_®s

cCsIy0ddlm}tjr"dnd|fgSWntk
rDgSXdS(Niÿÿÿÿ(tbuiltinRQRO(R™RRRBRd(R((sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pyR`¶s
 
c	Csl|dkr|j}n|jtg|D]6}|jdƒpF||ks(|t||ƒf^q(ƒƒdS(sCopy properties from *source* (assumed to be a module) to
    *destination* (assumed to be a dict).

    *ignore* lists properties that should not be thusly copied.
    *srckeys* is a list of keys to copy, if the source's __all__ is
    untrustworthy.
    t__N(Rt__all__tupdatetdictt
startswithR((tsourcetdestinationtignoretsrckeysR-((sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pytslurp_properties¾s	
t__main__itexec(s__builtins__s__file__s__name__(&R
RRbRRŸRUR'tobjectRRRR8R:R9R]RRR^R‚RƒRRR RaR!R"R_R`RR§RtargvR#topentftcompiletreadtcode(((sE/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/patcher.pyt<module>s> 	A	
			*	g