
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
ó
•�abc           @@  s°  d  d l  m Z d  d l Z d  d l Z d  d l Z y d  d l Z Wn e k
 r] d Z n Xe 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
 „  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/ n  d  d l0 Z0 d  d l1 Z1 d  d l2 Z3 d  d l4 m4 Z4 d  d l5 Z5 e6 Z6 d  d l7 m8 Z9 d  d l7 m: Z; d a< 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 lA m Z m Z m Z m= Z= m Z m  Z  m Z m Z m$ Z$ d  d lB m' Z' m Z m& Z& m! Z! m" Z" m* Z* m+ Z+ m, Z, m- Z- m. Z. e rüd  d lB m/ Z/ n  d  d lC m) Z) m( Z( m# Z# d  d lD jE Z0 d  d lB jF Z% d  d lG jE Z1 d  d l3 Z3 d  d lH m4 Z4 d  d lI jJ Z5 eK Z6 d  d l7 m; Z; e9 Z9 y d  d l mL ZL mM ZM Wn< e k
 räd eN f d „  ƒ  YZM d d „ ZO d „  ZL n Xy d  d l mP ZQ Wn' e k
 r"d eR f d „  ƒ  YZQ n Xy d  d l mS ZS Wn* e k
 rce jT e jU Bd d „ ZS n Xd  d  lV mW ZX eY eX d! ƒ rŒeX ZW n< d  d" lV mZ Z[ d# e[ f d$ „  ƒ  YZZ d% eX f d& „  ƒ  YZW y d  d' l\ m] Z] Wn e k
 rød( „  Z] n Xy d  d l^ Z^ Wn! e k
 r,d d) l m^ Z^ n Xy
 e_ Z_ Wn* e` k
 rcd  d* la mb Zb d+ „  Z_ n Xy e jc Zc e jd Zd WnJ ee k
 rÆe jf ƒ  Zg eg d, k r«d- Zh n d. Zh d/ „  Zc d0 „  Zd n Xy d  d1 li mj Zj WnT e k
 r1d  d2 lk ml Zl mm Zm d  d l Z e jn d3 ƒ Zo d4 „  Zp d5 „  Zj n Xy d  d6 lq mr Zr Wn! e k
 rid  d6 ls mr Zr n Xe j d7  dT k  rŒe4 ƒ  jt Zt n d  d9 lq mt Zt y d  d: la mu Zu Wnk e k
 rd  d; la mv Zv y d  d< lw mx Zy Wn e k
 rd= d> „ Zy n Xd? ev f d@ „  ƒ  YZu n Xy d  dA lz m{ Z{ Wn e k
 rQd dB „ Z{ n Xy d  dC la m| Z| Wn“ e k
 rûy d  dD l} m~ Z Wn! e k
 r­d  dD l€ m~ Z n Xy  d  dE l� m‚ Z‚ mƒ Zƒ m„ Z„ Wn e k
 rán XdF e… f dG „  ƒ  YZ| n Xy d  dH l† m‡ Z‡ mˆ Zˆ Wn“ e k
 r«e jn dI e j‰ ƒ ZŠ dJ „  Zˆ dK e… f dL „  ƒ  YZ‹ d dM „ ZŒ dN e� f dO „  ƒ  YZŽ dP e� f dQ „  ƒ  YZ� dR eR f dS „  ƒ  YZ‡ n Xd S(U   i    (   t   absolute_importNi   (   t   StringIO(   t   FileTypei   (   t   shutil(   t   urlparset
   urlunparset   urljoint   urlsplitt
   urlunsplit(   t   urlretrievet   quotet   unquotet   url2pathnamet   pathname2urlt   ContentTooShortErrort	   splittypec         C@  s+   t  |  t ƒ r! |  j d ƒ }  n  t |  ƒ S(   Ns   utf-8(   t
   isinstancet   unicodet   encodet   _quote(   t   s(    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyR
      s    (	   t   Requestt   urlopent   URLErrort	   HTTPErrort   HTTPBasicAuthHandlert   HTTPPasswordMgrt   HTTPHandlert   HTTPRedirectHandlert   build_opener(   t   HTTPSHandler(   t
   HTMLParser(   t   ifilter(   t   ifilterfalsec         C@  sY   t  d k r* d d l } | j d ƒ a  n  t  j |  ƒ } | rO | j d d ƒ Sd |  f S(   sJ   splituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'.i    Ns   ^(.*)@(.*)$i   i   (   t	   _userprogt   Nonet   ret   compilet   matcht   group(   t   hostR$   R&   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt	   splituser4   s     (   t   TextIOWrapper(	   R   R   R   R)   R
   R   R   R   R   (
   R   R	   R   R   R   R   R   R   R   R   (   R   R   R   (   t   filterfalse(   t   match_hostnamet   CertificateErrorR-   c           B@  s   e  Z RS(    (   t   __name__t
   __module__(    (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyR-   ^   s   c   
      C@  sS  g  } |  s t  S|  j d ƒ } | d | d } } | j d ƒ } | | k rh t d t |  ƒ ƒ ‚ n  | s„ |  j ƒ  | j ƒ  k S| d k r  | j d ƒ nY | j d ƒ s¾ | j d ƒ r× | j t j	 | ƒ ƒ n" | j t j	 | ƒ j
 d d	 ƒ ƒ x$ | D] } | j t j	 | ƒ ƒ q Wt j d
 d j | ƒ d t j ƒ }	 |	 j | ƒ S(   sp   Matching according to RFC 6125, section 6.4.3

        http://tools.ietf.org/html/rfc6125#section-6.4.3
        t   .i    i   t   *s,   too many wildcards in certificate DNS name: s   [^.]+s   xn--s   \*s   [^.]*s   \As   \.s   \Z(   t   Falset   splitt   countR-   t   reprt   lowert   appendt
   startswithR$   t   escapet   replaceR%   t   joint
   IGNORECASER&   (
   t   dnt   hostnamet   max_wildcardst   patst   partst   leftmostt	   remaindert	   wildcardst   fragt   pat(    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   _dnsname_matchb   s(    "&c         C@  s[  |  s t  d ƒ ‚ n  g  } |  j d d ƒ } xC | D]; \ } } | d k r4 t | | ƒ r_ d S| j | ƒ q4 q4 W| sß xc |  j d d ƒ D]L } xC | D]; \ } } | d k r™ t | | ƒ rÄ d S| j | ƒ q™ q™ WqŒ Wn  t | ƒ d k rt d | d	 j t t | ƒ ƒ f ƒ ‚ n; t | ƒ d k rKt d
 | | d f ƒ ‚ n t d ƒ ‚ d S(   s=  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.
        st   empty or no certificate, match_hostname needs a SSL socket or SSL context with either CERT_OPTIONAL or CERT_REQUIREDt   subjectAltNamet   DNSNt   subjectt
   commonNamei   s&   hostname %r doesn't match either of %ss   , s   hostname %r doesn't match %ri    s=   no appropriate commonName or subjectAltName fields were found(    (    (	   t
   ValueErrort   getRG   R7   t   lenR-   R;   t   mapR5   (   t   certR>   t   dnsnamest   sant   keyt   valuet   sub(    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyR,   ”   s.    %(   t   SimpleNamespacet	   Containerc           B@  s   e  Z d  Z d „  Z RS(   sR   
        A generic container for when multiple values need to be returned
        c         K@  s   |  j  j | ƒ d  S(   N(   t   __dict__t   update(   t   selft   kwargs(    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   __init__Æ   s    (   R.   R/   t   __doc__R\   (    (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRW   Â   s   (   t   whichc         @  s   d „  } t  j j ˆ  ƒ r2 | ˆ  | ƒ r. ˆ  Sd S| d k rY t  j j d t  j ƒ } n  | sc d S| j t  j ƒ } t	 j
 d k rt  j | k r© | j d t  j ƒ n  t  j j d d ƒ j t  j ƒ } t ‡  f d †  | Dƒ ƒ rò ˆ  g } qg  | D] } ˆ  | ^ qù } n	 ˆ  g } t ƒ  } xu | D]m } t  j j | ƒ }	 |	 | k r+| j |	 ƒ x9 | D]. }
 t  j j | |
 ƒ } | | | ƒ rc| SqcWq+q+Wd S(	   sK  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@  s5   t  j j |  ƒ o4 t  j |  | ƒ o4 t  j j |  ƒ S(   N(   t   ost   patht   existst   accesst   isdir(   t   fnt   mode(    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   _access_checkÛ   s    $t   PATHt   win32i    t   PATHEXTt    c         3@  s*   |  ]  } ˆ  j  ƒ  j | j  ƒ  ƒ Vq d  S(   N(   R6   t   endswith(   t   .0t   ext(   t   cmd(    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pys	   <genexpr>ø   s    N(   R_   R`   t   dirnameR#   t   environRM   t   defpathR3   t   pathsept   syst   platformt   curdirt   insertt   anyt   sett   normcaset   addR;   (   Rn   Re   R`   Rf   t   pathextt   filesRm   t   seent   dirt   normdirt   thefilet   name(    (   Rn   s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyR^   Î   s8    	! 		(   t   ZipFilet	   __enter__(   t
   ZipExtFileR„   c           B@  s#   e  Z d  „  Z d „  Z d „  Z RS(   c         C@  s   |  j  j | j  ƒ d  S(   N(   RX   RY   (   RZ   t   base(    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyR\     s    c         C@  s   |  S(   N(    (   RZ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRƒ     s    c         G@  s   |  j  ƒ  d  S(   N(   t   close(   RZ   t   exc_info(    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   __exit__  s    (   R.   R/   R\   Rƒ   Rˆ   (    (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyR„     s   		R‚   c           B@  s#   e  Z d  „  Z d „  Z d „  Z RS(   c         C@  s   |  S(   N(    (   RZ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRƒ   "  s    c         G@  s   |  j  ƒ  d  S(   N(   R†   (   RZ   R‡   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRˆ   %  s    c         O@  s   t  j |  | | Ž } t | ƒ S(   N(   t   BaseZipFilet   openR„   (   RZ   t   argsR[   R…   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRŠ   )  s    (   R.   R/   Rƒ   Rˆ   RŠ   (    (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyR‚   !  s   		(   t   python_implementationc           C@  s@   d t  j k r d St j d k r& d St  j j d ƒ r< d Sd S(   s6   Return a string identifying the Python implementation.t   PyPyt   javat   Jythont
   IronPythont   CPython(   Rs   t   versionR_   R�   R8   (    (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRŒ   0  s    (   t	   sysconfig(   t   Callablec         C@  s   t  |  t ƒ S(   N(   R   R”   (   t   obj(    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   callableD  s    t   mbcst   strictt   surrogateescapec         C@  sO   t  |  t ƒ r |  St  |  t ƒ r2 |  j t t ƒ St d t |  ƒ j ƒ ‚ d  S(   Ns   expect bytes or str, not %s(	   R   t   bytest	   text_typeR   t   _fsencodingt	   _fserrorst	   TypeErrort   typeR.   (   t   filename(    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   fsencodeR  s    c         C@  sO   t  |  t ƒ r |  St  |  t ƒ r2 |  j t t ƒ St d t |  ƒ j ƒ ‚ d  S(   Ns   expect bytes or str, not %s(	   R   R›   Rš   t   decodeRœ   R�   Rž   RŸ   R.   (   R    (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   fsdecode[  s    (   t   detect_encoding(   t   BOM_UTF8t   lookups   coding[:=]\s*([-\w.]+)c         C@  s^   |  d  j  ƒ  j d d ƒ } | d k s7 | j d ƒ r; d S| d k sV | j d ƒ rZ d S|  S(   s(   Imitates get_normal_name in tokenizer.c.i   t   _t   -s   utf-8s   utf-8-s   latin-1s
   iso-8859-1s   iso-latin-1s   latin-1-s   iso-8859-1-s   iso-latin-1-(   s   latin-1s
   iso-8859-1s   iso-latin-1(   s   latin-1-s   iso-8859-1-s   iso-latin-1-(   R6   R:   R8   (   t   orig_enct   enc(    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   _get_normal_namel  s    c         @  s  y ˆ j  j ‰ Wn t k
 r) d ‰ n Xt ‰  d } d } ‡ f d †  } ‡  ‡ f d †  } | ƒ  } | j t ƒ rŽ t ‰  | d } d } n  | sž | g  f S| | ƒ } | r½ | | g f S| ƒ  } | sÙ | | g f S| | ƒ } | rû | | | g f S| | | g f S(   s?  
        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.
        s   utf-8c           @  s$   y ˆ  ƒ  SWn t  k
 r d SXd  S(   NRj   (   t   StopIteration(    (   t   readline(    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   read_or_stop�  s    c         @  s7  y |  j  d ƒ } WnD t k
 rY d } ˆ d  k	 rJ d j | ˆ ƒ } n  t | ƒ ‚ n Xt j | ƒ } | ss d  St | d ƒ } y t | ƒ } WnH t	 k
 rÝ ˆ d  k r¼ d | } n d j ˆ | ƒ } t | ƒ ‚ n Xˆ  r3| j
 d k r&ˆ d  k rd } n d j ˆ ƒ } t | ƒ ‚ n  | d	 7} n  | S(
   Ns   utf-8s'   invalid or missing encoding declarations   {} for {!r}i    s   unknown encoding: s   unknown encoding for {!r}: {}s   encoding problem: utf-8s    encoding problem for {!r}: utf-8s   -sig(   R¢   t   UnicodeDecodeErrorR#   t   formatt   SyntaxErrort	   cookie_ret   findallR«   R¦   t   LookupErrorR�   (   t   linet   line_stringt   msgt   matchest   encodingt   codec(   t	   bom_foundR    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   find_cookie•  s6    			i   s	   utf-8-sigN(   t   __self__R�   t   AttributeErrorR#   R2   R8   R¥   t   True(   R­   R¹   t   defaultR®   R¼   t   firstt   second(    (   R»   R    R­   s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyR¤   w  s4    
&	
	
	(   R9   i   i   (   t   unescape(   t   ChainMap(   t   MutableMapping(   t   recursive_reprs   ...c         @  s   ‡  f d †  } | S(   sm   
            Decorator to make a repr function return fillvalue for a recursive
            call
            c         @  sm   t  ƒ  ‰  ‡ ‡  ‡ f d †  } t ˆ d ƒ | _ t ˆ d ƒ | _ t ˆ d ƒ | _ t ˆ d i  ƒ | _ | S(   Nc         @  sW   t  |  ƒ t ƒ  f } | ˆ k r% ˆ  Sˆ j | ƒ z ˆ |  ƒ } Wd  ˆ j | ƒ X| S(   N(   t   idt	   get_identRz   t   discard(   RZ   RS   t   result(   t	   fillvaluet   repr_runningt   user_function(    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   wrapperì  s    R/   R]   R.   t   __annotations__(   Rx   t   getattrR/   R]   R.   RÏ   (   RÍ   RÎ   (   RË   (   RÌ   RÍ   s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   decorating_functioné  s    	(    (   RË   RÑ   (    (   RË   s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   _recursive_reprã  s    RÄ   c           B@  sÎ   e  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 RS(   sÍ   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(   s˜   Initialize a ChainMap by setting *maps* to the given mappings.
            If no mappings are provided, a single empty dictionary is used.

            N(   t   listt   maps(   RZ   RÔ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyR\     s    c         C@  s   t  | ƒ ‚ d  S(   N(   t   KeyError(   RZ   RS   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   __missing__  s    c         C@  sA   x1 |  j  D]& } y | | SWq
 t k
 r/ q
 Xq
 W|  j | ƒ S(   N(   RÔ   RÕ   RÖ   (   RZ   RS   t   mapping(    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   __getitem__  s    c         C@  s   | |  k r |  | S| S(   N(    (   RZ   RS   RÀ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRM     s    c         C@  s   t  t ƒ  j |  j Œ  ƒ S(   N(   RN   Rx   t   unionRÔ   (   RZ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   __len__"  s    c         C@  s   t  t ƒ  j |  j Œ  ƒ S(   N(   t   iterRx   RÙ   RÔ   (   RZ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   __iter__%  s    c         @  s   t  ‡  f d †  |  j Dƒ ƒ S(   Nc         3@  s   |  ] } ˆ  | k Vq d  S(   N(    (   Rl   t   m(   RS   (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pys	   <genexpr>)  s    (   Rw   RÔ   (   RZ   RS   (    (   RS   s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   __contains__(  s    c         C@  s   t  |  j ƒ S(   N(   Rw   RÔ   (   RZ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   __bool__+  s    c         C@  s%   d j  |  d j t t |  j ƒ ƒ ƒ S(   Ns   {0.__class__.__name__}({1})s   , (   R°   R;   RO   R5   RÔ   (   RZ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   __repr__.  s    c         G@  s   |  t  j | | Œ ƒ S(   s?   Create a ChainMap with a single dict created from the iterable.(   t   dictt   fromkeys(   t   clst   iterableR‹   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRâ   3  s    c         C@  s$   |  j  |  j d j ƒ  |  j d Œ S(   sH   New ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]i    i   (   t	   __class__RÔ   t   copy(   RZ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRæ   8  s    c         C@  s   |  j  i  |  j Œ S(   s;   New ChainMap with a new dict followed by all previous maps.(   Rå   RÔ   (   RZ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt	   new_child>  s    c         C@  s   |  j  |  j d Œ  S(   s   New ChainMap from maps[1:].i   (   Rå   RÔ   (   RZ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   parentsB  s    c         C@  s   | |  j  d | <d  S(   Ni    (   RÔ   (   RZ   RS   RT   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   __setitem__G  s    c         C@  s?   y |  j  d | =Wn& t k
 r: t d j | ƒ ƒ ‚ n Xd  S(   Ni    s(   Key not found in the first mapping: {!r}(   RÔ   RÕ   R°   (   RZ   RS   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   __delitem__J  s    c         C@  s9   y |  j  d j ƒ  SWn t k
 r4 t d ƒ ‚ n Xd S(   sP   Remove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.i    s#   No keys found in the first mapping.N(   RÔ   t   popitemRÕ   (   RZ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRë   P  s    c         G@  sH   y |  j  d j | | Œ SWn& t k
 rC t d j | ƒ ƒ ‚ n Xd S(   sW   Remove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].i    s(   Key not found in the first mapping: {!r}N(   RÔ   t   popRÕ   R°   (   RZ   RS   R‹   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRì   W  s    c         C@  s   |  j  d j ƒ  d S(   s'   Clear maps[0], leaving maps[1:] intact.i    N(   RÔ   t   clear(   RZ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRí   ^  s    N(   R.   R/   R]   R\   RÖ   RØ   R#   RM   RÚ   RÜ   RÞ   Rß   RÒ   Rà   t   classmethodRâ   Ræ   t   __copy__Rç   t   propertyRè   Ré   Rê   Rë   Rì   Rí   (    (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRÄ      s(   													(   t   cache_from_sourcec         C@  s2   | d  k r t } n  | r$ d } n d } |  | S(   Nt   ct   o(   R#   t	   __debug__(   R`   t   debug_overridet   suffix(    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRñ   e  s    		(   t   OrderedDict(   RÈ   (   t   KeysViewt
   ValuesViewt	   ItemsViewR÷   c           B@  s  e  Z d  Z d „  Z e j d „ Z e j d „ Z d „  Z d „  Z d „  Z	 e
 d „ Z d „  Z d	 „  Z d
 „  Z d „  Z d „  Z d „  Z d „  Z e Z e ƒ  Z e 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" RS(   s)   Dictionary that remembers insertion orderc         O@  s„   t  | ƒ d k r+ t d t  | ƒ ƒ ‚ n  y |  j Wn7 t k
 ro g  |  _ } | | d g | (i  |  _ n X|  j | | Ž  d S(   sÑ   Initialize an ordered dictionary.  Signature is the same as for
            regular dictionaries, but keyword arguments are not recommended
            because their insertion order is arbitrary.

            i   s$   expected at most 1 arguments, got %dN(   RN   Rž   t   _OrderedDict__rootR¾   R#   t   _OrderedDict__mapt   _OrderedDict__update(   RZ   R‹   t   kwdst   root(    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyR\   Œ  s    c         C@  s\   | |  k rH |  j  } | d } | | | g | d <| d <|  j | <n  | |  | | ƒ d S(   s!   od.__setitem__(i, y) <==> od[i]=yi    i   N(   Rû   Rü   (   RZ   RS   RT   t   dict_setitemRÿ   t   last(    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRé   œ  s
    	
)c         C@  s@   | |  | ƒ |  j  j | ƒ \ } } } | | d <| | d <d S(   s    od.__delitem__(y) <==> del od[y]i   i    N(   Rü   Rì   (   RZ   RS   t   dict_delitemt	   link_prevt	   link_next(    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRê   ¦  s    
c         c@  s=   |  j  } | d } x# | | k	 r8 | d V| d } q Wd S(   s   od.__iter__() <==> iter(od)i   i   N(   Rû   (   RZ   Rÿ   t   curr(    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRÜ   ¯  s
    	
	c         c@  s=   |  j  } | d } x# | | k	 r8 | d V| d } q Wd S(   s#   od.__reversed__() <==> reversed(od)i    i   N(   Rû   (   RZ   Rÿ   R  (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   __reversed__·  s
    	
	c         C@  sm   yH x |  j  j ƒ  D]
 } | 2q W|  j } | | d g | (|  j  j ƒ  Wn t k
 r[ n Xt j |  ƒ d S(   s.   od.clear() -> None.  Remove all items from od.N(   Rü   t
   itervaluesRû   R#   Rí   R¾   Rá   (   RZ   t   nodeRÿ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRí   ¿  s    	c         C@  s§   |  s t  d ƒ ‚ n  |  j } | rO | d } | d } | | d <| | d <n( | d } | d } | | d <| | d <| d } |  j | =t j |  | ƒ } | | f S(   s¡   od.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.

            s   dictionary is emptyi    i   i   (   RÕ   Rû   Rü   Rá   Rì   (   RZ   R  Rÿ   t   linkR  R  RS   RT   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRë   Ë  s     	








c         C@  s
   t  |  ƒ S(   s   od.keys() -> list of keys in od(   RÓ   (   RZ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   keysä  s    c         C@  s   g  |  D] } |  | ^ q S(   s#   od.values() -> list of values in od(    (   RZ   RS   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   valuesè  s    c         C@  s!   g  |  D] } | |  | f ^ q S(   s.   od.items() -> list of (key, value) pairs in od(    (   RZ   RS   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   itemsì  s    c         C@  s
   t  |  ƒ S(   s0   od.iterkeys() -> an iterator over the keys in od(   RÛ   (   RZ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   iterkeysð  s    c         c@  s   x |  D] } |  | Vq Wd S(   s2   od.itervalues -> an iterator over the values in odN(    (   RZ   t   k(    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyR  ô  s    c         c@  s$   x |  D] } | |  | f Vq Wd S(   s=   od.iteritems -> an iterator over the (key, value) items in odN(    (   RZ   R  (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt	   iteritemsù  s    c          O@  s&  t  |  ƒ d k r. t d t  |  ƒ f ƒ ‚ n |  sC t d ƒ ‚ n  |  d } d } t  |  ƒ d k rr |  d } n  t | t ƒ r£ xw | D] } | | | | <qˆ WnX t | d ƒ rÚ xF | j ƒ  D] } | | | | <q¿ Wn! x | D] \ } } | | | <qá Wx$ | j ƒ  D] \ } } | | | <qWd S(	   s—  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

            i   s8   update() takes at most 2 positional arguments (%d given)s,   update() takes at least 1 argument (0 given)i    i   R
  N(    (   RN   Rž   R   Rá   t   hasattrR
  R  (   R‹   Rþ   RZ   t   otherRS   RT   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRY   þ  s&    	
c         C@  sC   | |  k r! |  | } |  | =| S| |  j  k r? t | ƒ ‚ n  | S(   s±   od.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.

            (   t   _OrderedDict__markerRÕ   (   RZ   RS   RÀ   RÊ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRì   !  s    
c         C@  s"   | |  k r |  | S| |  | <| S(   sD   od.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od(    (   RZ   RS   RÀ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt
   setdefault.  s    
c         C@  s‚   | s i  } n  t  |  ƒ t ƒ  f } | | k r4 d Sd | | <z5 |  sX d |  j j f Sd |  j j |  j ƒ  f SWd | | =Xd S(   s   od.__repr__() <==> repr(od)s   ...i   s   %s()s   %s(%r)N(   RÇ   t
   _get_identRå   R.   R  (   RZ   t   _repr_runningt   call_key(    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRà   5  s     	
c         C@  sˆ   g  |  D] } | |  | g ^ q } t  |  ƒ j ƒ  } x' t  t ƒ  ƒ D] } | j | d ƒ qE W| rx |  j | f | f S|  j | f f S(   s%   Return state information for picklingN(   t   varsRæ   R÷   Rì   R#   Rå   (   RZ   R  R  t	   inst_dict(    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt
   __reduce__C  s    #c         C@  s   |  j  |  ƒ S(   s!   od.copy() -> a shallow copy of od(   Rå   (   RZ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRæ   M  s    c         C@  s(   |  ƒ  } x | D] } | | | <q W| S(   sˆ   OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S
            and values equal to v (which defaults to None).

            (    (   Rã   Rä   RT   t   dRS   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRâ   Q  s    	c         C@  sM   t  | t ƒ r= t |  ƒ t | ƒ k o< |  j ƒ  | j ƒ  k St j |  | ƒ S(   s›   od.__eq__(y) <==> od==y.  Comparison to another OD is order-sensitive
            while comparison to a regular mapping is order-insensitive.

            (   R   R÷   RN   R  Rá   t   __eq__(   RZ   R  (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyR  \  s    .c         C@  s   |  | k S(   N(    (   RZ   R  (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   __ne__e  s    c         C@  s
   t  |  ƒ S(   s@   od.viewkeys() -> a set-like object providing a view on od's keys(   Rø   (   RZ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   viewkeysj  s    c         C@  s
   t  |  ƒ S(   s<   od.viewvalues() -> an object providing a view on od's values(   Rù   (   RZ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt
   viewvaluesn  s    c         C@  s
   t  |  ƒ S(   sB   od.viewitems() -> a set-like object providing a view on od's items(   Rú   (   RZ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt	   viewitemsr  s    N(#   R.   R/   R]   R\   Rá   Ré   Rê   RÜ   R  Rí   R¿   Rë   R
  R  R  R  R  R  RY   Rý   t   objectR  Rì   R#   R  Rà   R  Ræ   Rî   Râ   R  R  R  R  R  (    (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyR÷   €  s:   	
													
	
					(   t   BaseConfiguratort   valid_idents   ^[a-z_][a-z0-9_]*$c         C@  s,   t  j |  ƒ } | s( t d |  ƒ ‚ n  t S(   Ns!   Not a valid Python identifier: %r(   t
   IDENTIFIERR&   RL   R¿   (   R   RÝ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyR"  |  s    t   ConvertingDictc           B@  s#   e  Z d  Z d „  Z d d „ Z RS(   s    A converting dictionary wrapper.c         C@  sq   t  j |  | ƒ } |  j j | ƒ } | | k	 rm | |  | <t | ƒ t t t f k rm |  | _ | | _	 qm n  | S(   N(
   Rá   RØ   t   configuratort   convertRŸ   R$  t   ConvertingListt   ConvertingTuplet   parentRS   (   RZ   RS   RT   RÊ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRØ   �  s    
	c         C@  st   t  j |  | | ƒ } |  j j | ƒ } | | k	 rp | |  | <t | ƒ t t t f k rp |  | _ | | _	 qp n  | S(   N(
   Rá   RM   R%  R&  RŸ   R$  R'  R(  R)  RS   (   RZ   RS   RÀ   RT   RÊ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRM   ›  s    
	N(   R.   R/   R]   RØ   R#   RM   (    (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyR$  Œ  s   	c         C@  sj   t  j |  | | ƒ } |  j j | ƒ } | | k	 rf t | ƒ t t t f k rf |  | _ | | _	 qf n  | S(   N(
   Rá   Rì   R%  R&  RŸ   R$  R'  R(  R)  RS   (   RZ   RS   RÀ   RT   RÊ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRì   §  s    	R'  c           B@  s#   e  Z d  Z d „  Z d d „ Z RS(   s   A converting list wrapper.c         C@  sq   t  j |  | ƒ } |  j j | ƒ } | | k	 rm | |  | <t | ƒ t t t f k rm |  | _ | | _	 qm n  | S(   N(
   RÓ   RØ   R%  R&  RŸ   R$  R'  R(  R)  RS   (   RZ   RS   RT   RÊ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRØ   ³  s    
	iÿÿÿÿc         C@  s^   t  j |  | ƒ } |  j j | ƒ } | | k	 rZ t | ƒ t t t f k rZ |  | _ qZ n  | S(   N(	   RÓ   Rì   R%  R&  RŸ   R$  R'  R(  R)  (   RZ   t   idxRT   RÊ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRì   ¿  s    (   R.   R/   R]   RØ   Rì   (    (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyR'  ±  s   	R(  c           B@  s   e  Z d  Z d „  Z RS(   s   A converting tuple wrapper.c         C@  sg   t  j |  | ƒ } |  j j | ƒ } | | k	 rc t | ƒ t t t f k rc |  | _ | | _	 qc n  | S(   N(
   t   tupleRØ   R%  R&  RŸ   R$  R'  R(  R)  RS   (   RZ   RS   RT   RÊ   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyRØ   Ê  s    	(   R.   R/   R]   RØ   (    (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyR(  È  s   R!  c           B@  s¸   e  Z d  Z e j d ƒ Z e j d ƒ Z e j d ƒ Z e j d ƒ Z e j d ƒ Z	 i d d 6d d	 6Z
 e e ƒ Z d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   sQ   
        The configurator base class which defines some useful defaults.
        s%   ^(?P<prefix>[a-z]+)://(?P<suffix>.*)$s   ^\s*(\w+)\s*s   ^\.\s*(\w+)\s*s   ^\[\s*(\w+)\s*\]\s*s   ^\d+$t   ext_convertRm   t   cfg_convertt   cfgc         C@  s   t  | ƒ |  _ |  |  j _ d  S(   N(   R$  t   configR%  (   RZ   R/  (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyR\   è  s    c   	      C@  sô   | j  d ƒ } | j d ƒ } yy |  j | ƒ } x_ | D]W } | d | 7} y t | | ƒ } Wq7 t k
 r� |  j | ƒ t | | ƒ } q7 Xq7 W| SWnV t k
 rï t j ƒ  d \ } } t d | | f ƒ } | | | _	 | _
 | ‚ n Xd S(   sl   
            Resolve strings to objects using standard import and attribute
            syntax.
            R0   i    i   s   Cannot resolve %r: %sN(   R3   Rì   t   importerRÐ   R¾   t   ImportErrorRs   R‡   RL   t	   __cause__t   __traceback__(	   RZ   R   R�   t   usedt   foundRE   t   et   tbt   v(    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   resolveì  s"    c         C@  s   |  j  | ƒ S(   s*   Default converter for the ext:// protocol.(   R9  (   RZ   RT   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyR,    s    c         C@  sO  | } |  j  j | ƒ } | d k r7 t d | ƒ ‚ n| | j ƒ  } |  j | j ƒ  d } xê | rJ|  j j | ƒ } | r– | | j ƒ  d } n‚ |  j j | ƒ } | r| j ƒ  d } |  j	 j | ƒ sÝ | | } qy t
 | ƒ } | | } Wqt k
 r| | } qXn  | r1| | j ƒ  } qa t d | | f ƒ ‚ qa W| S(   s*   Default converter for the cfg:// protocol.s   Unable to convert %ri    s   Unable to convert %r at %rN(   t   WORD_PATTERNR&   R#   RL   t   endR/  t   groupst   DOT_PATTERNt   INDEX_PATTERNt   DIGIT_PATTERNt   intRž   (   RZ   RT   t   restRÝ   R  R*  t   n(    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyR-    s2    	c         C@  s/  t  | t ƒ r7 t  | t ƒ r7 t | ƒ } |  | _ nô t  | t ƒ rn t  | t ƒ rn t | ƒ } |  | _ n½ t  | t ƒ r¥ t  | t ƒ r¥ t | ƒ } |  | _ n† t  | t ƒ r+|  j	 j
 | ƒ } | r+| j ƒ  } | d } |  j j | d ƒ } | r(| d } t |  | ƒ } | | ƒ } q(q+n  | S(   sù   
            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.
            t   prefixRö   N(   R   R$  Rá   R%  R'  RÓ   R(  R+  t   string_typest   CONVERT_PATTERNR&   t	   groupdictt   value_convertersRM   R#   RÐ   (   RZ   RT   RÝ   R  RC  t	   converterRö   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyR&  )  s*    

c   	      C@  sº   | j  d ƒ } t | ƒ s- |  j | ƒ } n  | j  d d ƒ } t g  | D]" } t | ƒ rI | | | f ^ qI ƒ } | | �  } | r¶ x- | j ƒ  D] \ } } t | | | ƒ q“ Wn  | S(   s1   Configure an object with a user-supplied factory.s   ()R0   N(   Rì   R–   R9  R#   Rá   R"  R  t   setattr(	   RZ   R/  Rò   t   propsR  R[   RÊ   R�   RT   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   configure_customE  s    5c         C@  s"   t  | t ƒ r t | ƒ } n  | S(   s0   Utility function which converts lists to tuples.(   R   RÓ   R+  (   RZ   RT   (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   as_tupleS  s    (   R.   R/   R]   R$   R%   RE  R:  R=  R>  R?  RG  t   staticmethodt
   __import__R0  R\   R9  R,  R-  R&  RK  RL  (    (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyR!  Ô  s"   
				"		(   i   i   (‘   t
   __future__R    R_   R$   Rs   t   sslR1  R#   t   version_infoR   t
   basestringRD  R   R›   t   typesR   t	   file_typet   __builtin__t   builtinst   ConfigParsert   configparsert	   _backportR   R   R   R   R   R   t   urllibR	   R
   R   R   R   R   R   R   t   urllib2R   R   R   R   R   R   R   R   R   R   t   httplibt	   xmlrpclibt   Queuet   queueR   t   htmlentitydefst	   raw_inputt	   itertoolsR    t   filterR!   R+   R"   R)   t   iot   strR*   t   urllib.parset   urllib.requestt   urllib.errort   http.clientt   clientt   requestt   xmlrpc.clientt   html.parsert   html.entitiest   entitiest   inputR,   R-   RL   RG   RV   RW   R   R^   t   F_OKt   X_OKt   zipfileR‚   R‰   R  R„   t   BaseZipExtFileRt   RŒ   R“   R–   t	   NameErrort   collectionsR”   R¡   R£   R¾   t   getfilesystemencodingRœ   R�   t   tokenizeR¤   t   codecsR¥   R¦   R%   R²   R«   t   htmlR9   t   cgiRÃ   RÄ   RÅ   t   reprlibRÆ   RÒ   t   impRñ   R÷   t   threadRÈ   R  t   dummy_threadt   _abcollRø   Rù   Rú   Rá   t   logging.configR!  R"  t   IR#  R$  Rì   RÓ   R'  R+  R(  (    (    (    s>   /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyt   <module>   s$  
	(4	@	@F2+A	

						[b
 ö	
