/opt/alt/python27/lib/python2.7/site-packages/beaker
NameSizeModeActions
crypto/-0755rm
ext/-0755rm
cache.py158140644editdlrm
cache.pyc188050644editdlrm
cache.pyo188050644editdlrm
container.py204750644editdlrm
container.pyc261020644editdlrm
container.pyo261020644editdlrm
converters.py10410644editdlrm
converters.pyc12780644editdlrm
converters.pyo12780644editdlrm
exceptions.py3740644editdlrm
exceptions.pyc15080644editdlrm
exceptions.pyo15080644editdlrm
middleware.py64070644editdlrm
middleware.pyc67270644editdlrm
middleware.pyo67270644editdlrm
session.py217650644editdlrm
session.pyc229750644editdlrm
session.pyo229750644editdlrm
synchronization.py117550644editdlrm
synchronization.pyc138130644editdlrm
synchronization.pyo138130644editdlrm
util.py97390644editdlrm
util.pyc121750644editdlrm
util.pyo121750644editdlrm
__init__.py20644editdlrm
__init__.pyc1510644editdlrm
__init__.pyo1510644editdlrm
Edit: /opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyo (12175B)
Ñò í€Kc@südZyddkZddkZWn+ej oddkZddkZnXddklZl Z ddk Z ddk Z ddk Z ddk Z ddkZddkZeedeƒp eidjZeid jZeiid ƒZepeoddkZn ddkZdd klZdd klZd d ddddgZd„Zd„Z d e!fd„ƒYZ"de!fd„ƒYZ#de#fd„ƒYZ$da&dde'd„Z(d„Z)d„Z*d„Z+d„Z,e'd„Z-d„Z.dS(!sBeaker utilitiesiÿÿÿÿN(tdatetimet timedeltat py3kwarningiiiitjava(tasbool(tlocalt ThreadLocaltRegistrytWeakValuedRegistrytSyncDictt encoded_pathtverify_directorycCsad}xTti|tiƒp=y|d7}ti|ƒWq |djo‚qXq Xq WdS(scverifies and creates a directory. tries to ignore collisions with other threads and processes.iiiN(tostaccesstF_OKtmakedirs(tdirttries((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyR #s  cs‡fd†}|S(Ncs8‡‡fd†}ˆi|_dˆˆif|_|S(Ncs tiˆtdƒˆ||ŽS(Ni(twarningstwarntDeprecationWarning(targstkargs(tmessagetfn(s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pytdeprecated_method3ss%s %s(t__name__t__doc__(RR(R(Rs</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pytwrapper2s ((RR((Rs</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyt deprecated1scBsDeZdZdZd„Zd„Zd„Zdd„Zd„Z RS(s$stores a value on a per-thread basist_tlocalcCstƒ|_dS(N(R(tself((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyt__init__AscCs||i_dS(N(Rtvalue(RR!((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pytputDscCst|idƒS(NR!(thasattrR(R((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pythasGscCst|id|ƒS(NR!(tgetattrR(Rtdefault((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pytgetJscCs |i`dS(N(RR!(R((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pytremoveMsN( Rt __module__Rt __slots__R R"R$tNoneR'R((((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyR<s    cBsheZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z RS( sÞ An efficient/threadsafe singleton map algorithm, a.k.a. "get a value based on this key, and create if not found or not valid" paradigm: exists && isvalid ? get : create Designed to work with weakref dictionaries to expect items to asynchronously disappear from the dictionary. Use python 2.3.3 or greater ! a major bug was just fixed in Nov. 2003 that was driving me nuts with garbage collection/weakrefs in this section. cCstiƒ|_h|_dS(N(t_threadt allocate_locktmutextdict(R((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyR `scOscy6|i|ƒo |i|S|i||||ŽSWn&tj o|i||||ŽSXdS(N(thas_keyR/tsync_gettKeyError(Rtkeyt createfuncRtkwargs((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyR'ds  c Os…|iiƒzcy6|i|ƒo |i|S|i||||ŽSWn&tj o|i||||ŽSXWd|iiƒXdS(N(R.tacquireR0R/t_createR2trelease(RR3R4RR5((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyR1ms  cOs|||Ž||<}|S(N((RR3R4RR5tobj((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyR7zscCs|ii|ƒS(N(R/R0(RR3((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyR0~scCs|ii|ƒS(N(R/t __contains__(RR3((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyR:scCs|ii|ƒS(N(R/t __getitem__(RR3((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyR;ƒscCs|ii||ƒdS(N(R/t __setitem__(RR3R!((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyR<…scCs|ii|ƒS(N(R/t __delitem__(RR3((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyR=‡scCs|iiƒdS(N(R/tclear(R((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyR>‰s( RR)RR R'R1R7R0R:R;R<R=R>(((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyR Ps       cBseZd„ZRS(cCs"tiƒ|_tiƒ|_dS(N(t _threadingtRLockR.tweakreftWeakValueDictionaryR/(R((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyR Žs(RR)R (((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyRss.encc Csïdi|ƒ}tdjoddklan|o<tot|idƒƒiƒ}qst|ƒiƒ}ntii |ƒ}g}x+t d|ƒD]}|i |d|!ƒq›Wtii||Œ}t |ƒtii|||ƒS(ssGenerate a unique file-accessible path from the given list of identifiers starting at the given root directory.t_iÿÿÿÿ(tsha1sutf-8iiN( tjoinRDR+t beaker.cryptotpy3ktencodet hexdigestR tpathtbasenametrangetappendR ( troott identifierst extensiontdepthtdigest_filenamestidentttokenstdR((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyR “s  cCst||ƒpÙt|tƒp |f}nt}x˜|D]}yt|ttfjo4g}|idƒD]}||iƒqj~}n$|tjo t}n||ƒ}t}WnnX|oPq:q:W|pt |ƒ‚qn3t|t ƒo"|iƒ ot d|ƒ‚n|S(Nt,s!Empty strings are invalid for: %s( t isinstancettupletFalsetlisttsplittstriptboolRtTruet Exceptiontstr(toptttypesterrortcoercedttypt_[1]tx((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pytverify_options°s, 4     cCsIxB|D]:\}}}||jot||||ƒ||sJ        "     =      )