ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ 퀍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</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyR #s  csfd}|S(Ncs8fd}j|_djf|_|S(Ncs tjtd||S(Ni(twarningstwarntDeprecationWarning(targstkargs(tfntmessage(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 deprecated1scBsDeZdZdZdZdZdZddZdZ 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||j_dS(N(Rtvalue(RR!((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pytputDscCst|jdS(NR!(thasattrR(R((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pythasGscCst|jd|S(NR!(tgetattrR(Rtdefault((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pytgetJscCs |j`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    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</opt/alt/python27/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</opt/alt/python27/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</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|jj|S(N(R/R0(RR3((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyR0~scCs|jj|S(N(R/t __contains__(RR3((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyR:scCs|jj|S(N(R/t __getitem__(RR3((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyR;scCs|jj||dS(N(R/t __setitem__(RR3R!((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyR<scCs|jj|S(N(R/t __delitem__(RR3((s</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pyR=scCs|jjdS(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       cBseZdZRS(cCs"tj|_tj|_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 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</opt/alt/python27/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</opt/alt/python27/lib/python2.7/site-packages/beaker/util.pytverify_optionss*  +    cCsGx@|D]8\}}}||krt||||||sJ         !      =      )