5Xc$@sdZddlZejdckZejddkZejdeks^dfejkoYdgknrmednejdhkZejjd Z e ed Z e rej dikred nd ej kZddlZejeZerddlZn ddlZd Zddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.g!ZeZereZd/ZeefZefZn$ejZd0ZefZefZeZ eZ!ed1j"Z#d1j"Z$erNd2Z%d3Z&d4Z'd5Z(eZ)Z*d6Z+d7Z,d8Z-nKd9Z%d:Z&d;Z'd<Z(d=Z)e$Z*e.Z+d>Z,d?Z-ee%d@ee&dAee'dBee(dCee,dDee-dEere/fZ0e/e1fZ2ne/e3fZ0e/e3e1fZ2er_e4Z5dFZ6e7Z8dGZ9dHZ:dIZ;e<Z=n=e>Z5e7Z6ddJl?m8Z8m=Z=dKZ9dLZ:dMZ;ee;dNerdOZ@ndPZ@dQZAdRZBdSZCereddTdUdVddVddWZeDedXZEn*eddYdUdZddYdd[Zd\ZEerOd]ed,= 3.2 (as of passlib 1.7)itjavatpypy_version_infos0passlib requires pypy >= 2.0 (as of passlib 1.7)tPystoncCs ||_dS(sadd docstring to an objectN(t__doc__(tobjtdoc((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pytadd_doc)stPY2tPY3tPY26tBytesIOtStringIOtNativeStringIOtSafeConfigParsertprint_t int_typest num_typestunicode_or_bytes_typestnative_string_typestutunicodet uascii_to_strt bascii_to_strt str_to_uasciit str_to_basciit join_unicodet join_bytestjoin_byte_valuestjoin_byte_elemstbyte_elem_valuetiter_byte_valuestirangetimaptlmapt iteritemst itervaluestnextt OrderedDicttget_method_functionRcCst|tst|S(N(t isinstancetstrtAssertionError(ts((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyRascCs"t|tst|jdS(Ntunicode_escape(R'R(R)tdecode(R*((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyRkstcCst|tst|S(N(R'RR)(R*((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyRscCs"t|tst|jdS(Ntascii(R'tbytesR)R,(R*((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyRscCst|tst|S(N(R'R(R)(R*((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyRscCs"t|tst|jdS(NR.(R'R(R)tencode(R*((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyRscCst|tst|S(N(R'tintR)(telem((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyRscCst|tst|S(N(R'R/R)(R*((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyRscCs#t|tstd|DS(Ncss|]}t|gVqdS(N(R/(t.0tc((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pys s(R'R/R)(R*((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pytiter_byte_charsscCs"t|tst|jdS(NR.(R'RR)R0(R*((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyRscCst|tst|S(N(R'R/R)(R*((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyRscCs"t|tst|jdS(NR.(R'R(R)R,(R*((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyRscCst|tst|S(N(R'R(R)(R*((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyRscCstd|DS(Ncss|]}t|VqdS(N(tchr(R3tv((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pys s(R(tvalues((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyRscCs#t|tstd|DS(Ncss|]}t|VqdS(N(tord(R3R4((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pys s(R'R/R)(R*((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyRscCst|tst|S(N(R'R/R)(R*((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyR5ss-helper to convert ascii unicode -> native strs+helper to convert ascii bytes -> native strs-helper to convert ascii native str -> unicodes+helper to convert ascii native str -> bytess2iterate over byte string as sequence of ints 0-255s6iterate over byte string as sequence of 1-byte stringscOstt||S(N(tlisttmap(tatk((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyR!scCs |jS(N(titems(td((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyR"scCs |jS(N(R8(R?((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyR#scCs|jS(N(t__next__(R((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyt nextgetters(R tizipcCs |jS(N(R"(R?((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyR"scCs |jS(N(R#(R?((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyR#scCs|jS(N(R$(R((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyRAss;return function that yields successive values from iterablet__func__tim_funccCst|t|S(s4given (potential) method, return underlying function(tgetattrtmethod_function_attr(tfunc((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyR&scCstr |S|jS(s0given unbound method, return underlying function(RRC(RG((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pytget_unbound_method_functionscCs d|_|S(s backward compat hack to suppress exception cause in python3.3+ one python < 3.3 support is dropped, can replace all uses with "raise exc from None" N(tNonet __cause__(texc((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pytsuppress_cause"s s io.BytesIOt UnicodeIOs io.StringIOsconfigparser.ConfigParsertprintscStringIO.StringIOsStringIO.StringIOsConfigParser.SafeConfigParserc Os|jdtj}|jdd}|jdd}|rNtdn|dkr^dSt|tpt|tptd|D}|dkr|rtdnd}nt|t stdn|dkr|rtd nd }nt|t std nt }|j }xO|D]G}|rGt }n ||t|t sot|}n||q2W||dS( sThe new-style print function.tfiletseptendsinvalid keyword argumentsNcss|]}t|tVqdS(N(R'R(R3targ((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pys Oss send must be None or a stringt ssep must be None or a string(tpoptsyststdoutRIt TypeErrorR'RtanyRRtTruetwritetFalset basestringR(( targstkwdstfpRPRQt want_unicodetfirstRZRR((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyR@s6       s.passlib.utils.compat._ordered_dict.OrderedDictscollections.OrderedDict(t ModuleTypecCs@|jdd\}}t|d|gdd}t||S(sChelper to import object from module; accept format `path.to.object`t.itfromlisttleveli(trsplitt __import__RE(tsourcetmodnametmodattrtmod((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyt_import_objectwst_LazyOverlayModulecBsDeZdZedZddZdZdZdZ RS(sgproxy module which overlays original module, and lazily imports specified attributes. this is mainly used to prevent importing of resources that are only needed by certain password hashes, yet allow them to be imported from a single location. used by :mod:`passlib.utils`, :mod:`passlib.crypto`, and :mod:`passlib.utils.compat`. cCs0tj|}||||}|tj|<|S(N(RUtmodules(tclstnametattrmaptorigtself((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pytreplace_modules  cCs8tj||||_||_tj||_dS(N(Rbt__init__t_LazyOverlayModule__attrmapt_LazyOverlayModule__proxytloggingt getLoggert_LazyOverlayModule__log(RsRpRqtproxy((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyRus  cCs|j}|r+t||r+t||S|j}||kr||}t|rb|}n t|}t||||jjd|||St d|fdS(Nsloaded lazy attr %r: %rs%'module' object has no attribute '%s'( RwthasattrRERvtcallableRltsetattrRztdebugtAttributeError(RstattrR{RqRhtvalue((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyt __getattr__s        cCs*|j}|rt|Stj|SdS(N(RwtreprRbt__repr__(RsR{((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyRs  cCsjtt|j}|j|j|j|j|j}|dk r`|jt|nt|S(N( tsettdirt __class__tupdatet__dict__RvRwRIR:(RstattrsR{((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyt__dir__s  N( t__name__t __module__Rt classmethodRtRIRuRRR(((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyRm}s     (ii(ii(ii(ii(ii(ii(ii(KRRUt version_infoRRt RuntimeErrorR tplatformt startswithtJYTHONR|tPYPYRtversiontPYSTONRxRyRtlogtbuiltinst __builtin__Rt__all__tdictt _lazy_attrsR(RRR/RRR\tunicode_or_bytestunicode_or_strtjoinRRRRRRRRRRR5R9R1RtfloatRtlongtrangeRR!R;R R"R#RAtzipRBtxranget itertoolsRFR&RHRLRERttypesRbRlRmRt(((sA/usr/lib/python2.7/site-packages/passlib/utils/compat/__init__.pyts .                                                      -   :