/opt/alt/python37/lib/python3.7/site-packages/beaker
NameSizeModeActions
crypto/-0755rm
ext/-0755rm
__pycache__/-0755rm
cache.py219170644editdlrm
cache.pyc228710644editdlrm
cache.pyo228710644editdlrm
container.py240790644editdlrm
container.pyc299380644editdlrm
container.pyo299380644editdlrm
converters.py8980644editdlrm
converters.pyc11980644editdlrm
converters.pyo11980644editdlrm
cookie.py31890644editdlrm
cookie.pyc22850644editdlrm
cookie.pyo22850644editdlrm
exceptions.py4430644editdlrm
exceptions.pyc17600644editdlrm
exceptions.pyo17600644editdlrm
middleware.py64820644editdlrm
middleware.pyc68190644editdlrm
middleware.pyo68190644editdlrm
session.py328270644editdlrm
session.pyc333150644editdlrm
session.pyo332270644editdlrm
synchronization.py115250644editdlrm
synchronization.pyc139330644editdlrm
synchronization.pyo139330644editdlrm
util.py171180644editdlrm
util.pyc217010644editdlrm
util.pyo216250644editdlrm
_compat.py42560644editdlrm
_compat.pyc61010644editdlrm
_compat.pyo61010644editdlrm
__init__.py230644editdlrm
__init__.pyc1840644editdlrm
__init__.pyo1840644editdlrm
Edit: /opt/alt/python37/lib/python3.7/site-packages/beaker/util.pyc (21701B)
[c@sdZddkZddkZddkZddklZlZlZlZl Z l Z l Z l Z l Z lZyddkZWnej oddkZnXddklZlZddkZddkZddkZddkZddkZddkZddkZddkZddkZddkZddkl Z ddk!l"Z"ddkl#Z$d Z%d d d d dddgZ&dZ'ddZ)dZ*dZ+dZ,ddZ-dZ.d e/fdYZ0d e/fdYZ1d e1fdYZ2da3dde4dZ5dZ6dZ7d Z8d!Z9d"Z:d#Z;e4d$Z<d%Z=d&Z>d'e/fd(YZ?d)e/fd*YZ@d+ZAd,ZBd-ZCd.ZDdS(/sBeaker utilitiesiNi( tPY2t string_typet unicode_texttNoneTypet dictkeyslisttim_classtim_functpickletfunc_signaturetdefault_im_func(tdatetimet timedelta(tasbool(t exceptions(tlocalit ThreadLocaltWeakValuedRegistrytSyncDictt encoded_pathtverify_directoryt serializet deserializecCs ||_|S(sReturn a function with a given __name__. Will assign to __name__ and return the original function if possible on the Python implementation, otherwise a new function will be constructed. (t__name__(tfntname((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pytfunction_named&s cs9piddklfd}|S(s!Skip a test if predicate is true.i(tSkipTestcs1ifd}t|S(Ncs;o df}|n||SdS(Ns'%s' skipped: %s((targstkwtmsg(t predicateRtreasontfn_nameR(s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pytmaybe:s   (RR(RR!(RRR(R Rs</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pytdecorate7s (RtnoseR(RRR"((RRRs</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pytskip_if1s cOsHy|||t}Wn|j o t}nX|p tddS(sGAssert the given exception is raised by the given function + arguments.s#Callable did not raise an exceptionN(tFalsetTruetAssertionError(t except_clst callable_RRtsuccess((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pyt assert_raisesEs    cCsad}xTti|tip=y|d7}ti|Wq |djoqXq Xq WdS(scverifies and creates a directory. tries to ignore collisions with other threads and processes.iiiN(tostaccesstF_OKtmakedirs(tdirttries((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pyRRs  cCs:tt|i}|o|ddjotStSdS(s8Return True if the given function has a 'self' argument.itselftclsN(sselfscls(tlistRt parametersR&R%(tfuncR((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pyt has_self_arg`sicCsDt|toti|tid|nti|d|dS(sIssue a warning.t stacklevelN(t isinstanceRtwarningstwarnR t BeakerWarning(RR8((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pyR;iscsfd}|S(Ncs8fd}i|_dif|_|S(Ncs titd||S(Ni(R:R;tDeprecationWarning(Rtkargs(tmessageR(s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pytdeprecated_methodsss%s %s(Rt__doc__(RR@(R?(Rs</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pytwrapperrs ((R?RB((R?s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pyt deprecatedqscBsDeZdZdZdZdZdZddZdZ RS(s$stores a value on a per-thread basist_tlocalcCst|_dS(N(RD(R2((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pyt__init__scCs||i_dS(N(RDtvalue(R2RF((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pytputscCst|idS(NRF(thasattrRD(R2((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pythasscCst|id|S(NRF(tgetattrRD(R2tdefault((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pytgetscCs |i`dS(N(RDRF(R2((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pytremovesN( Rt __module__RAt __slots__RERGRItNoneRLRM(((s</opt/alt/python37/lib/python3.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. cCsti|_h|_dS(N(t _threadingtLocktmutextdict(R2((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pyREscOscy6||ijo |i|S|i||||SWn&tj o|i||||SXdS(N(RTtsync_gettKeyError(R2tkeyt createfuncRtkwargs((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pyRLs  c Os|iizcy6||ijo |i|S|i||||SWn&tj o|i||||SXWd|iiXdS(N(RStacquireRTt_createRVtrelease(R2RWRXRRY((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pyRUs  cOs|||||<}|S(N((R2RWRXRRYtobj((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pyR[scCs ||ijS(N(RT(R2RW((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pythas_keyscCs|ii|S(N(RTt __contains__(R2RW((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pyR_scCs|ii|S(N(RTt __getitem__(R2RW((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pyR`scCs|ii||dS(N(RTt __setitem__(R2RWRF((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pyRascCs|ii|S(N(RTt __delitem__(R2RW((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pyRbscCs|iidS(N(RTtclear(R2((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pyRcs( RRNRARERLRUR[R^R_R`RaRbRc(((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pyRs       cBseZdZRS(cCs"ti|_ti|_dS(N(RQtRLockRStweakreftWeakValueDictionaryRT(R2((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pyREs(RRNRE(((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pyRss.encc Csdi|}tdjoddklan|oEt|tot|idi}q|t|i}nti i |}g}x+t d|D]}|i |d|!qWti i||}t |ti i|||S(ssGenerate a unique file-accessible path from the given list of identifiers starting at the given root directory.t_i(tsha1sutf-8iiN(tjoinRhRPt beaker.cryptoR9Rtencodet hexdigestR,tpathtbasenametrangetappendR( troott identifierst extensiontdepthtdigest_filenamestidentttokenstdR0((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pyRs  cCsSt|to|St|totid|o t|StddS(Ns^\d+$sThis is not a proper int(R9tintRtretmatcht Exception(R]((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pytasints # cCspt||p*t|tp |f}nt}x|D]}y|ttfjo4g}|idD]}||iqj~}nu|tjo t}nR|tjo t }n;|t t fjo't||pt d|qn||}t }WnnX|oPq:q:W|pt |qln3t|to"|i ot d|n|S(Nt,s%s requires a timedelta types!Empty strings are invalid for: %s(R9ttupleR%R4tsplittstriptboolR RyR}R R R|R&tstr(toptttypesterrortcoercedttypt_[1]tx((s</opt/alt/python37/lib/python3.7/site-packages/beaker/util.pytverify_optionss6 4       cCsIxB|D]:\}}}||jot||||||sl   F                A    $  % .