PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  퀍Kc@sdZyddlZddlZWn)ek rMddlZddlZnXddlmZm Z ddl Z ddl Z ddl Z ddl Z ddlZddlZeedepejdkZejd kZejjd Zeser ddlZn ddlZdd lmZdd lmZd d ddddgZdZdZ d e!fdYZ"de!fdYZ#de#fdYZ$da&dde'dZ(dZ)dZ*dZ+dZ,e'dZ-dZ.dS(!sBeaker utilitiesiN(tdatetimet timedeltat py3kwarningiiiitjava(tasbool(tlocalt ThreadLocaltRegistrytWeakValuedRegistrytSyncDictt encoded_pathtverify_directorycCs]d}xPtj|tjsXy|d7}tj|Wq |dkrUqUq Xq WdS(scverifies and creates a directory. tries to ignore collisions with other threads and processes.iiiN(tostaccesstF_OKtmakedirs(tdirttries((s//usr/lib/python2.7/site-packages/beaker/util.pyR #s  csfd}|S(Ncs8fd}j|_djf|_|S(Ncs tjtd||S(Ni(twarningstwarntDeprecationWarning(targstkargs(tfntmessage(s//usr/lib/python2.7/site-packages/beaker/util.pytdeprecated_method3ss%s %s(t__name__t__doc__(RR(R(Rs//usr/lib/python2.7/site-packages/beaker/util.pytwrapper2s ((RR((Rs//usr/lib/python2.7/site-packages/beaker/util.pyt deprecated1scBsDeZdZdZdZdZdZddZdZ RS(s$stores a value on a per-thread basist_tlocalcCst|_dS(N(R(tself((s//usr/lib/python2.7/site-packages/beaker/util.pyt__init__AscCs||j_dS(N(Rtvalue(RR!((s//usr/lib/python2.7/site-packages/beaker/util.pytputDscCst|jdS(NR!(thasattrR(R((s//usr/lib/python2.7/site-packages/beaker/util.pythasGscCst|jd|S(NR!(tgetattrR(Rtdefault((s//usr/lib/python2.7/site-packages/beaker/util.pytgetJscCs |j`dS(N(RR!(R((s//usr/lib/python2.7/site-packages/beaker/util.pytremoveMsN( Rt __module__Rt __slots__R R"R$tNoneR'R((((s//usr/lib/python2.7/site-packages/beaker/util.pyR<s    cBsheZdZdZdZdZdZdZdZdZ dZ 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. cCstj|_i|_dS(N(t_threadt allocate_locktmutextdict(R((s//usr/lib/python2.7/site-packages/beaker/util.pyR `scOs_y4|j|r|j|S|j||||SWn$tk rZ|j||||SXdS(N(thas_keyR/tsync_gettKeyError(Rtkeyt createfuncRtkwargs((s//usr/lib/python2.7/site-packages/beaker/util.pyR'ds   cOs|jjz_y4|j|r-|j|S|j||||SWn$tk rj|j||||SXWd|jjXdS(N(R.tacquireR0R/t_createR2trelease(RR3R4RR5((s//usr/lib/python2.7/site-packages/beaker/util.pyR1ms   cOs|||||<}|S(N((RR3R4RR5tobj((s//usr/lib/python2.7/site-packages/beaker/util.pyR7zscCs|jj|S(N(R/R0(RR3((s//usr/lib/python2.7/site-packages/beaker/util.pyR0~scCs|jj|S(N(R/t __contains__(RR3((s//usr/lib/python2.7/site-packages/beaker/util.pyR:scCs|jj|S(N(R/t __getitem__(RR3((s//usr/lib/python2.7/site-packages/beaker/util.pyR;scCs|jj||dS(N(R/t __setitem__(RR3R!((s//usr/lib/python2.7/site-packages/beaker/util.pyR<scCs|jj|S(N(R/t __delitem__(RR3((s//usr/lib/python2.7/site-packages/beaker/util.pyR=scCs|jjdS(N(R/tclear(R((s//usr/lib/python2.7/site-packages/beaker/util.pyR>s( RR)RR R'R1R7R0R:R;R<R=R>(((s//usr/lib/python2.7/site-packages/beaker/util.pyR Ps       cBseZdZRS(cCs"tj|_tj|_dS(N(t _threadingtRLockR.tweakreftWeakValueDictionaryR/(R((s//usr/lib/python2.7/site-packages/beaker/util.pyR s(RR)R (((s//usr/lib/python2.7/site-packages/beaker/util.pyRss.encc Csdj|}tdkr.ddlman|rmtrXt|jdj}qmt|j}ntjj |}g}x+t d|D]}|j |d|!qWtjj||}t |tjj|||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//usr/lib/python2.7/site-packages/beaker/util.pyR s  cCst||st|ts*|f}nt}x|D]}yh|ttfkr}g|jdD]}|j^qb}n!|tkrt}n||}t}WnnX|r7Pq7q7W|st |qn/t|t r|j rt d|n|S(Nt,s!Empty strings are invalid for: %s( t isinstancettupletFalsetlisttsplittstriptboolRtTruet Exceptiontstr(toptttypesterrortcoercedttyptx((s//usr/lib/python2.7/site-packages/beaker/util.pytverify_optionss*  +    cCsGx@|D]8\}}}||krt||||||sJ         !      =      )