<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
3
Pfa                 @   s  d dl mZ d dlZd dlZd dlZyd dlZW n ek
rH   dZY nX ejd  dk r~d dlmZ e	fZ
eZd dlmZ d dlZd dlZddlmZ d dlmZmZmZmZmZ d d	lmZmZmZm Z m!Z!m"Z"m#Z# d
d Zd dl$Z$d dl$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z- er&d dl$m.Z. d dl/Z/d dl0Z0d dl1Z2d dl3m3Z3 d dl4Z4e5Z5d dl6m7Z8 d dl6m9Z: da;dd Z<nd dl=mZ e>fZ
e>Zd dl=m?Z d dlZd dlZd dlZd dl@mZmZmZm<Z<mZmZmZmZm#Z# d dlAm&Z&mZm%Z%m Z m!Z!m)Z)m*Z*m+Z+m,Z,m-Z- er&d dlAm.Z. d dlBm(Z(m'Z'm"Z" d dlCjDZ/d dlAjEZ$d dlFjDZ0d dl2Z2d dlGm3Z3 d dlHjIZ4eJZ5d dl6m:Z: e8Z8yd dlmKZKmLZL W n8 ek
r   G dd deMZLdcddZNdd ZKY nX yd dlmOZP W n& ek
r   G d d! d!eQZPY nX yd d"lmRZR W n, ek
rL   ejSejTB dfd#d$ZRY nX d d%lUmVZW eXeWd&rleWZVn,d d'lUmYZZ G d(d) d)eZZYG d*d+ d+eWZVyd d,l[m\Z\ W n ek
r   d-d. Z\Y nX yd dl]Z]W n" ek
r   dd/lm]Z] Y nX ye^Z^W n* e_k
r*   d d0l`maZa d1d2 Z^Y nX yejbZbejcZcW nB edk
r~   eje Zfefd3krfd4Zgnd5Zgd6d7 Zbd8d9 ZcY nX yd d:lhmiZi W nH ek
r   d d;ljmkZkmlZl d dlZejmd<Znd=d> Zod?d@ ZiY nX yd dAlpmqZq W n" ek
r   d dAlrmqZq Y nX ejddB ddk r,e3 jsZsnd dDlpmsZs yd dEl`mtZt W nd ek
r   d dFl`muZu yd dGlvmwZx W n  ek
r   dedIdJZxY nX G dKdL dLeuZtY nX yd dMlymzZz W n  ek
r   dfdNdOZzY nX yd dPl`m{Z{ W n ek
rz   yd dQl|m}Z~ W n" ek
r4   d dQlm}Z~ Y nX yd dRlmZmZmZ W n ek
rd   Y nX G dSdT dTeZ{Y nX yd dUlmZmZ W nv ek
r   ejmdVejZdWdX ZG dYdZ dZeZdgd[d\ZG d]d^ d^eZG d_d` d`eZG dadb dbeQZY nX dS )h    )absolute_importN   )StringIO)FileType   )shutil)urlparse
urlunparseurljoinurlsplit
urlunsplit)urlretrievequoteunquoteurl2pathnamepathname2urlContentTooShortError	splittypec             C   s   t | tr| jd} t| S )Nzutf-8)
isinstanceunicodeencode_quote)s r   /usr/lib/python3.6/compat.pyr      s    

r   )	RequesturlopenURLError	HTTPErrorHTTPBasicAuthHandlerHTTPPasswordMgrHTTPHandlerHTTPRedirectHandlerbuild_opener)HTTPSHandler)
HTMLParser)ifilter)ifilterfalsec             C   s<   t dkrddl}|jda t j| }|r4|jddS d| fS )zJsplituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'.Nr   z^(.*)@(.*)$r      )	_userprogrecompilematchgroup)hostr*   r,   r   r   r   	splituser4   s    

 r/   )TextIOWrapper)	r   r	   r
   r/   r   r   r   r   r   )
r   r   r   r   r   r   r    r!   r"   r#   )r   r   r   )filterfalse)match_hostnameCertificateErrorc               @   s   e Zd ZdS )r3   N)__name__
__module____qualname__r   r   r   r   r3   ^   s   r3   c       
      C   s   g }| sdS | j d}|d |dd  }}|jd}||krNtdt|  |sb| j |j kS |dkrv|jd n>|jd	s|jd	r|jtj| n|jtj|j	d
d x|D ]}|jtj| qW tj
ddj| d tj}	|	j|S )zpMatching according to RFC 6125, section 6.4.3

        http://tools.ietf.org/html/rfc6125#section-6.4.3
        F.r   r   N*z,too many wildcards in certificate DNS name: z[^.]+zxn--z\*z[^.]*z\Az\.z\Z)splitcountr3   reprlowerappend
startswithr*   escapereplacer+   join
IGNORECASEr,   )
ZdnhostnameZmax_wildcardsZpatspartsZleftmostZ	remainderZ	wildcardsfragZpatr   r   r   _dnsname_matchb   s(    


rF   c             C   s   | st dg }| jdf }x0|D ](\}}|dkr"t||r@dS |j| q"W |sxF| jdf D ]6}x0|D ](\}}|dkrjt||rdS |j| qjW q`W t|dkrtd|d	jtt|f n*t|dkrtd
||d f ntddS )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_REQUIREDZsubjectAltNameZDNSNZsubjectZ
commonNamer   z&hostname %r doesn't match either of %sz, zhostname %r doesn't match %rr   z=no appropriate commonName or subjectAltName fields were found)	
ValueErrorgetrF   r=   lenr3   rA   mapr;   )ZcertrC   ZdnsnamesZsankeyvaluesubr   r   r   r2      s.    

r2   )SimpleNamespacec               @   s   e Zd ZdZdd ZdS )	ContainerzR
        A generic container for when multiple values need to be returned
        c             K   s   | j j| d S )N)__dict__update)selfkwargsr   r   r   __init__   s    zContainer.__init__N)r4   r5   r6   __doc__rT   r   r   r   r   rO      s   rO   )whichc                s"  dd }t jj r&| |r" S dS |dkr>t jjdt j}|sFdS |jt j}tj	dkrt j
|krt|jdt j
 t jjddjt j}t fd	d
|D r g}q fdd|D }n g}t }xT|D ]L}t jj|}||kr|j| x(|D ] }	t jj||	}
||
|r|
S qW qW dS )aK  Given 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.

        c             S   s&   t jj| o$t j| |o$t jj|  S )N)ospathexistsaccessisdir)fnmoder   r   r   _access_check   s    zwhich.<locals>._access_checkNPATHZwin32r   ZPATHEXT c             3   s    | ]} j  j|j  V  qd S )N)r<   endswith).0ext)cmdr   r   	<genexpr>   s    zwhich.<locals>.<genexpr>c                s   g | ]} | qS r   r   )rb   rc   )rd   r   r   
<listcomp>   s    zwhich.<locals>.<listcomp>)rW   rX   dirnameenvironrH   defpathr9   pathsepsysplatformcurdirinsertanysetnormcaseaddrA   )rd   r]   rX   r^   ZpathextfilesseendirZnormdirZthefilenamer   )rd   r   rV      s8    






rV   )ZipFile	__enter__)
ZipExtFilec               @   s$   e Zd Zdd Zdd Zdd ZdS )ry   c             C   s   | j j|j  d S )N)rP   rQ   )rR   baser   r   r   rT     s    zZipExtFile.__init__c             C   s   | S )Nr   )rR   r   r   r   rx     s    zZipExtFile.__enter__c             G   s   | j   d S )N)close)rR   exc_infor   r   r   __exit__  s    zZipExtFile.__exit__N)r4   r5   r6   rT   rx   r}   r   r   r   r   ry     s   ry   c               @   s$   e Zd Zdd Zdd Zdd ZdS )rw   c             C   s   | S )Nr   )rR   r   r   r   rx   "  s    zZipFile.__enter__c             G   s   | j   d S )N)r{   )rR   r|   r   r   r   r}   %  s    zZipFile.__exit__c             O   s   t j| f||}t|S )N)BaseZipFileopenry   )rR   argsrS   rz   r   r   r   r   )  s    zZipFile.openN)r4   r5   r6   rx   r}   r   r   r   r   r   rw   !  s   rw   )python_implementationc               C   s0   dt jkrdS tjdkrdS t jjdr,dS dS )z6Return a string identifying the Python implementation.ZPyPyjavaZJythonZ
IronPythonZCPython)rk   versionrW   rv   r>   r   r   r   r   r   0  s    

r   )	sysconfig)Callablec             C   s
   t | tS )N)r   r   )objr   r   r   callableD  s    r   mbcsstrictsurrogateescapec             C   s:   t | tr| S t | tr$| jttS tdt| j d S )Nzexpect bytes or str, not %s)	r   bytes	text_typer   _fsencoding	_fserrors	TypeErrortyper4   )filenamer   r   r   fsencodeR  s    

r   c             C   s:   t | tr| S t | tr$| jttS tdt| j d S )Nzexpect bytes or str, not %s)	r   r   r   decoder   r   r   r   r4   )r   r   r   r   fsdecode[  s    

r   )detect_encoding)BOM_UTF8lookupzcoding[:=]\s*([-\w.]+)c             C   sH   | dd j  jdd}|dks*|jdr.dS |dks@|jdrDdS | S )z(Imitates get_normal_name in tokenizer.c.N   _-zutf-8zutf-8-latin-1
iso-8859-1iso-latin-1latin-1-iso-8859-1-iso-latin-1-)r   r   r   )r   r   r   )r<   r@   r>   )orig_encencr   r   r   _get_normal_namel  s    
r   c                s   yj jW n tk
r$   dY nX d d}d}fdd} fdd}| }|jtrpd |d	d }d
}|s||g fS ||}|r||gfS | }|s||gfS ||}|r|||gfS |||gfS )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.
        NFzutf-8c                  s    y  S  t k
r   dS X d S )N    )StopIterationr   )readliner   r   read_or_stop  s    z%detect_encoding.<locals>.read_or_stopc                s   y| j d}W n4 tk
rB   d}d k	r6dj|}t|Y nX tj|}|sVd S t|d }yt|}W n: tk
r   d krd| }ndj|}t|Y nX  r|j	dkr؈d krd}n
dj}t||d	7 }|S )
Nzutf-8z'invalid or missing encoding declarationz{} for {!r}r   zunknown encoding: zunknown encoding for {!r}: {}zencoding problem: utf-8z encoding problem for {!r}: utf-8z-sig)
r   UnicodeDecodeErrorformatSyntaxError	cookie_refindallr   r   LookupErrorrv   )lineline_stringmsgZmatchesencodingcodec)	bom_foundr   r   r   find_cookie  s6    



z$detect_encoding.<locals>.find_cookieTr   z	utf-8-sig)__self__rv   AttributeErrorr>   r   )r   r   defaultr   r   firstsecondr   )r   r   r   r   r   w  s4    
&


r   )r?   r(      )unescape)ChainMap)MutableMapping)recursive_repr...c                s    fdd}|S )zm
            Decorator to make a repr function return fillvalue for a recursive
            call
            c                sL   t    fdd}td|_td|_td|_tdi |_|S )Nc                sB   t | t f}|kr S j| z| }W d j| X |S )N)id	get_identrr   discard)rR   rK   result)	fillvaluerepr_runninguser_functionr   r   wrapper  s    
z=_recursive_repr.<locals>.decorating_function.<locals>.wrapperr5   rU   r4   __annotations__)rp   getattrr5   rU   r4   r   )r   r   )r   )r   r   r   decorating_function  s    z,_recursive_repr.<locals>.decorating_functionr   )r   r   r   )r   r   _recursive_repr  s    r   c               @   s   e Zd ZdZdd Zdd Zdd Zd'd	d
Zdd Zdd Z	dd Z
dd Ze dd Zedd Zdd ZeZdd Zedd Zdd Zdd  Zd!d" Zd#d$ Zd%d& ZdS )(r   a   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.

        c             G   s   t |pi g| _dS )zInitialize a ChainMap by setting *maps* to the given mappings.
            If no mappings are provided, a single empty dictionary is used.

            N)listmaps)rR   r   r   r   r   rT     s    zChainMap.__init__c             C   s   t |d S )N)KeyError)rR   rK   r   r   r   __missing__  s    zChainMap.__missing__c             C   s8   x,| j D ]"}y|| S  tk
r(   Y qX qW | j|S )N)r   r   r   )rR   rK   mappingr   r   r   __getitem__  s    
zChainMap.__getitem__Nc             C   s   || kr| | S |S )Nr   )rR   rK   r   r   r   r   rH     s    zChainMap.getc             C   s   t t j| j S )N)rI   rp   unionr   )rR   r   r   r   __len__"  s    zChainMap.__len__c             C   s   t t j| j S )N)iterrp   r   r   )rR   r   r   r   __iter__%  s    zChainMap.__iter__c                s   t  fdd| jD S )Nc             3   s   | ]} |kV  qd S )Nr   )rb   m)rK   r   r   re   )  s    z(ChainMap.__contains__.<locals>.<genexpr>)ro   r   )rR   rK   r   )rK   r   __contains__(  s    zChainMap.__contains__c             C   s
   t | jS )N)ro   r   )rR   r   r   r   __bool__+  s    zChainMap.__bool__c             C   s   dj | djtt| jS )Nz{0.__class__.__name__}({1})z, )r   rA   rJ   r;   r   )rR   r   r   r   __repr__.  s    zChainMap.__repr__c             G   s   | t j|f| S )z?Create a ChainMap with a single dict created from the iterable.)dictfromkeys)clsiterabler   r   r   r   r   3  s    zChainMap.fromkeysc             C   s$   | j | jd j f| jdd  S )zHNew ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]r   r   N)	__class__r   copy)rR   r   r   r   r   8  s    zChainMap.copyc             C   s   | j i f| j S )z;New ChainMap with a new dict followed by all previous maps.)r   r   )rR   r   r   r   	new_child>  s    zChainMap.new_childc             C   s   | j | jdd  S )zNew ChainMap from maps[1:].r   N)r   r   )rR   r   r   r   parentsB  s    zChainMap.parentsc             C   s   || j d |< d S )Nr   )r   )rR   rK   rL   r   r   r   __setitem__G  s    zChainMap.__setitem__c             C   s8   y| j d |= W n" tk
r2   tdj|Y nX d S )Nr   z(Key not found in the first mapping: {!r})r   r   r   )rR   rK   r   r   r   __delitem__J  s    zChainMap.__delitem__c             C   s0   y| j d j S  tk
r*   tdY nX dS )zPRemove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.r   z#No keys found in the first mapping.N)r   popitemr   )rR   r   r   r   r   P  s    zChainMap.popitemc             G   s>   y| j d j|f| S  tk
r8   tdj|Y nX dS )zWRemove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].r   z(Key not found in the first mapping: {!r}N)r   popr   r   )rR   rK   r   r   r   r   r   W  s    zChainMap.popc             C   s   | j d j  dS )z'Clear maps[0], leaving maps[1:] intact.r   N)r   clear)rR   r   r   r   r   ^  s    zChainMap.clear)N)r4   r5   r6   rU   rT   r   r   rH   r   r   r   r   r   r   classmethodr   r   __copy__r   propertyr   r   r   r   r   r   r   r   r   r   r      s(   
r   )cache_from_sourcec             C   s"   |d krd}|rd}nd}| | S )NFcor   )rX   debug_overridesuffixr   r   r   r   e  s    r   )OrderedDict)r   )KeysView
ValuesView	ItemsViewc               @   s   e Zd ZdZdd ZejfddZejfddZdd	 Zd
d Z	dd Z
d6ddZdd Zdd Zdd Zdd Zdd Zdd Zdd ZeZe Zefdd Zd7d"d#Zd8d$d%Zd&d' Zd(d) Zed9d*d+Zd,d- Zd.d/ Zd0d1 Zd2d3 Z d4d5 Z!d!S ):r   z)Dictionary that remembers insertion orderc             O   sn   t |dkrtdt | y
| j W n6 tk
r\   g  | _}||dg|dd< i | _Y nX | j|| dS )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)rI   r   _OrderedDict__rootr   _OrderedDict__map_OrderedDict__update)rR   r   kwdsrootr   r   r   rT     s    

zOrderedDict.__init__c             C   sF   || kr6| j }|d }|||g |d<  |d< | j|< || || dS )z!od.__setitem__(i, y) <==> od[i]=yr   r   N)r   r   )rR   rK   rL   Zdict_setitemr   lastr   r   r   r     s
     zOrderedDict.__setitem__c             C   s0   || | | j j|\}}}||d< ||d< dS )z od.__delitem__(y) <==> del od[y]r   r   N)r   r   )rR   rK   Zdict_delitem	link_prev	link_nextr   r   r   r     s    
zOrderedDict.__delitem__c             c   s2   | j }|d }x||k	r,|d V  |d }qW dS )zod.__iter__() <==> iter(od)r   r(   N)r   )rR   r   currr   r   r   r     s
    

zOrderedDict.__iter__c             c   s2   | j }|d }x||k	r,|d V  |d }qW dS )z#od.__reversed__() <==> reversed(od)r   r(   N)r   )rR   r   r   r   r   r   __reversed__  s
    

zOrderedDict.__reversed__c             C   sh   yDx| j j D ]}|dd= qW | j}||dg|dd< | j j  W n tk
rX   Y nX tj|  dS )z.od.clear() -> None.  Remove all items from od.N)r   
itervaluesr   r   r   r   )rR   Znoder   r   r   r   r     s    zOrderedDict.clearTc             C   s|   | st d| j}|r8|d }|d }||d< ||d< n |d }|d }||d< ||d< |d }| j|= tj| |}||fS )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.

            zdictionary is emptyr   r   r(   )r   r   r   r   r   )rR   r   r   linkr   r   rK   rL   r   r   r   r     s     
zOrderedDict.popitemc             C   s   t | S )zod.keys() -> list of keys in od)r   )rR   r   r   r   keys  s    zOrderedDict.keysc                s    fdd D S )z#od.values() -> list of values in odc                s   g | ]} | qS r   r   )rb   rK   )rR   r   r   rf     s    z&OrderedDict.values.<locals>.<listcomp>r   )rR   r   )rR   r   values  s    zOrderedDict.valuesc                s    fdd D S )z.od.items() -> list of (key, value) pairs in odc                s   g | ]}| | fqS r   r   )rb   rK   )rR   r   r   rf     s    z%OrderedDict.items.<locals>.<listcomp>r   )rR   r   )rR   r   items  s    zOrderedDict.itemsc             C   s   t | S )z0od.iterkeys() -> an iterator over the keys in od)r   )rR   r   r   r   iterkeys  s    zOrderedDict.iterkeysc             c   s   x| D ]}| | V  qW dS )z2od.itervalues -> an iterator over the values in odNr   )rR   kr   r   r   r     s    
zOrderedDict.itervaluesc             c   s    x| D ]}|| | fV  qW dS )z=od.iteritems -> an iterator over the (key, value) items in odNr   )rR   r  r   r   r   	iteritems  s    
zOrderedDict.iteritemsc              O   s   t | dkr tdt | f n| s,td| d }f }t | dkrL| d }t|trrx^|D ]}|| ||< q\W nDt|drx8|j D ]}|| ||< qW nx|D ]\}}|||< qW x|j D ]\}}|||< qW dS )a  od.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

            r(   z8update() takes at most 2 positional arguments (%d given)z,update() takes at least 1 argument (0 given)r   r   r   N)rI   r   r   r   hasattrr   r  )r   r   rR   otherrK   rL   r   r   r   rQ     s&    	


zOrderedDict.updatec             C   s0   || kr| | }| |= |S || j kr,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   )rR   rK   r   r   r   r   r   r   !  s    
zOrderedDict.popNc             C   s   || kr| | S || |< |S )zDod.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in odr   )rR   rK   r   r   r   r   
setdefault.  s    zOrderedDict.setdefaultc             C   s^   |si }t | t f}||kr"dS d||< z&| s>d| jjf S d| jj| j f S ||= X dS )zod.__repr__() <==> repr(od)z...r   z%s()z%s(%r)N)r   
_get_identr   r4   r  )rR   Z_repr_runningZcall_keyr   r   r   r   5  s     zOrderedDict.__repr__c                s\    fdd D }t  j }xt t D ]}|j|d q*W |rP j|f|fS  j|ffS )z%Return state information for picklingc                s   g | ]}| | gqS r   r   )rb   r  )rR   r   r   rf   E  s    z*OrderedDict.__reduce__.<locals>.<listcomp>N)varsr   r   r   r   )rR   r  Z	inst_dictr  r   )rR   r   
__reduce__C  s    zOrderedDict.__reduce__c             C   s
   | j | S )z!od.copy() -> a shallow copy of od)r   )rR   r   r   r   r   M  s    zOrderedDict.copyc             C   s    |  }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   )r   r   rL   drK   r   r   r   r   Q  s    
zOrderedDict.fromkeysc             C   s6   t |tr*t| t|ko(| j |j kS tj| |S )zod.__eq__(y) <==> od==y.  Comparison to another OD is order-sensitive
            while comparison to a regular mapping is order-insensitive.

            )r   r   rI   r  r   __eq__)rR   r  r   r   r   r  \  s    
 zOrderedDict.__eq__c             C   s
   | |k S )Nr   )rR   r  r   r   r   __ne__e  s    zOrderedDict.__ne__c             C   s   t | S )z@od.viewkeys() -> a set-like object providing a view on od's keys)r   )rR   r   r   r   viewkeysj  s    zOrderedDict.viewkeysc             C   s   t | S )z<od.viewvalues() -> an object providing a view on od's values)r   )rR   r   r   r   
viewvaluesn  s    zOrderedDict.viewvaluesc             C   s   t | S )zBod.viewitems() -> a set-like object providing a view on od's items)r   )rR   r   r   r   	viewitemsr  s    zOrderedDict.viewitems)T)N)N)N)"r4   r5   r6   rU   rT   r   r   r   r   r   r   r   r   r   r  r  r   r  rQ   r   objectr  r   r  r   r  r   r   r   r  r  r  r  r  r   r   r   r   r     s:   
	




	r   )BaseConfiguratorvalid_identz^[a-z_][a-z0-9_]*$c             C   s   t j| }|std|  dS )Nz!Not a valid Python identifier: %rT)
IDENTIFIERr,   rG   )r   r   r   r   r   r  |  s    
r  c               @   s"   e Zd ZdZdd ZdddZdS )ConvertingDictz A converting dictionary wrapper.c             C   sJ   t j| |}| jj|}||k	rF|| |< t|tttfkrF| |_||_	|S )N)
r   r   configuratorconvertr   r  ConvertingListConvertingTupleparentrK   )rR   rK   rL   r   r   r   r   r     s    
zConvertingDict.__getitem__Nc             C   sL   t j| ||}| jj|}||k	rH|| |< t|tttfkrH| |_||_	|S )N)
r   rH   r  r  r   r  r  r  r  rK   )rR   rK   r   rL   r   r   r   r   rH     s    
zConvertingDict.get)N)r4   r5   r6   rU   r   rH   r   r   r   r   r    s   r  c             C   sD   t j| ||}| jj|}||k	r@t|tttfkr@| |_||_	|S )N)
r   r   r  r  r   r  r  r  r  rK   )rR   rK   r   rL   r   r   r   r   r     s    
r   c               @   s"   e Zd ZdZdd Zd	ddZdS )
r  zA converting list wrapper.c             C   sJ   t j| |}| jj|}||k	rF|| |< t|tttfkrF| |_||_	|S )N)
r   r   r  r  r   r  r  r  r  rK   )rR   rK   rL   r   r   r   r   r     s    
zConvertingList.__getitem__r   c             C   s<   t j| |}| jj|}||k	r8t|tttfkr8| |_|S )N)	r   r   r  r  r   r  r  r  r  )rR   idxrL   r   r   r   r   r     s    
zConvertingList.popN)r  )r4   r5   r6   rU   r   r   r   r   r   r   r    s   r  c               @   s   e Zd ZdZdd ZdS )r  zA converting tuple wrapper.c             C   sB   t j| |}| jj|}||k	r>t|tttfkr>| |_||_	|S )N)
tupler   r  r  r   r  r  r  r  rK   )rR   rK   rL   r   r   r   r   r     s    
zConvertingTuple.__getitem__N)r4   r5   r6   rU   r   r   r   r   r   r    s   r  c               @   s   e Zd ZdZejdZejdZejdZejdZ	ejdZ
ddd	ZeeZd
d Zdd Zdd Zdd Zdd Zdd Zdd ZdS )r  zQ
        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_convertcfg_convert)rc   Zcfgc             C   s   t || _| | j_d S )N)r  configr  )rR   r!  r   r   r   rT     s    
zBaseConfigurator.__init__c       	      C   s   |j d}|jd}y`| j|}xP|D ]H}|d| 7 }yt||}W q& tk
rl   | j| t||}Y q&X q&W |S  tk
r   tj dd \}}td||f }|| |_	|_
|Y nX dS )zl
            Resolve strings to objects using standard import and attribute
            syntax.
            r7   r   r   NzCannot resolve %r: %s)r9   r   importerr   r   ImportErrorrk   r|   rG   	__cause____traceback__)	rR   r   rv   ZusedfoundrE   etbvr   r   r   resolve  s"    




zBaseConfigurator.resolvec             C   s
   | j |S )z*Default converter for the ext:// protocol.)r*  )rR   rL   r   r   r   r    s    zBaseConfigurator.ext_convertc             C   s  |}| j j|}|dkr&td| n||j d }| j|j d  }x|r| jj|}|rp||j d  }nd| jj|}|r|j d }| jj|s|| }n2yt	|}|| }W n t
k
r   || }Y nX |r||j d }qJtd||f qJW |S )z*Default converter for the cfg:// protocol.NzUnable to convert %rr   zUnable to convert %r at %r)WORD_PATTERNr,   rG   endr!  groupsDOT_PATTERNINDEX_PATTERNDIGIT_PATTERNintr   )rR   rL   restr   r  r  nr   r   r   r     s2    
zBaseConfigurator.cfg_convertc             C   s   t |t r&t |tr&t|}| |_nt |t rLt |trLt|}| |_n|t |t rrt |trrt|}| |_nVt |tr| j	j
|}|r|j }|d }| j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   )r   r  r   r  r  r   r  r  string_typesCONVERT_PATTERNr,   	groupdictvalue_convertersrH   r   )rR   rL   r   r  r4  Z	converterr   r   r   r   r  )  s*    


zBaseConfigurator.convertc                sr    j d}t|s| j|} j dd}t fdd D }|f |}|rnx |j D ]\}}t||| qVW |S )z1Configure an object with a user-supplied factory.z()r7   Nc                s    g | ]}t |r| | fqS r   )r  )rb   r  )r!  r   r   rf   L  s    z5BaseConfigurator.configure_custom.<locals>.<listcomp>)r   r   r*  r   r  setattr)rR   r!  r   ZpropsrS   r   rv   rL   r   )r!  r   configure_customE  s    


z!BaseConfigurator.configure_customc             C   s   t |trt|}|S )z0Utility function which converts lists to tuples.)r   r   r  )rR   rL   r   r   r   as_tupleS  s    
zBaseConfigurator.as_tupleN)r4   r5   r6   rU   r*   r+   r6  r+  r.  r/  r0  r8  staticmethod
__import__r"  rT   r*  r  r   r  r:  r;  r   r   r   r   r    s    




"r  )r   )r   r   )r   )N)N)Z
__future__r   rW   r*   rk   Zsslr#  version_infor   Z
basestringr5  r   r   typesr   Z	file_typeZ__builtin__builtinsZConfigParserZconfigparserZ	_backportr   r   r	   r
   r   r   Zurllibr   r   r   r   r   r   r   r   Zurllib2r   r   r   r   r   r    r!   r"   r#   r$   ZhttplibZ	xmlrpclibZQueueZqueuer%   ZhtmlentitydefsZ	raw_input	itertoolsr&   filterr'   r1   r)   r/   iostrr0   Zurllib.parseZurllib.requestZurllib.errorZhttp.clientZclientZrequestZxmlrpc.clientZhtml.parserZhtml.entitiesZentitiesinputr2   r3   rG   rF   rN   rO   r  rV   F_OKX_OKZzipfilerw   r~   r  ry   ZBaseZipExtFilerl   r   r   r   	NameErrorcollectionsr   r   r   r   getfilesystemencodingr   r   tokenizer   codecsr   r   r+   r   r   Zhtmlr?   Zcgir   r   r   reprlibr   r   Zimpr   r   Zthreadr   r	  Zdummy_threadZ_abcollr   r   r   r   Zlogging.configr  r  Ir  r  r   r   r  r  r  r   r   r   r   <module>   s&  
$,,0




2+A


		
[
b
 w

