
    /h+                        d dl mZ d dlZd dlZd dlZ	 d dlZn# e$ r dZY nw xY wej        d          dk     rd 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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 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l.Z.d dl/Z0d dl1m1Z1 d dl2Z2e3Z3d dl4m5Z6 d dl4m7Z8 nd dl9mZ e:fZ
e:Zd dl9m;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! d dl>m$Z$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?m&Z&m%Z%m Z  d dl@mAZ- d dl>mBZ" d dlCmAZ. d dl0Z0d dlDm1Z1 d dlEmFZ2 eGZ3d dl4m8Z8 e6Z6	 d dlmHZHmIZI n # e$ r  G d deJ          ZIdRdZKd ZHY nw xY w	 d dlmLZM n# e$ r  G d deN          ZMY nw xY w	 d dl<mOZO n# e$ r ejP        ejQ        z  dfdZOY nw xY wd dlRmSZT  eUeTd          reTZSn"d d lRmVZW  G d! d"eW          ZV G d# d$eT          ZS	 d d%lXmYZY n# e$ r d& ZYY nw xY wd dl<Z<d dlZZZ	 e[Z[n# e\$ r d d'l]m^Z^ d( Z[Y nw xY w	 ej_        Z_ej`        Z`n-# ea$ r%  ejb                    pd)Zcecd*k    rd+Zdnd,Zdd- Z_d. Z`Y nw xY w	 d d/lemfZf n-# e$ r% d d0lgmhZhmiZi d dlZ ejj        d1          Zkd2 Zld3 ZfY nw xY w	 d d4lmmnZn n# e$ r	 d d4lomnZn Y nw xY wej        dd5         d6k     r e1            jp        Zpnd d7lmmpZp 	 d d8lqmrZr n6# e$ r. d d9lqmsZs 	 d d:ltmuZv n# e$ r dSd<ZvY nw xY w G d= d>es          ZrY nw xY w	 d d?lwmxZx n# e$ r dTd@ZxY nw xY w	 d dAlqmyZy nI# e$ rA 	 d dBlzm{Z| n# e$ r	 d dBl}m{Z| Y nw xY w	 d dCl~mZmZmZ n# e$ r Y nw xY w G dD dEe          ZyY nw xY w	 d dFlmZmZ dS # e$ rY  ejj        dGej                  ZdH Z G dI dJe          ZdTdKZ G dL dMe          Z G dN dOe          Z G dP dQeN          ZY dS w xY w)U    )absolute_importN   )StringIO)FileType)urlparse
urlunparseurljoinurlsplit
urlunsplit)urlretrievequoteunquoteurl2pathnamepathname2urlContentTooShortError	splittypec                 t    t          | t                    r|                     d          } t          |           S )Nutf-8)
isinstanceunicodeencode_quote)ss    M/var/www/html/venv/lib/python3.11/site-packages/pip/_vendor/distlib/compat.pyr   r      s1    a!! 	"!!Aayy    )	RequesturlopenURLError	HTTPErrorHTTPBasicAuthHandlerHTTPPasswordMgrHTTPHandlerHTTPRedirectHandlerbuild_opener)HTTPSHandler)
HTMLParser)ifilter)ifilterfalse)TextIOWrapper)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                       e Zd ZdS )r,   N)__name__
__module____qualname__ r   r   r,   r,   _   s        r   r,      c                 l   g }| sdS |                      d          }|d         |dd         }}|                    d          }||k    rt          dt          |           z             |s*|                                 |                                k    S |dk    r|                    d           n|                    d	          s|                    d	          r(|                    t          j        |                     n;|                    t          j        |          	                    d
d                     |D ])}|                    t          j        |                     *t          j
        dd                    |          z   dz   t          j                  }	|	                    |          S )zpMatching according to RFC 6125, section 6.4.3

        http://tools.ietf.org/html/rfc6125#section-6.4.3
        F.r   r2   N*z,too many wildcards in certificate DNS name: z[^.]+zxn--z\*z[^.]*z\Az\.z\Z)splitcountr,   reprlowerappend
startswithreescapereplacecompilejoin
IGNORECASEmatch)
dnhostnamemax_wildcardspatspartsleftmost	remainder	wildcardsfragpats
             r   _dnsname_matchrM   c   s   
  	5#Ahabb	)NN3''	}$$
 #>bIK K K  	288::!1!111
 s?? KK      (( 	EH,?,?,G,G 	E
 KK	(++,,,, KK	(++33E7CCDDD  	) 	)DKK	$((((jD!1!11E92=IIyy"""r   c                 z   | st          d          g }|                     dd          }|D ]3\  }}|dk    r(t          ||          r dS |                    |           4|sP|                     dd          D ]9}|D ]4\  }}|dk    r)t          ||          r  dS |                    |           5:t	          |          dk    r;t          d	|d
d                    t          t          |                              t	          |          dk    rt          d	|d|d                   t          d          )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_REQUIREDsubjectAltNamer1   DNSNsubject
commonNamer2   z	hostname z doesn't match either of , z doesn't match r   z=no appropriate commonName or subjectAltName fields were found)	
ValueErrorgetrM   r:   lenr,   r@   mapr8   )certrD   dnsnamessankeyvaluesubs          r   r+   r+      s     	? > ? ? ? hh',, 	' 	'JCe||!%22 FF&&& 
	/ xx	2.. / /"% / /JC l**)%:: #"FFF .../ x==1""88TYYs4':':;;;$= > > > ]]a""88Xa[[$* + + + # $3 4 4 4r   )SimpleNamespacec                       e Zd ZdZd ZdS )	ContainerzR
        A generic container for when multiple values need to be returned
        c                 :    | j                             |           d S N__dict__update)selfkwargss     r   __init__zContainer.__init__   s    M  (((((r   N)r.   r/   r0   __doc__rh   r1   r   r   r`   r`      s-        	 		) 	) 	) 	) 	)r   r`   )whichc                 f    d }t           j                                       r | |          r S dS |*t           j                            dt           j                  }|sdS |                    t           j                  }t          j	        dk    rt           j
        |vr |                    dt           j
                   t           j                            dd                              t           j                  }t           fd|D                       r g}n fd	|D             }n g}t                      }|D ]q}t           j                            |          }||vrL|                    |           |D ]4}	t           j                            ||	          }
 ||
|          r|
c c S 5rd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                     t           j                            |           o4t          j        | |          ot           j                            |            S rb   )ospathexistsaccessisdir)fnmodes     r   _access_checkzwhich.<locals>._access_check   sD    GNN2&& .29R+>+> .GMM"---/r   NPATHwin32r   PATHEXT c              3      K   | ]=}                                                     |                                           V  >d S rb   )r9   endswith.0extcmds     r   	<genexpr>zwhich.<locals>.<genexpr>   sA      HH399;;''		44HHHHHHr   c                     g | ]}|z   S r1   r1   r{   s     r   
<listcomp>zwhich.<locals>.<listcomp>   s    666ss666r   )rm   rn   dirnameenvironrU   defpathr6   pathsepsysplatformcurdirinsertanysetnormcaseaddr@   )r~   rs   rn   rt   pathextfilesseendirnormdirthefilenames   `          r   rj   rj      s   	/ 	/ 	/ 7??3 	}S$'' 
4<:>>&"*55D 	4zz"*%%<7""9$$Ary))) jnnY3399"*EEG
 HHHHHHHHH 76666g666 EEuu 	$ 	$Cg&&s++Gd??!!!$ $ $G7<<W55D$}T400 $#$tr   )ZipFile	__enter__)
ZipExtFilec                        e Zd Zd Zd Zd ZdS )r   c                 D    | j                             |j                    d S rb   rc   )rf   bases     r   rh   zZipExtFile.__init__  s     M  /////r   c                     | S rb   r1   rf   s    r   r   zZipExtFile.__enter__      Kr   c                 .    |                                   d S rb   closerf   exc_infos     r   __exit__zZipExtFile.__exit__      JJLLLLLr   N)r.   r/   r0   rh   r   r   r1   r   r   r   r     sA        	0 	0 	0	 	 		 	 	 	 	r   r   c                        e Zd Zd Zd Zd ZdS )r   c                     | S rb   r1   r   s    r   r   zZipFile.__enter__#  r   r   c                 .    |                                   d S rb   r   r   s     r   r   zZipFile.__exit__&  r   r   c                 J    t          j        | g|R i |}t          |          S rb   )BaseZipFileopenr   )rf   argsrg   r   s       r   r   zZipFile.open*  s0    #D:4:::6::Dd###r   N)r.   r/   r0   r   r   r   r1   r   r   r   r   "  sA        	 	 		 	 		$ 	$ 	$ 	$ 	$r   r   )python_implementationc                      dt           j        v rdS t          j        dk    rdS t           j                            d          rdS dS )z6Return a string identifying the Python implementation.PyPyjavaJython
IronPythonCPython)r   versionrm   r   r;   r1   r   r   r   r   1  sH    S[  67f8;!!,// 	 <yr   )Callablec                 ,    t          | t                    S rb   )r   r   )objs    r   callabler   C  s    #x(((r   r   mbcsstrictsurrogateescapec                     t          | t                    r| S t          | t                    r |                     t          t
                    S t          dt          |           j        z            Nzexpect bytes or str, not %s)	r   bytes	text_typer   _fsencoding	_fserrors	TypeErrortyper.   filenames    r   fsencoder   W  se    h&& 	5O),, 	5??;	:::9 NN34 5 5 5r   c                     t          | t                    r| S t          | t                    r |                     t          t
                    S t          dt          |           j        z            r   )	r   r   r   decoder   r   r   r   r.   r   s    r   fsdecoder   `  se    h	** 	5O%(( 	5??;	:::9 NN34 5 5 5r   )detect_encoding)BOM_UTF8lookupzcoding[:=]\s*([-\w.]+)c                     | dd                                                              dd          }|dk    s|                    d          rdS |dv s|                    d          rd	S | S )
z(Imitates get_normal_name in tokenizer.c.N   _-r   zutf-8-)zlatin-1
iso-8859-1ziso-latin-1)zlatin-1-ziso-8859-1-ziso-latin-1-r   )r9   r>   r;   )orig_encencs     r   _get_normal_namer   q  sv     ssm!!##++C55'>>S^^H55>7:::>>EFF ;<r   c                 R    	  j         j        n# t          $ r dY nw xY wdd}d} fd}fd} |            }|                    t                    rd|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.
        NFr   c                  <    	               S # t           $ r Y dS w xY w)Nr   )StopIteration)readlines   r   read_or_stopz%detect_encoding.<locals>.read_or_stop  s6    xzz!    sss   	 
c                    	 |                      d          }n7# t          $ r* d}d                    |          }t          |          w xY wt                              |          }|sd S t          |d                   }	 t          |          }n;# t          $ r. d|z   }nd                    |          }t          |          w xY wr9|j	        dk    r)d}nd                              }t          |          |d	z  }|S )
Nr   z'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   LookupErrorr   )lineline_stringmsgmatchesencodingcodec	bom_foundr   s         r   find_cookiez$detect_encoding.<locals>.find_cookie  sV   	' #kk'22% ' ' '?''..sH==C!#&&&	'  ''44G t'
33H	'x(( ' ' '#.9CC9@@$& &C!#&&&'  #:(('7@GGQQ%c***F"Os    4AB 8CTr   z	utf-8-sig)__self__r   AttributeErrorr;   r   )	r   r   defaultr   r   firstsecondr   r   s	   `      @@r   r   r   |  sG   "	(-HH 	 	 	HHH			 	 	 	 	$	 $	 $	 $	 $	 $	L H%% 	"I!""IE!G 	B;;u%% 	%eW$$ 	$UG##;v&& 	-eV_,,''s    !!)r=      )r      )unescape)ChainMap)MutableMapping)recursive_repr...c                       fd}|S )zm
            Decorator to make a repr function return fillvalue for a recursive
            call
            c                      t                       fd}t           d          |_        t           d          |_        t           d          |_        t           di           |_        |S )Nc                     t          |           t                      f}|v rS                     |           	  |           }                    |           n#                     |           w xY w|S rb   )id	get_identr   discard)rf   r[   result	fillvaluerepr_runninguser_functions      r   wrapperz=_recursive_repr.<locals>.decorating_function.<locals>.wrapper  s    T((IKK/Cl**(( $$S)))2!.t!4!4$,,S1111,,S1111!Ms   A A3r/   ri   r.   __annotations__)r   getattrr/   ri   r.   r   )r   r   r   r   s   ` @r   decorating_functionz,_recursive_repr.<locals>.decorating_function  s    "uu	" 	" 	" 	" 	" 	" 	" &-]L%I%I"")-"C"C#*=*#E#E *1-ARTV*W*W'r   r1   )r   r  s   ` r   _recursive_reprr    s$        * '&r   c                       e Zd ZdZd Zd Zd ZddZd Zd Z	d	 Z
d
 Z e            d             Zed             Zd ZeZd Zed             Zd Zd Zd Zd Z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                 4    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)rf   r  s     r   rh   zChainMap.__init__  s    
 T

*rdDIIIr   c                      t          |          rb   )KeyErrorrf   r[   s     r   __missing__zChainMap.__missing__  s    3--r   c                 t    | j         D ]}	 ||         c S # t          $ r Y w xY w|                     |          S rb   )r  r  r
  )rf   r[   mappings      r   __getitem__zChainMap.__getitem__  s\    9  "3<'''   D##C(((s   
""Nc                     || v r| |         n|S rb   r1   rf   r[   r   s      r   rU   zChainMap.get$  s     #t4998r   c                 R    t           t                      j        | j                   S rb   )rV   r   unionr  r   s    r   __len__zChainMap.__len__'  s    {suu{DI.///r   c                 R    t           t                      j        | j                   S rb   )iterr   r  r  r   s    r   __iter__zChainMap.__iter__*  s    TY/000r   c                 D    t          fd| j        D                       S )Nc              3       K   | ]}|v V  	d S rb   r1   )r|   mr[   s     r   r   z(ChainMap.__contains__.<locals>.<genexpr>.  s'      33Asax333333r   r   r  r	  s    `r   __contains__zChainMap.__contains__-  s(    3333333333r   c                 *    t          | j                  S rb   r  r   s    r   __bool__zChainMap.__bool__0  s    ty>>!r   c           	          d                     | d                    t          t          | j                                      S )Nz{0.__class__.__name__}({1})rS   )r   r@   rW   r8   r  r   s    r   __repr__zChainMap.__repr__3  s7    077diiD$) 4 4557 7 7r   c                 8     | t          j        |g|R            S )z?Create a ChainMap with a single dict created from the iterable.)dictfromkeys)clsiterabler   s      r   r!  zChainMap.fromkeys8  s&     3t}X5555666r   c                 r     | j         | j        d                                         g| j        dd         R  S )zHNew ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]r   r2   N)	__class__r  copyr   s    r   r&  zChainMap.copy=  s8    !4>$)A,"3"3"5"5F	!""FFFFr   c                 (     | j         i g| j        R  S )z;New ChainMap with a new dict followed by all previous maps.r%  r  r   s    r   	new_childzChainMap.new_childC  s    !4>"1ty1111r   c                 0     | j         | j        dd          S )zNew ChainMap from maps[1:].r2   Nr(  r   s    r   parentszChainMap.parentsG  s     "4>49QRR=11r   c                 &    || j         d         |<   d S )Nr   )r  )rf   r[   r\   s      r   __setitem__zChainMap.__setitem__L  s     %DIaLr   c                     	 | j         d         |= d S # t          $ r# t          d                    |                    w xY w)Nr   (Key not found in the first mapping: {!r})r  r  r   r	  s     r   __delitem__zChainMap.__delitem__O  sY    WIaL%%% W W WIPPQTUUVVVWs    -?c                 |    	 | j         d                                         S # t          $ r t          d          w xY w)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.)r  popitemr  r   s    r   r2  zChainMap.popitemU  sN    Fy|++--- F F FDEEEFs   ! ;c                     	  | j         d         j        |g|R  S # t          $ r# t          d                    |                    w xY w)zWRemove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].r   r/  )r  popr  r   )rf   r[   r   s      r   r4  zChainMap.pop\  sf    W'ty|'3d3333 W W WIPPQTUUVVVWs	    -Ac                 D    | j         d                                          dS )z'Clear maps[0], leaving maps[1:] intact.r   N)r  clearr   s    r   r6  zChainMap.clearc  s     IaL     r   rb   )r.   r/   r0   ri   rh   r
  r  rU   r  r  r  r  r  r  classmethodr!  r&  __copy__r)  propertyr+  r-  r0  r2  r4  r6  r1   r   r   r   r     sq       
	 
		+ 	+ 	+	  	  	 	) 	) 	)	9 	9 	9 	9	0 	0 	0	1 	1 	1	4 	4 	4	" 	" 	" 
			7 	7 
		7 
	7 	7 
	7	G 	G 	G 	2 	2 	2 
	2 	2 
	2	& 	& 	&	W 	W 	W	F 	F 	F	W 	W 	W	! 	! 	! 	! 	!r   r   )cache_from_sourcec                 P    |                      d          sJ |d}|rd}nd}| |z   S )Nz.pyTco)rz   )rn   debug_overridesuffixs      r   r:  r:  j  sC    }}U#####!&N 	FFFf}r   )OrderedDict)r   )KeysView
ValuesView	ItemsViewc                       e Zd ZdZd Zej        fdZej        fdZd Zd Z	d Z
dd	Zd
 Zd Zd Zd Zd Zd Zd ZeZ e            ZefdZddZddZd Zd Zedd            Zd Zd Zd Zd Z d Z!dS )r@  z)Dictionary that remembers insertion orderc                     t          |          dk    rt          dt          |          z            	 | j         n*# t          $ r g x| _        }||dg|dd<   i | _        Y nw xY w | j        |i | 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.

            r2   z$expected at most 1 arguments, got %dN)rV   r   _OrderedDict__rootr   _OrderedDict__map_OrderedDict__update)rf   r   kwdsroots       r   rh   zOrderedDict.__init__  s     4yy1}} FT RSSS !      %''dt,QQQ


  DM4(4(((((s   < $A#"A#c                 t    || vr&| j         }|d         }|||gx|d<   x|d<   | j        |<    || ||           dS )z!od.__setitem__(i, y) <==> od[i]=yr   r2   N)rF  rG  )rf   r[   r\   dict_setitemrJ  lasts         r   r-  zOrderedDict.__setitem__  s[     ${Aw7;T36GGQG$q'DJsOLsE*****r   c                 n     || |           | j                             |          \  }}}||d<   ||d<   dS )z od.__delitem__(y) <==> del od[y]r2   r   N)rG  r4  )rf   r[   dict_delitem	link_prev	link_nexts        r   r0  zOrderedDict.__delitem__  sF     Ls###(,
s(;(;%Iy#$IaL$IaLLLr   c              #   `   K   | j         }|d         }||ur|d         V  |d         }||udS dS )zod.__iter__() <==> iter(od)r2   r   NrF  rf   rJ  currs      r   r  zOrderedDict.__iter__  P      ;D7Dd""1gAw d""""""r   c              #   `   K   | j         }|d         }||ur|d         V  |d         }||udS dS )z#od.__reversed__() <==> reversed(od)r   r   NrS  rT  s      r   __reversed__zOrderedDict.__reversed__  rV  r   c                     	 | j                                         D ]}|dd= | j        }||dg|dd<   | j                                          n# t          $ r Y nw xY wt
                              |            dS )z.od.clear() -> None.  Remove all items from od.N)rG  
itervaluesrF  r6  r   r   )rf   noderJ  s      r   r6  zOrderedDict.clear  s     J1133    DQQQ{t,QQQ
  """"!   JJts   AA 
AATc                     | st          d          | j        }|r|d         }|d         }||d<   ||d<   n|d         }|d         }||d<   ||d<   |d         }| j        |= t                              | |          }||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   r2   r   )r  rF  rG  r   r4  )rf   rM  rJ  linkrP  rQ  r[   r\   s           r   r2  zOrderedDict.popitem  s    
  64555;D 	$Aw G	#	!#QAw G	#Q#	!q'C
3HHT3''E:r   c                      t          |           S )zod.keys() -> list of keys in od)r  r   s    r   keyszOrderedDict.keys      ::r   c                        fd D             S )z#od.values() -> list of values in odc                      g | ]
}|         S r1   r1   r|   r[   rf   s     r   r   z&OrderedDict.values.<locals>.<listcomp>  s    ...#DI...r   r1   r   s   `r   valueszOrderedDict.values  s    ........r   c                        fd D             S )z.od.items() -> list of (key, value) pairs in odc                 $    g | ]}||         fS r1   r1   rc  s     r   r   z%OrderedDict.items.<locals>.<listcomp>  s"    555S$s)$555r   r1   r   s   `r   itemszOrderedDict.items  s    55555555r   c                      t          |           S )z0od.iterkeys() -> an iterator over the keys in od)r  r   s    r   iterkeyszOrderedDict.iterkeys  r`  r   c              #   (   K   | D ]}| |         V  dS )z2od.itervalues -> an iterator over the values in odNr1   rf   ks     r   rZ  zOrderedDict.itervalues  s.        1g r   c              #   ,   K   | D ]}|| |         fV  dS )z=od.iteritems -> an iterator over the (key, value) items in odNr1   rk  s     r   	iteritemszOrderedDict.iteritems  s6       # #$q'l""""# #r   c                     t          |           dk    r t          dt          |           fz            | st          d          | d         }d}t          |           dk    r| d         }t          |t                    r|D ]}||         ||<   n@t	          |d          r#|                                D ]}||         ||<   n|D ]
\  }}|||<   |                                D ]
\  }}|||<   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   r1   r2   r_  N)rV   r   r   r   hasattrr_  rg  )r   rI  rf   otherr[   r\   s         r   re   zOrderedDict.update  s>    4yy1}} !7:=d))!F G G G P NOOO7DE4yyA~~Q%&& &  + +C %c
DII+'' & ::<< + +C %c
DII+ #( & &JC %DII"jjll " "
U!S		" "r   c                 X    || v r| |         }| |= |S || j         u 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  )rf   r[   r   r   s       r   r4  zOrderedDict.pop&  s@    
 d{{cI$-''smm#Nr   Nc                 (    || v r| |         S || |<   |S )zDod.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in odr1   r  s      r   
setdefaultzOrderedDict.setdefault3  s#    d{{Cy DINr   c                     |si }t          |           t                      f}||v rdS d||<   	 | s| j        j        d||= S | j        j        d|                                 d||= S # ||= w xY w)zod.__repr__() <==> repr(od)r   r2   ()())r   
_get_identr%  r.   rg  )rf   _repr_runningcall_keys      r   r  zOrderedDict.__repr__:  s     4"-$xx-H=((u&'M(#, ?%)^%<%<%<> "(++ $(>#:#:#:DJJLLLLI!(++M(+++++s   A) #A) )A.c                       fd D             }t                                                     }t          t                                D ]}|                    |d           |r j        |f|fS  j        |ffS )z%Return state information for picklingc                 $    g | ]}||         gS r1   r1   )r|   rl  rf   s     r   r   z*OrderedDict.__reduce__.<locals>.<listcomp>J  s!    000aaa\000r   N)varsr&  r@  r4  r%  )rf   rg  	inst_dictrl  s   `   r   
__reduce__zOrderedDict.__reduce__H  s    00004000ET

))I+--(( ' 'a&&&& =)<<>E8++r   c                 ,    |                      |           S )z!od.copy() -> a shallow copy of od)r%  r   s    r   r&  zOrderedDict.copyR  s    >>$'''r   c                 .     |             }|D ]}|||<   |S )zOD.fromkeys(S[, v]) -> New ordered dictionary with keys from S
            and values equal to v (which defaults to None).

            r1   )r"  r#  r\   dr[   s        r   r!  zOrderedDict.fromkeysV  s.     A  #Hr   c                     t          |t                    rJt          |           t          |          k    o)|                                 |                                k    S t                              | |          S )zod.__eq__(y) <==> od==y.  Comparison to another OD is order-sensitive
            while comparison to a regular mapping is order-insensitive.

            )r   r@  rV   rg  r   __eq__rf   rq  s     r   r  zOrderedDict.__eq__a  s\    
 %-- O4yy#e**,N1NN;;tU+++r   c                     | |k     S rb   r1   r  s     r   __ne__zOrderedDict.__ne__j  s    u}$$r   c                      t          |           S )z@od.viewkeys() -> a set-like object providing a view on od's keys)rA  r   s    r   viewkeyszOrderedDict.viewkeyso  s    D>>!r   c                      t          |           S )z<od.viewvalues() -> an object providing a view on od's values)rB  r   s    r   
viewvalueszOrderedDict.viewvaluess  s    d###r   c                      t          |           S )zBod.viewitems() -> a set-like object providing a view on od's items)rC  r   s    r   	viewitemszOrderedDict.viewitemsw  s    T??"r   )Trb   )"r.   r/   r0   ri   rh   r   r-  r0  r  rX  r6  r2  r_  rd  rg  ri  rZ  rn  re   rH  objectrs  r4  ru  r  r  r&  r7  r!  r  r  r  r  r  r1   r   r   r@  r@    s       33	) 	) 	)  8<7G 	+ 	+ 	+ 	+ 150@ 	% 	% 	% 	%	 	 		 	 	
	 
	 
		 	 	 	2	 	 		/ 	/ 	/	6 	6 	6	 	 		 	 	
	# 	# 	#
	" 	" 	"> 688#+ 	 	 	 		 	 	 		, 	, 	, 	,	, 	, 	,	( 	( 	( 
	 	 	 
		, 	, 	,	% 	% 	%
	" 	" 	"	$ 	$ 	$	# 	# 	# 	# 	#r   r@  )BaseConfiguratorvalid_identz^[a-z_][a-z0-9_]*$c                 b    t                               |           }|st          d| z            dS )Nz!Not a valid Python identifier: %rT)
IDENTIFIERrB   rT   )r   r  s     r   r  r    s7    Q 	F@1DEEEtr   c                        e Zd ZdZd ZddZdS )ConvertingDictz A converting dictionary wrapper.c                     t                               | |          }| j                            |          }||ur6|| |<   t	          |          t
          t          t          fv r| |_        ||_	        |S rb   )
r   r  configuratorconvertr   r  ConvertingListConvertingTupleparentr[   rf   r[   r\   r   s       r   r  zConvertingDict.__getitem__  s    $$T3//E&..u55FF"""S	<<NN$3$5 5 5$(FM!$FJMr   Nc                     t                               | ||          }| j                            |          }||ur6|| |<   t	          |          t
          t          t          fv r| |_        ||_	        |S rb   )
r   rU   r  r  r   r  r  r  r  r[   rf   r[   r   r\   r   s        r   rU   zConvertingDict.get  ss    HHT300E&..u55FF"""S	<<NN$3$5 5 5$(FM!$FJMr   rb   )r.   r/   r0   ri   r  rU   r1   r   r   r  r    s=        ..
	 
	 
	
	 
	 
	 
	 
	 
	r   r  c                     t                               | ||          }| j                            |          }||ur1t	          |          t
          t          t          fv r| |_        ||_	        |S rb   )
r   r4  r  r  r   r  r  r  r  r[   r  s        r   r4  r4    sj    sG,,"**511F|| / 1 1 1 $ 
r   c                        e Zd ZdZd ZddZdS )r  zA converting list wrapper.c                     t                               | |          }| j                            |          }||ur6|| |<   t	          |          t
          t          t          fv r| |_        ||_	        |S rb   )
r  r  r  r  r   r  r  r  r  r[   r  s       r   r  zConvertingList.__getitem__  r  r   c                     t                               | |          }| j                            |          }||ur*t	          |          t
          t          t          fv r| |_        |S rb   )	r  r4  r  r  r   r  r  r  r  )rf   idxr\   r   s       r   r4  zConvertingList.pop  sa    HHT3''E&..u55FF""<<NN$3$5 5 5$(FMMr   N)r  )r.   r/   r0   ri   r  r4  r1   r   r   r  r    s=        ((
	 
	 
		 	 	 	 	 	r   r  c                       e Zd ZdZd ZdS )r  zA converting tuple wrapper.c                     t                               | |          }| j                            |          }||ur1t	          |          t
          t          t          fv r| |_        ||_	        |S rb   )
tupler  r  r  r   r  r  r  r  r[   r  s       r   r  zConvertingTuple.__getitem__  sj    %%dC00E&..u55FF""<<NN$3$5 5 5$(FM!$FJMr   N)r.   r/   r0   ri   r  r1   r   r   r  r    s)        ))	 	 	 	 	r   r  c                       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
 Zd Zd Zd Zd Zd Z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)r}   cfgc                 F    t          |          | _        | | j        _        d S rb   )r  configr  )rf   r  s     r   rh   zBaseConfigurator.__init__  s!    (00DK'+DK$$$r   c                    |                     d          }|                    d          }	 |                     |          }|D ]P}|d|z   z  }	 t          ||          }# t          $ r( |                     |           t          ||          }Y Mw xY w|S # t
          $ rE t          j                    dd         \  }}t          d|d|          }||c|_	        |_
        |w xY w)zl
            Resolve strings to objects using standard import and attribute
            syntax.
            r4   r   r2   NzCannot resolve z: )r6   r4  importerr   r   ImportErrorr   r   rT   	__cause____traceback__)	rf   r   r   usedfoundrK   etbvs	            r   resolvezBaseConfigurator.resolve  s   
 773<<D88A;;Dd++  5 5DC$J&D5 't 4 4) 5 5 5d+++ 't 4 45    qrr*2J!!!QQ?@@/0",Q_	s0   !B AB /BB BB AC%c                 ,    |                      |          S )z*Default converter for the ext:// protocol.)r  rf   r\   s     r   r  zBaseConfigurator.ext_convert  s    <<&&&r   c                    |}| j                             |          }|t          d|z            ||                                d         }| j        |                                d                  }|r| j                            |          }|r!||                                d                  }n| j                            |          }|rn|                                d         }| j                            |          s	||         }n1	 t          |          }||         }n# t          $ r ||         }Y nw xY w|r||                                d         }nt          d|d|          ||S )z*Default converter for the cfg:// protocol.NzUnable to convert %rr   zUnable to convert z at )WORD_PATTERNrB   rT   endr  groupsDOT_PATTERNINDEX_PATTERNDIGIT_PATTERNintr   )rf   r\   restr  r  r  ns          r   r  zBaseConfigurator.cfg_convert  s   D!''--Ay !7%!?@@@AEEGGHH~K

1. E(..t44A /ahhjjm, .44T:: 	/"#((**Q-C#'#5#;#;C#@#@ /$%cF!/(+CA()!AA'0 !/ !/ !/()#AAA!/ E#AEEGGHH~(j7<uudd*D E E E'  E, Hs   D# #D87D8c                    t          |t                    s-t          |t                    rt          |          }| |_        nt          |t                    s,t          |t
                    rt	          |          }| |_        nt          |t                    s,t          |t                    rt          |          }| |_        nt          |t                    rx| 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?  )r   r  r   r  r  r  r  r  string_typesCONVERT_PATTERNrB   	groupdictvalue_convertersrU   r   )rf   r\   r  r  r  	converterr?  s          r   r  zBaseConfigurator.convert.  sH    e^44 2E49P9P 2&u--%)""~66 2:eT;R;R 2&u--%)""77 2u--2'..%)""E<00 	2(..u55 2Ax[F $ 5 9 9&$ G GI  2!"8$+D)$<$<	 )	& 1 1Lr   c                 F                        d          }t          |          s|                     |          }                     dd          }t          fdD                       } |di |}|r+|                                D ]\  }}t          |||           |S )z1Configure an object with a user-supplied factory.rw  r4   Nc                 B    g | ]}t          |          ||         fS r1   )r  )r|   rl  r  s     r   r   z5BaseConfigurator.configure_custom.<locals>.<listcomp>Q  s,    LLLa[^^LAvay>LLLr   r1   )r4  r   r  r   rg  setattr)rf   r  r<  propsrg   r   r   r\   s    `      r   configure_customz!BaseConfigurator.configure_customJ  s    

4  AA;; $LLOOJJsD))ELLLL6LLLMMFQ[[[[F 1#(;;== 1 1KD%FD%0000Mr   c                 N    t          |t                    rt          |          }|S )z0Utility function which converts lists to tuples.)r   r  r  r  s     r   as_tuplezBaseConfigurator.as_tupleX  s$    %&& %eLr   N)r.   r/   r0   ri   r<   r?   r  r  r  r  r  r  staticmethod
__import__r  rh   r  r  r  r  r  r  r1   r   r   r  r    s       	 	 %"*%MNN!rz/22 bj!233"
#9::"
8,, "!
 
  <
++	, 	, 	,	 	 	.	' 	' 	' 	  	  	D	 	 	8	 	 		 	 	 	 	r   r  )r2   )r   rb   )
__future__r   rm   r<   r   sslr  version_infor   
basestringr  r   r   typesr   	file_type__builtin__builtinsConfigParserconfigparserr   r   r	   r
   r   urllibr   r   r   r   r   r   r   r   urllib2r   r   r   r   r    r!   r"   r#   r$   r%   httplib	xmlrpclibQueuequeuer&   htmlentitydefs	raw_input	itertoolsr'   filterr(   r*   iostrr)   shutilurllib.parseurllib.requesturllib.errorhttp.clientclientrequestxmlrpc.clienthtml.parserhtml.entitiesentitiesinputr+   r,   rT   rM   r^   r`   r  rj   F_OKX_OKzipfiler   r   rp  r   BaseZipExtFiler   r   	sysconfigr   	NameErrorcollections.abcr   r   r   r   getfilesystemencodingr   r   tokenizer   codecsr   r   r?   r   r   htmlr=   cgir   collectionsr   r   reprlibr   r  importlib.utilr:  r@  threadr   rz  dummy_thread_abcollrA  rB  rC  r   logging.configr  r  Ir  r  r4  r  r  r  r  r1   r   r   <module>r     s9   ' & & & & & 				 				 



JJJJ   
CCC A!!!!!!;LI++++++""""''''LLLLLLLLLLLLLLG G G G G G G G G G G G G G G G G G  
 NNN' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '  )((((((NNN%%%%%%I++++++5555555  4LI------OOOMMMH H H H H H H H H H H H H H H H H H H H. . . . . . . . . . . . . . . . . . . . . . . .
  0//////FFFFFFFFFF!!!!!!$$$$$$%%%%%%LLL&&&&&&******I%%%%%%Fa4444444444 _4 _4 _4    :   /# /# /# /#d(4 (4 (4 (4 (4o_4D)2222222 ) ) )) ) ) ) )F ) ) ) ) ))@ > > >"') < < < < < <>F + * * * * *
7;$$ $GG444444    ^   
$ 
$ 
$ 
$ 
$+ 
$ 
$ 
$....... 	 	 	    	     )HH ) ) )(((((() ) ) ) )) 5{H{HH 5 5 5 ,#+--8Kf		%	5 5 55 5 5 5 5-5>k(((((((( i( i( i(''''''''III
455I	 	 	X( X( X( X( X(#i(X   BQB&  z||$HHE!$$$$$$$ C! C! C!******'======= ' ' '	' 	' 	' 	' 	' 	''<`! `! `! `! `!> `! `! `! `! `!GC!J0000000 	 	 	     	E#''''''' C# C# C#92222222 9 9 9888888889;;;;;;;;;;;   t# t# t# t# t#d t# t# t# t# t#C#Ja<<<<<<<<<< _ _ _0"$77J          6          .
 
 
 
 
% 
 
 
C C C C C6 C C C C C Cy_sQ   ##E E('E(,E3 3F	F	F F/.F/*G1 1G<;G<H HH H/ /'III$ $'JJJ J'&J'K L'K.-L.	K:7L9K::LLL 	L%$L%)L0 0M66L=<M6=MM6
MM6
MM6M"M6!M""M65M6:N AO"!O"