ó
^\kdc           @@  s]  d  d l  m Z d  d l Z d  d l Z d  d l Z 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
 „  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+ m, Z, d  d l- Z- d  d l. Z. d  d l/ Z0 d  d l1 m1 Z1 d  d l2 Z2 e3 Z3 d  d l4 m5 Z6 d  d l4 m7 Z8 d a: d „  Z; no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 l@ m$ Z$ m Z m# Z# m Z m Z m' Z' m( Z( m) Z) m* Z* m+ Z+ m, Z, d  d lA m& Z& m% Z% m  Z  d  d lB jC Z- d  d l@ jD Z" d  d lE jC Z. d  d l0 Z0 d  d lF m1 Z1 d  d lG jH Z2 eI Z3 d  d l4 m8 Z8 e6 Z6 y d  d lJ mK ZK mL ZL Wn9 eM k
 r‘d eN f d „  ƒ  YZL d „  ZO d „  ZK n Xy d  d l mP ZQ Wn' eM k
 rÏd eR f d „  ƒ  YZQ n Xy d  d l mS ZS Wn* eM k
 re jT e jU Bd d „ ZS n Xd  d lV mW ZX eY eX d  ƒ r9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 eM k
 r¥d' „  Z] n Xy d  d l^ Z^ Wn! eM k
 rÙd d( l m^ Z^ n Xy
 e_ Z_ Wn* e` k
 rd  d) la mb Zb d* „  Z_ n Xy e jc Zc e jd Zd WnJ ee k
 rse jf ƒ  Zg eg d+ k rXd, Zh n d- Zh d. „  Zc d/ „  Zd n Xy d  d0 li mj Zj WnT eM k
 rÞd  d1 lk ml Zl mm Zm d  d l Z e jn d2 ƒ Zo d3 „  Zp d4 „  Zj n Xy d  d5 lq mr Zr Wn! eM k
 rd  d5 ls mr Zr n Xe j d6  dS k  r9e1 ƒ  jt Zt n d  d8 lq mt Zt y d  d9 la mu Zu Wnk eM k
 rÊd  d: la mv Zv y d  d; lw mx Zy Wn eM k
 r°d< d= „ Zy n Xd> ev f d? „  ƒ  YZu n Xy d  d@ lz m{ Z{ Wn eM k
 rþd dA „ Z{ n Xy d  dB la m| Z| Wn“ eM k
 r¨y d  dC l} m~ Z Wn! eM k
 rZd  dC l€ m~ Z n Xy  d  dD l� m‚ Z‚ mƒ Zƒ m„ Z„ Wn eM k
 rŽn XdE e… f dF „  ƒ  YZ| n Xy d  dG l† m‡ Z‡ mˆ Zˆ Wn“ eM k
 rXe jn dH e j‰ ƒ ZŠ dI „  Zˆ dJ e… f dK „  ƒ  YZ‹ d dL „ ZŒ dM e� f dN „  ƒ  YZŽ dO e� f dP „  ƒ  YZ� dQ eR f dR „  ƒ  YZ‡ n Xd S(T   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(    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyR
      s    (
   t   Requestt   urlopent   URLErrort	   HTTPErrort   HTTPBasicAuthHandlert   HTTPPasswordMgrt   HTTPSHandlert   HTTPHandlert   HTTPRedirectHandlert   build_opener(   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&   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt	   splituser-   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   R   (   t   filterfalse(   t   match_hostnamet   CertificateErrorR-   c           B@  s   e  Z RS(    (   t   __name__t
   __module__(    (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyR-   U   s   c         C@  sˆ   g  } x[ |  j  d ƒ D]J } | d k r8 | j d ƒ q t j | ƒ } | j | j d d ƒ ƒ q Wt j d d j | ƒ d t j ƒ S(	   Nt   .t   *s   [^.]+s   \*s   [^.]*s   \As   \.s   \Z(   t   splitt   appendR$   t   escapet   replaceR%   t   joint
   IGNORECASE(   t   dnt   patst   frag(    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   _dnsname_to_patY   s    c         C@  sg  |  s t  d ƒ ‚ n  g  } |  j d d ƒ } xI | D]A \ } } | d k r4 t | ƒ j | ƒ re d S| j | ƒ q4 q4 W| së xi |  j d d ƒ D]R } xI | D]A \ } } | d k rŸ t | ƒ j | ƒ rÐ d S| j | ƒ qŸ qŸ Wq’ Wn  t | ƒ d k r(t d | d	 j t t	 | ƒ ƒ f ƒ ‚ n; t | ƒ d k rWt d
 | | d f ƒ ‚ n t d ƒ ‚ d S(   s7  Verify that *cert* (in decoded format as returned by
        SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 rules
        are mostly followed, but IP addresses are not accepted for *hostname*.

        CertificateError is raised on failure. On success, the function
        returns nothing.
        s   empty or no certificatet   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   getR;   R&   R3   t   lenR-   R6   t   mapt   repr(   t   certt   hostnamet   dnsnamest   sant   keyt   valuet   sub(    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyR,   g   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(    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   __init__—   s    (   R.   R/   t   __doc__RR   (    (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRM   “   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(    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   _access_check¬   s    $t   PATHt   win32i    t   PATHEXTt    c         3@  s*   |  ]  } ˆ  j  ƒ  j | j  ƒ  ƒ Vq d  S(   N(   t   lowert   endswith(   t   .0t   ext(   t   cmd(    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pys	   <genexpr>É   s    N(   RU   RV   t   dirnameR#   t   environRA   t   defpathR2   t   pathsept   syst   platformt   curdirt   insertt   anyt   sett   normcaset   addR6   (   Re   R[   RV   R\   t   pathextt   filesRd   t   seent   dirt   normdirt   thefilet   name(    (   Re   sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRT   Ÿ   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(   RN   RO   (   RP   t   base(    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRR   è   s    c         C@  s   |  S(   N(    (   RP   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRz   ë   s    c         G@  s   |  j  ƒ  d  S(   N(   t   close(   RP   t   exc_info(    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   __exit__î   s    (   R.   R/   RR   Rz   R   (    (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyR{   ç   s   		Ry   c           B@  s#   e  Z d  „  Z d „  Z d „  Z RS(   c         C@  s   |  S(   N(    (   RP   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRz   ó   s    c         G@  s   |  j  ƒ  d  S(   N(   R}   (   RP   R~   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyR   ö   s    c         O@  s   t  j |  | | Ž } t | ƒ S(   N(   t   BaseZipFilet   openR{   (   RP   t   argsRQ   R|   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyR�   ú   s    (   R.   R/   Rz   R   R�   (    (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRy   ò   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(   Rj   t   versionRU   Rx   t
   startswith(    (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRƒ     s    (   t	   sysconfig(   t   Callablec         C@  s   t  |  t ƒ S(   N(   R   RŒ   (   t   obj(    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   callable  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(    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   fsencode#  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˜   (    (    sA   /var/www/testScraper/venv/build/pip/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-(   Ra   R5   RŠ   (   t   orig_enct   enc(    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   _get_normal_name=  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 argment, 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(   NR`   (   t   StopIteration(    (   t   readline(    sA   /var/www/testScraper/venv/build/pip/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   LookupErrorRx   (   t   linet   line_stringt   msgt   matchest   encodingt   codec(   t	   bom_foundR˜   (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   find_cookief  s6    			i   s	   utf-8-sigN(   t   __self__Rx   t   AttributeErrorR#   t   FalseRŠ   R�   t   True(   R¥   R±   t   defaultR¦   R´   t   firstt   second(    (   R³   R˜   R¥   sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRœ   H  s4    
&	
	
	(   R4   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_identRq   t   discard(   RP   RI   t   result(   t	   fillvaluet   repr_runningt   user_function(    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   wrapper½  s    R/   RS   R.   t   __annotations__(   Ro   t   getattrR/   RS   R.   RÈ   (   RÆ   RÇ   (   RÄ   (   RÅ   RÆ   sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   decorating_functionº  s    	(    (   RÄ   RÊ   (    (   RÄ   sA   /var/www/testScraper/venv/build/pip/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(   RP   RÍ   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRR   Þ  s    c         C@  s   t  | ƒ ‚ d  S(   N(   t   KeyError(   RP   RI   (    (    sA   /var/www/testScraper/venv/build/pip/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Ï   (   RP   RI   t   mapping(    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   __getitem__è  s    c         C@  s   | |  k r |  | S| S(   N(    (   RP   RI   R¹   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRA   ð  s    c         C@  s   t  t ƒ  j |  j Œ  ƒ S(   N(   RB   Ro   t   unionRÍ   (   RP   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   __len__ó  s    c         C@  s   t  t ƒ  j |  j Œ  ƒ S(   N(   t   iterRo   RÒ   RÍ   (   RP   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   __iter__ö  s    c         @  s   t  ‡  f d †  |  j Dƒ ƒ S(   Nc         3@  s   |  ] } ˆ  | k Vq d  S(   N(    (   Rc   t   m(   RI   (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pys	   <genexpr>ú  s    (   Rn   RÍ   (   RP   RI   (    (   RI   sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   __contains__ù  s    c         C@  s   t  |  j ƒ S(   N(   Rn   RÍ   (   RP   (    (    sA   /var/www/testScraper/venv/build/pip/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¨   R6   RC   RD   RÍ   (   RP   (    (    sA   /var/www/testScraper/venv/build/pip/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‚   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRÛ     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(   RP   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRß   	  s    c         C@  s   |  j  i  |  j Œ S(   s;   New ChainMap with a new dict followed by all previous maps.(   RÞ   RÍ   (   RP   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt	   new_child  s    c         C@  s   |  j  |  j d Œ  S(   s   New ChainMap from maps[1:].i   (   RÞ   RÍ   (   RP   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   parents  s    c         C@  s   | |  j  d | <d  S(   Ni    (   RÍ   (   RP   RI   RJ   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   __setitem__  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¨   (   RP   RI   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   __delitem__  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Î   (   RP   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRä   !  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¨   (   RP   RI   R‚   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRå   (  s    c         C@  s   |  j  d j ƒ  d S(   s'   Clear maps[0], leaving maps[1:] intact.i    N(   RÍ   t   clear(   RP   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRæ   /  s    N(   R.   R/   RS   RR   RÏ   RÑ   R#   RA   RÓ   RÕ   R×   RØ   RË   RÙ   t   classmethodRÛ   Rß   t   __copy__Rà   t   propertyRá   Râ   Rã   Rä   Rå   Ræ   (    (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyR½   Ñ  s(   													(   t   cache_from_sourcec         C@  sG   |  j  d ƒ s t ‚ | d  k r* t } n  | r9 d } n d } |  | S(   Ns   .pyt   ct   o(   Rb   t   AssertionErrorR#   t	   __debug__(   RV   t   debug_overridet   suffix(    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRê   6  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(   RB   R–   t   _OrderedDict__rootR¶   R#   t   _OrderedDict__mapt   _OrderedDict__update(   RP   R‚   t   kwdst   root(    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRR   ]  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ö   (   RP   RI   RJ   t   dict_setitemRù   t   last(    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRâ   m  s
    	
)c         C@  s@   | |  | ƒ |  j  j | ƒ \ } } } | | d <| | d <d S(   s    od.__delitem__(y) <==> del od[y]i   i    N(   Rö   Rå   (   RP   RI   t   dict_delitemt	   link_prevt	   link_next(    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRã   w  s    
c         c@  s=   |  j  } | d } x# | | k	 r8 | d V| d } q Wd S(   s   od.__iter__() <==> iter(od)i   i   N(   Rõ   (   RP   Rù   t   curr(    (    sA   /var/www/testScraper/venv/build/pip/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õ   (   RP   Rù   Rÿ   (    (    sA   /var/www/testScraper/venv/build/pip/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Ú   (   RP   t   nodeRù   (    (    sA   /var/www/testScraper/venv/build/pip/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å   (   RP   Rû   Rù   t   linkRý   Rþ   RI   RJ   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRä   œ  s     	








c         C@  s
   t  |  ƒ S(   s   od.keys() -> list of keys in od(   RÌ   (   RP   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   keysµ  s    c         C@  s   g  |  D] } |  | ^ q S(   s#   od.values() -> list of values in od(    (   RP   RI   (    (    sA   /var/www/testScraper/venv/build/pip/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(    (   RP   RI   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   items½  s    c         C@  s
   t  |  ƒ S(   s0   od.iterkeys() -> an iterator over the keys in od(   RÔ   (   RP   (    (    sA   /var/www/testScraper/venv/build/pip/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(    (   RP   t   k(    (    sA   /var/www/testScraper/venv/build/pip/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(    (   RP   R  (    (    sA   /var/www/testScraper/venv/build/pip/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(    (   RB   R–   R   RÚ   t   hasattrR  R  (   R‚   Rø   RP   t   otherRI   RJ   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRO   Ï  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Î   (   RP   RI   R¹   RÃ   (    (    sA   /var/www/testScraper/venv/build/pip/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(    (   RP   RI   R¹   (    (    sA   /var/www/testScraper/venv/build/pip/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  (   RP   t   _repr_runningt   call_key(    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRÙ     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Þ   (   RP   R  R  t	   inst_dict(    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt
   __reduce__  s    #c         C@  s   |  j  |  ƒ S(   s!   od.copy() -> a shallow copy of od(   RÞ   (   RP   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRß     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Ý   RJ   t   dRI   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRÛ   "  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ñ   RB   R  RÚ   t   __eq__(   RP   R  (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyR  -  s    .c         C@  s   |  | k S(   N(    (   RP   R  (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   __ne__6  s    c         C@  s
   t  |  ƒ S(   s@   od.viewkeys() -> a set-like object providing a view on od's keys(   Rò   (   RP   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   viewkeys;  s    c         C@  s
   t  |  ƒ S(   s<   od.viewvalues() -> an object providing a view on od's values(   Ró   (   RP   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt
   viewvalues?  s    c         C@  s
   t  |  ƒ S(   sB   od.viewitems() -> a set-like object providing a view on od's items(   Rô   (   RP   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt	   viewitemsC  s    N(#   R.   R/   RS   RR   RÚ   Râ   Rã   RÕ   R   Ræ   R¸   Rä   R  R  R  R  R  R	  RO   R÷   t   objectR  Rå   R#   R  RÙ   R  Rß   Rç   RÛ   R  R  R  R  R  (    (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRñ   Q  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&   R@   R¸   (   R   RÖ   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyR  M  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   parentRI   (   RP   RI   RJ   RÃ   (    (    sA   /var/www/testScraper/venv/build/pip/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Ú   RA   R  R   R—   R  R!  R"  R#  RI   (   RP   RI   R¹   RJ   RÃ   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRA   l  s    
	N(   R.   R/   RS   RÑ   R#   RA   (    (    (    sA   /var/www/testScraper/venv/build/pip/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#  RI   (   RP   RI   R¹   RJ   RÃ   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRå   x  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#  RI   (   RP   RI   RJ   RÃ   (    (    sA   /var/www/testScraper/venv/build/pip/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#  (   RP   t   idxRJ   RÃ   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRå   �  s    (   R.   R/   RS   RÑ   Rå   (    (    (    sA   /var/www/testScraper/venv/build/pip/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#  RI   (   RP   RI   RJ   RÃ   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRÑ   ›  s    	(   R.   R/   RS   RÑ   (    (    (    sA   /var/www/testScraper/venv/build/pip/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_convertRd   t   cfg_convertt   cfgc         C@  s   t  | ƒ |  _ |  |  j _ d  S(   N(   R  t   configR  (   RP   R)  (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyRR   ¹  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(   R2   Rå   t   importerRÉ   R¶   t   ImportErrorRj   R~   R@   t	   __cause__t   __traceback__(	   RP   R   Rx   t   usedt   foundR:   t   et   tbt   v(    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   resolve½  s"    c         C@  s   |  j  | ƒ S(   s*   Default converter for the ext:// protocol.(   R3  (   RP   RJ   (    (    sA   /var/www/testScraper/venv/build/pip/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#   R@   t   endR)  t   groupst   DOT_PATTERNt   INDEX_PATTERNt   DIGIT_PATTERNt   intR–   (   RP   RJ   t   restRÖ   R  R$  t   n(    (    sA   /var/www/testScraper/venv/build/pip/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_convertersRA   R#   RÉ   (   RP   RJ   RÖ   R  R=  t	   converterRð   (    (    sA   /var/www/testScraper/venv/build/pip/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Ž   R3  R#   RÚ   R  R  t   setattr(	   RP   R)  Rë   t   propsR  RQ   RÃ   Rx   RJ   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   configure_custom  s    5c         C@  s"   t  | t ƒ r t | ƒ } n  | S(   s0   Utility function which converts lists to tuples.(   R   RÌ   R%  (   RP   RJ   (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   as_tuple$  s    (   R.   R/   RS   R$   R%   R?  R4  R7  R8  R9  RA  t   staticmethodt
   __import__R*  RR   R3  R&  R'  R   RE  RF  (    (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyR  ¥  s"   
				"		(   i   i   (‘   t
   __future__R    RU   R$   Rj   t   version_infoR   t
   basestringR>  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"   R)   t   iot   strR*   t   urllib.parset   urllib.requestt   urllib.errort   http.clientt   clientt   requestt   xmlrpc.clientt   html.parsert   html.entitiest   entitiest   inputt   sslR,   R-   R+  R@   R;   RL   RM   R  RT   t   F_OKt   X_OKt   zipfileRy   R€   R
  R{   t   BaseZipExtFileRk   Rƒ   R‹   RŽ   t	   NameErrort   collectionsRŒ   R™   R›   R¶   t   getfilesystemencodingR”   R•   t   tokenizeRœ   t   codecsR�   Rž   R%   Rª   R£   t   htmlR4   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"  (    (    (    sA   /var/www/testScraper/venv/build/pip/pip/_vendor/distlib/compat.pyt   <module>   s  	(4	F	@L	)A	

						[b
 ö	
