File "compat.cpython-37.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python37/lib/python3.7/site-packages/distlib/__pycache__/compat.cpython-37.pyc
File size: 30.83 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit

B

:a+@sddlmZddlZddlZddlZyddlZWnek
rHdZYnXejddkrfddlmZe	fZ
eZddl
mZddlZddlZddlmZmZmZmZmZddlmZmZmZmZmZm Z m!Z!dd	Zddl"Z"dd
l"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+erddl"m,Z,ddl-Z-ddl.Z.ddl/Z0ddl1m1Z1ddl2Z2e3Z3dd
l4m5Z6ddl4m7Z8nddl9mZe:fZ
e:Zddl9m;ZddlZddlZddl<Z<ddl=mZmZmZmZmZmZmZm!Z!ddl>m$Z$mZm#Z#mZmZm'Z'm(Z(m)Z)m*Z*m+Z+er
ddl>m,Z,ddl?m&Z&m%Z%m Z ddl@mAZ-ddl>mBZ"ddlCmAZ.ddl0Z0ddlDm1Z1ddlEmFZ2eGZ3ddl4m8Z8e6Z6yddlmHZHmIZIWn8ek
rGdddeJZId`ddZKddZHYnXyddl
mLZMWn&ek
rGdddeNZMYnXyddl<mOZOWn,ek
r8ejPejQBdfd d!ZOYnXdd"lRmSZTeUeTd#rXeTZSn,dd$lRmVZWGd%d&d&eWZVGd'd(d(eTZSydd)lXmYZYWnek
rd*d+ZYYnXddl<Z<ddlZZZye[Z[Wn*e\k
rdd,l]m^Z^d-d.Z[YnXyej_Z_ej`Z`WnHeak
rPebp&d/Zcecd0kr8d1Zdnd2Zdd3d4Z_d5d6Z`YnXydd7lemfZfWnHek
rdd8lgmhZhmiZiddlZejd9Zkd:d;Zld<d=ZfYnXydd>lmmnZnWn"ek
rdd>lomnZnYnXejdd?d@kre1jpZpnddAlmmpZpyddBlqmrZrWndek
r~ddClqmsZsyddDltmuZvWn ek
rhdadFdGZvYnXGdHdIdIesZrYnXyddJlwmxZxWn ek
rdbdKdLZxYnXyddMlqmyZyWnek
rLyddNlzm{Z|Wn"ek
rddNl}m{Z|YnXyddOl~mZmZmZWnek
r6YnXGdPdQdQeZyYnXyddRlmZmZWnvek
rejdSejZdTdUZGdVdWdWeZdcdXdYZGdZd[d[eZGd\d]d]eZGd^d_d_eNZYnXdS)d)absolute_importN)StringIO)FileType)urlparse
urlunparseurljoinurlsplit
urlunsplit)urlretrievequoteunquoteurl2pathnamepathname2urlContentTooShortError	splittypecCst|tr|d}t|S)Nzutf-8)
isinstanceunicodeencode_quote)sr?/opt/alt/python37/lib/python3.7/site-packages/distlib/compat.pyrs

r)	RequesturlopenURLError	HTTPErrorHTTPBasicAuthHandlerHTTPPasswordMgrHTTPHandlerHTTPRedirectHandlerbuild_opener)HTTPSHandler)
HTMLParser)ifilter)ifilterfalse)
TextIOWrapper)rrrrr
r	r
r)
rrrrrrrrr r!)rrr)filterfalse)match_hostnameCertificateErrorc@seZdZdS)r)N)__name__
__module____qualname__rrrrr)_sr)c
Csg}|sdS|d}|d|dd}}|d}||krNtdt||sb||kS|dkrv|dn>|d	s|d	r|t|n|t|	d
dx|D]}|t|qWt
dd
|dtj}	|	
|S)zpMatching according to RFC 6125, section 6.4.3

        http://tools.ietf.org/html/rfc6125#section-6.4.3
        F.rr-N*z,too many wildcards in certificate DNS name: z[^.]+zxn--z\*z[^.]*z\Az\.z\Z)splitcountr)reprlowerappend
startswithreescapereplacecompilejoin
IGNORECASEmatch)
ZdnhostnameZ
max_wildcardsZpatspartsZleftmost	remainderZ	wildcardsfragpatrrr_dnsname_matchcs(


rBcCs|stdg}|dd}x0|D](\}}|dkr"t||r@dS||q"W|sxF|ddD]6}x0|D](\}}|dkrjt||rdS||qjWq`Wt|dkrtd	|d
tt|fn*t|dkrtd||dfntd
dS)a=Verify that *cert* (in decoded format as returned by
        SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 and RFC 6125
        rules are followed, but IP addresses are not accepted for *hostname*.

        CertificateError is raised on failure. On success, the function
        returns nothing.
        ztempty or no certificate, match_hostname needs a SSL socket or SSL context with either CERT_OPTIONAL or CERT_REQUIREDZsubjectAltNamerZDNSNZsubjectZ
commonNamer-z&hostname %r doesn't match either of %sz, zhostname %r doesn't match %rrz=no appropriate commonName or subjectAltName fields were found)	
ValueErrorgetrBr4lenr)r:mapr2)Zcertr=ZdnsnamesZsankeyvaluesubrrrr(s.

r()SimpleNamespacec@seZdZdZddZdS)	ContainerzR
        A generic container for when multiple values need to be returned
        cKs|j|dS)N)__dict__update)selfkwargsrrr__init__szContainer.__init__N)r*r+r,__doc__rPrrrrrKsrK)whichcs"dd}tjr&||r"SdS|dkr>tjdtj}|sFdS|tj}tj	dkrtj
|krt|dtj
tjddtj}tfd	d
|Drg}q‡fdd|D}ng}t
}xT|D]L}tj|}||kr||x(|D] }	tj||	}
||
|r|
SqWqWdS)
aKGiven a command, mode, and a PATH string, return the path which
        conforms to the given mode on the PATH, or None if there is no such
        file.

        `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
        of os.environ.get("PATH"), or can be overridden with a custom search
        path.

        cSs&tj|o$t||o$tj|S)N)ospathexistsaccessisdir)fnmoderrr
_access_checkszwhich.<locals>._access_checkNPATHwin32rPATHEXTc3s |]}|VqdS)N)r3endswith).0ext)cmdrr	<genexpr>szwhich.<locals>.<genexpr>csg|]}|qSrr)r`ra)rbrr
<listcomp>szwhich.<locals>.<listcomp>)rSrTdirnameenvironrDdefpathr0pathsepsysplatformcurdirinsertanysetnormcaseaddr:)rbrYrTrZpathextfilesseendirnormdirthefilenamer)rbrrRs8







rR)ZipFile	__enter__)
ZipExtFilec@s$eZdZddZddZddZdS)rzcCs|j|jdS)N)rLrM)rNbaserrrrPszZipExtFile.__init__cCs|S)Nr)rNrrrryszZipExtFile.__enter__cGs|dS)N)close)rNexc_inforrr__exit__szZipExtFile.__exit__N)r*r+r,rPryr~rrrrrzsrzc@s$eZdZddZddZddZdS)rxcCs|S)Nr)rNrrrry#szZipFile.__enter__cGs|dS)N)r|)rNr}rrrr~&szZipFile.__exit__cOstj|f||}t|S)N)BaseZipFileopenrz)rNargsrOr{rrrr*szZipFile.openN)r*r+r,ryr~rrrrrrx"srx)python_implementationcCs0dtjkrdStjdkrdStjdr,dSdS)z6Return a string identifying the Python implementation.ZPyPyjavaZJythonZ
IronPythonZCPython)riversionrSrwr5rrrrr1s

r)CallablecCs
t|tS)N)rr)objrrrcallableCsrzutf-8mbcsstrictsurrogateescapecCs:t|tr|St|tr$|ttStdt|jdS)Nzexpect bytes or str, not %s)	rbytes	text_typer_fsencoding	_fserrors	TypeErrortyper*)filenamerrrfsencodeWs

rcCs:t|tr|St|tr$|ttStdt|jdS)Nzexpect bytes or str, not %s)	rrrdecoderrrrr*)rrrrfsdecode`s

r)detect_encoding)BOM_UTF8lookupzcoding[:=]\s*([-\w.]+)cCsH|dddd}|dks*|dr.dS|dks@|drDd	S|S)
z(Imitates get_normal_name in tokenizer.c.N_-zutf-8zutf-8-)zlatin-1z
iso-8859-1ziso-latin-1)zlatin-1-ziso-8859-1-ziso-latin-1-z
iso-8859-1)r3r8r5)orig_encencrrr_get_normal_nameqs
rcsyjjWntk
r$dYnXdd}d}fdd}fdd}|}|trpd|d	d}d
}|s||gfS||}|r||gfS|}|s||gfS||}|r|||gfS|||gfS)a?
        The detect_encoding() function is used to detect the encoding that should
        be used to decode a Python source file.  It requires one argument, readline,
        in the same way as the tokenize() generator.

        It will call readline a maximum of twice, and return the encoding used
        (as a string) and a list of any lines (left as bytes) it has read in.

        It detects the encoding from the presence of a utf-8 bom or an encoding
        cookie as specified in pep-0263.  If both a bom and a cookie are present,
        but disagree, a SyntaxError will be raised.  If the encoding cookie is an
        invalid charset, raise a SyntaxError.  Note that if a utf-8 bom is found,
        'utf-8-sig' is returned.

        If no encoding is specified, then the default of 'utf-8' will be returned.
        NFzutf-8cs yStk
rdSXdS)N)
StopIterationr)readlinerrread_or_stopsz%detect_encoding.<locals>.read_or_stopcsy|d}Wn4tk
rBd}dk	r6d|}t|YnXt|}|sVdSt|d}yt|}Wn:tk
rdkrd|}nd|}t|YnXr|j	dkr؈dkrd}n
d}t||d	7}|S)
Nzutf-8z'invalid or missing encoding declarationz{} for {!r}rzunknown encoding: zunknown encoding for {!r}: {}zencoding problem: utf-8z encoding problem for {!r}: utf-8z-sig)
rUnicodeDecodeErrorformatSyntaxError	cookie_refindallrrLookupErrorrw)lineline_stringmsgZmatchesencodingcodec)	bom_foundrrrfind_cookies6



z$detect_encoding.<locals>.find_cookieTrz	utf-8-sig)__self__rwAttributeErrorr5r)rrdefaultrrfirstsecondr)rrrrr|s4
&


r)r7)r)unescape)ChainMap)MutableMapping)recursive_repr...csfdd}|S)zm
            Decorator to make a repr function return fillvalue for a recursive
            call
            csLtfdd}td|_td|_td|_tdi|_|S)Nc	sBt|tf}|krS|z|}Wd|X|S)N)id	get_identrpdiscard)rNrGresult)	fillvaluerepr_running
user_functionrrwrappers
z=_recursive_repr.<locals>.decorating_function.<locals>.wrapperr+rQr*__annotations__)rngetattrr+rQr*r)rr)r)rrrdecorating_functionsz,_recursive_repr.<locals>.decorating_functionr)rrr)rr_recursive_reprsrc@seZdZdZddZddZddZd'd	d
ZddZd
dZ	ddZ
ddZeddZ
eddZddZeZddZeddZddZdd Zd!d"Zd#d$Zd%d&ZdS)(ra A ChainMap groups multiple dicts (or other mappings) together
        to create a single, updateable view.

        The underlying mappings are stored in a list.  That list is public and can
        accessed or updated using the *maps* attribute.  There is no other state.

        Lookups search the underlying mappings successively until a key is found.
        In contrast, writes, updates, and deletions only operate on the first
        mapping.

        cGst|pig|_dS)zInitialize a ChainMap by setting *maps* to the given mappings.
            If no mappings are provided, a single empty dictionary is used.

            N)listmaps)rNrrrrrPszChainMap.__init__cCst|dS)N)KeyError)rNrGrrr__missing__szChainMap.__missing__c	Cs8x,|jD]"}y||Stk
r(YqXqW||S)N)rrr)rNrGmappingrrr__getitem__s
zChainMap.__getitem__NcCs||kr||S|S)Nr)rNrGrrrrrD$szChainMap.getcCsttj|jS)N)rErnunionr)rNrrr__len__'szChainMap.__len__cCsttj|jS)N)iterrnrr)rNrrr__iter__*szChainMap.__iter__cstfdd|jDS)Nc3s|]}|kVqdS)Nr)r`m)rGrrrc.sz(ChainMap.__contains__.<locals>.<genexpr>)rmr)rNrGr)rGr__contains__-szChainMap.__contains__cCs
t|jS)N)rmr)rNrrr__bool__0szChainMap.__bool__cCsd|dtt|jS)Nz{0.__class__.__name__}({1})z, )rr:rFr2r)rNrrr__repr__3szChainMap.__repr__cGs|tj|f|S)z?Create a ChainMap with a single dict created from the iterable.)dictfromkeys)clsiterablerrrrr8szChainMap.fromkeyscCs$|j|jdf|jddS)zHNew ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]rr-N)	__class__rcopy)rNrrrr=sz
ChainMap.copycCs|jif|jS)z;New ChainMap with a new dict followed by all previous maps.)rr)rNrrr	new_childCszChainMap.new_childcCs|j|jddS)zNew ChainMap from maps[1:].r-N)rr)rNrrrparentsGszChainMap.parentscCs||jd|<dS)Nr)r)rNrGrHrrr__setitem__LszChainMap.__setitem__cCs8y|jd|=Wn"tk
r2td|YnXdS)Nrz(Key not found in the first mapping: {!r})rrr)rNrGrrr__delitem__OszChainMap.__delitem__cCs0y|jdStk
r*tdYnXdS)zPRemove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.rz#No keys found in the first mapping.N)rpopitemr)rNrrrrUszChainMap.popitemcGs>y|jdj|f|Stk
r8td|YnXdS)zWRemove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].rz(Key not found in the first mapping: {!r}N)rpoprr)rNrGrrrrr\szChainMap.popcCs|jddS)z'Clear maps[0], leaving maps[1:] intact.rN)rclear)rNrrrrcszChainMap.clear)N)r*r+r,rQrPrrrDrrrrrrclassmethodrr__copy__rpropertyrrrrrrrrrrrs(
r)cache_from_sourcecCs0|dst|dkrd}|r$d}nd}||S)Nz.pyTco)r_AssertionError)rTdebug_overridesuffixrrrrjsr)OrderedDict)r)KeysView
ValuesView	ItemsViewc@seZdZdZddZejfddZejfddZdd	Zd
dZ	dd
Z
d6ddZddZddZ
ddZddZddZddZddZeZeZefdd Zd7d"d#Zd8d$d%Zd&d'Zd(d)Zed9d*d+Zd,d-Zd.d/Zd0d1Zd2d3Z d4d5Z!d!S):rz)Dictionary that remembers insertion ordercOsnt|dkrtdt|y
|jWn6tk
r\g|_}||dg|dd<i|_YnX|j||dS)zInitialize an ordered dictionary.  Signature is the same as for
            regular dictionaries, but keyword arguments are not recommended
            because their insertion order is arbitrary.

            r-z$expected at most 1 arguments, got %dN)rEr_OrderedDict__rootr_OrderedDict__map_OrderedDict__update)rNrkwdsrootrrrrPs

zOrderedDict.__init__cCsF||kr6|j}|d}|||g|d<|d<|j|<||||dS)z!od.__setitem__(i, y) <==> od[i]=yrr-N)rr)rNrGrHZdict_setitemrlastrrrrs
 zOrderedDict.__setitem__cCs0||||j|\}}}||d<||d<dS)z od.__delitem__(y) <==> del od[y]r-rN)rr)rNrGZdict_delitem	link_prev	link_nextrrrrs
zOrderedDict.__delitem__ccs2|j}|d}x||k	r,|dV|d}qWdS)zod.__iter__() <==> iter(od)r-rN)r)rNrcurrrrrrs


zOrderedDict.__iter__ccs2|j}|d}x||k	r,|dV|d}qWdS)z#od.__reversed__() <==> reversed(od)rrN)r)rNrrrrr__reversed__s


zOrderedDict.__reversed__cCshyDx|jD]}|dd=qW|j}||dg|dd<|jWntk
rXYnXt|dS)z.od.clear() -> None.  Remove all items from od.N)r
itervaluesrrrr)rNZnoderrrrrszOrderedDict.clearTcCs||std|j}|r8|d}|d}||d<||d<n |d}|d}||d<||d<|d}|j|=t||}||fS)zod.popitem() -> (k, v), return and remove a (key, value) pair.
            Pairs are returned in LIFO order if last is true or FIFO order if false.

            zdictionary is emptyrr-r)rrrrr)rNrrlinkrrrGrHrrrrs 
zOrderedDict.popitemcCst|S)zod.keys() -> list of keys in od)r)rNrrrkeysszOrderedDict.keyscsfddDS)z#od.values() -> list of values in odcsg|]}|qSrr)r`rG)rNrrrdsz&OrderedDict.values.<locals>.<listcomp>r)rNr)rNrvaluesszOrderedDict.valuescsfddDS)z.od.items() -> list of (key, value) pairs in odcsg|]}||fqSrr)r`rG)rNrrrdsz%OrderedDict.items.<locals>.<listcomp>r)rNr)rNritemsszOrderedDict.itemscCst|S)z0od.iterkeys() -> an iterator over the keys in od)r)rNrrriterkeysszOrderedDict.iterkeysccsx|D]}||VqWdS)z2od.itervalues -> an iterator over the values in odNr)rNkrrrrs
zOrderedDict.itervaluesccs x|D]}|||fVqWdS)z=od.iteritems -> an iterator over the (key, value) items in odNr)rNrrrr	iteritemss
zOrderedDict.iteritemscOst|dkr tdt|fn|s,td|d}d}t|dkrL|d}t|trrx^|D]}||||<q\WnDt|drx8|D]}||||<qWnx|D]\}}|||<qWx|D]\}}|||<qWdS)	aod.update(E, **F) -> None.  Update od from dict/iterable E and F.

            If E is a dict instance, does:           for k in E: od[k] = E[k]
            If E has a .keys() method, does:         for k in E.keys(): od[k] = E[k]
            Or if E is an iterable of items, does:   for k, v in E: od[k] = v
            In either case, this is followed by:     for k, v in F.items(): od[k] = v

            rz8update() takes at most 2 positional arguments (%d given)z,update() takes at least 1 argument (0 given)rrr-rN)rErrrhasattrrr)rrrNotherrGrHrrrrMs&	


zOrderedDict.updatecCs0||kr||}||=|S||jkr,t||S)zod.pop(k[,d]) -> v, remove specified key and return the corresponding value.
            If key is not found, d is returned if given, otherwise KeyError is raised.

            )_OrderedDict__markerr)rNrGrrrrrr&s
zOrderedDict.popNcCs||kr||S|||<|S)zDod.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in odr)rNrGrrrr
setdefault3szOrderedDict.setdefaultcCs^|si}t|tf}||kr"dSd||<z&|s>d|jjfSd|jj|fS||=XdS)zod.__repr__() <==> repr(od)z...r-z%s()z%s(%r)N)r
_get_identrr*r)rNZ
_repr_runningZcall_keyrrrr:szOrderedDict.__repr__cs\fddD}t}xttD]}||dq*W|rPj|f|fSj|ffS)z%Return state information for picklingcsg|]}||gqSrr)r`r)rNrrrdJsz*OrderedDict.__reduce__.<locals>.<listcomp>N)varsrrrr)rNrZ	inst_dictrr)rNr
__reduce__HszOrderedDict.__reduce__cCs
||S)z!od.copy() -> a shallow copy of od)r)rNrrrrRszOrderedDict.copycCs |}x|D]}|||<qW|S)zOD.fromkeys(S[, v]) -> New ordered dictionary with keys from S
            and values equal to v (which defaults to None).

            r)rrrHdrGrrrrVs
zOrderedDict.fromkeyscCs6t|tr*t|t|ko(||kSt||S)zod.__eq__(y) <==> od==y.  Comparison to another OD is order-sensitive
            while comparison to a regular mapping is order-insensitive.

            )rrrErr__eq__)rNrrrrr	as
 zOrderedDict.__eq__cCs
||kS)Nr)rNrrrr__ne__jszOrderedDict.__ne__cCst|S)z@od.viewkeys() -> a set-like object providing a view on od's keys)r)rNrrrviewkeysoszOrderedDict.viewkeyscCst|S)z<od.viewvalues() -> an object providing a view on od's values)r)rNrrr
viewvaluessszOrderedDict.viewvaluescCst|S)zBod.viewitems() -> a set-like object providing a view on od's items)r)rNrrr	viewitemswszOrderedDict.viewitems)T)N)N)N)"r*r+r,rQrPrrrrrrrrrrrrrrMrobjectrrrrrrrrr	r
rrr
rrrrrs:
	




	r)BaseConfiguratorvalid_identz^[a-z_][a-z0-9_]*$cCst|}|std|dS)Nz!Not a valid Python identifier: %rT)
IDENTIFIERr<rC)rrrrrrs
rc@s"eZdZdZddZdddZdS)ConvertingDictz A converting dictionary wrapper.cCsJt||}|j|}||k	rF|||<t|tttfkrF||_||_	|S)N)
rrconfiguratorconvertrrConvertingListConvertingTupleparentrG)rNrGrHrrrrrs
zConvertingDict.__getitem__NcCsLt|||}|j|}||k	rH|||<t|tttfkrH||_||_	|S)N)
rrDrrrrrrrrG)rNrGrrHrrrrrDs
zConvertingDict.get)N)r*r+r,rQrrDrrrrrsrcCsDt|||}|j|}||k	r@t|tttfkr@||_||_	|S)N)
rrrrrrrrrrG)rNrGrrHrrrrrs
rc@s"eZdZdZddZdddZdS)	rzA converting list wrapper.cCsJt||}|j|}||k	rF|||<t|tttfkrF||_||_	|S)N)
rrrrrrrrrrG)rNrGrHrrrrrs
zConvertingList.__getitem__cCs<t||}|j|}||k	r8t|tttfkr8||_|S)N)	rrrrrrrrr)rNidxrHrrrrrs
zConvertingList.popN)r)r*r+r,rQrrrrrrrsrc@seZdZdZddZdS)rzA converting tuple wrapper.cCsBt||}|j|}||k	r>t|tttfkr>||_||_	|S)N)
tuplerrrrrrrrrG)rNrGrHrrrrrs
zConvertingTuple.__getitem__N)r*r+r,rQrrrrrrsrc@seZdZdZedZedZedZedZ	edZ
ddd	Zee
Zd
dZdd
ZddZddZddZddZddZdS)rzQ
        The configurator base class which defines some useful defaults.
        z%^(?P<prefix>[a-z]+)://(?P<suffix>.*)$z^\s*(\w+)\s*z^\.\s*(\w+)\s*z^\[\s*(\w+)\s*\]\s*z^\d+$ext_convertcfg_convert)raZcfgcCst||_||j_dS)N)rconfigr)rNrrrrrPs
zBaseConfigurator.__init__c		Cs|d}|d}y`||}xP|D]H}|d|7}yt||}Wq&tk
rl||t||}Yq&Xq&W|Stk
rtdd\}}td||f}|||_	|_
|YnXdS)zl
            Resolve strings to objects using standard import and attribute
            syntax.
            r.rr-NzCannot resolve %r: %s)r0rimporterrrImportErrorrir}rC	__cause__
__traceback__)	rNrrwusedfoundr@etbvrrrresolves"




zBaseConfigurator.resolvecCs
||S)z*Default converter for the ext:// protocol.)r')rNrHrrrrszBaseConfigurator.ext_convertcCs|}|j|}|dkr&td|n||d}|j|d}x|r|j|}|rp||d}nd|j|}|r|d}|j|s||}n2yt	|}||}Wnt
k
r||}YnX|r||d}qJtd||fqJW|S)z*Default converter for the cfg:// protocol.NzUnable to convert %rrzUnable to convert %r at %r)WORD_PATTERNr<rCendrgroupsDOT_PATTERN
INDEX_PATTERN
DIGIT_PATTERNintr)rNrHrestrrrnrrrrs2
zBaseConfigurator.cfg_convertcCst|ts$t|tr$t|}||_nt|tsHt|trHt|}||_nzt|tslt|trlt|}||_nVt|tr|j	
|}|r|}|d}|j
|d}|r|d}t||}||}|S)z
            Convert values to an appropriate type. dicts, lists and tuples are
            replaced by their converting alternatives. Strings are checked to
            see if they have a conversion format and are converted if they do.
            prefixNr)rrrrrrrrstring_typesCONVERT_PATTERNr<	groupdictvalue_convertersrDr)rNrHrrr1	converterrrrrr.s*



zBaseConfigurator.convertcsrd}t|s||}dd}tfddD}|f|}|rnx |D]\}}t|||qVW|S)z1Configure an object with a user-supplied factory.z()r.Ncs g|]}t|r||fqSr)r)r`r)rrrrdQsz5BaseConfigurator.configure_custom.<locals>.<listcomp>)rrr'rrsetattr)rNrrpropsrOrrwrHr)rrconfigure_customJs


z!BaseConfigurator.configure_customcCst|trt|}|S)z0Utility function which converts lists to tuples.)rrr)rNrHrrras_tupleXs
zBaseConfigurator.as_tupleN)r*r+r,rQr6r9r3r(r+r,r-r5staticmethod
__import__rrPr'rrrr9r:rrrrrs 




"r)r-)r)N)N)Z
__future__rrSr6riZsslrversion_inforZ
basestringr2rrtypesrZ	file_typeZ__builtin__builtinsConfigParserconfigparserrrrr	r
Zurllibrrrr
rrrrZurllib2rrrrrrrr r!r"ZhttplibZ	xmlrpclibZQueueZqueuer#ZhtmlentitydefsZ	raw_input	itertoolsr$filterr%r'iostrr&shutilZurllib.parseZurllib.requestZurllib.errorZhttp.clientZclientZrequestZ
xmlrpc.clientZhtml.parserZ
html.entitiesZentitiesinputr(r)rCrBrJrKrrRF_OKX_OKzipfilerxrrrzZBaseZipExtFilerjr	sysconfigr	NameErrorcollections.abcrrrrgetfilesystemencodingrrtokenizercodecsrrr9rrZhtmlr7cgircollectionsrrreprlibrrimportlib.utilrrthreadrrZdummy_threadZ_abcollrrrrZlogging.configrrIrrrrrrrrrrr<module>s
$,(0
2+A


		
[
b
w