ó
ž^Yc           @   ső  d  Z  d d l Z d d l m Z y d d l m Z Wn! e k
 rY d d l m Z n Xy d d l Z	 Wn e k
 r d d l	 Z	 n Xy
 e
 Z Wn e k
 r­ e Z n Xy
 e Z Wn e k
 rŃ e Z n Xy d d l Z Wn e k
 rd d l Z n Xy
 e Z Wn e k
 r%e Z n Xy d d l m Z Wn! e k
 r]d d l m Z n Xy i  j Wn e k
 rd   Z n
 Xd   Z y e g   j Wn e k
 rźd   Z n
 Xd	   Z e j ríd
   Z d   Z  d   Z! n d   Z d   Z  d   Z! y e j" d Z# Wn e$ k
 r9e j" d Z# n Xy" d d l% Z% d d l& Z% d Z( Wn e k
 rud Z% n Xy e% j) j* Z+ Wn# e, k
 rŤd d l( Z( d Z+ n Xy e% j) j- Z. Wn e k
 rŰe( j/   Z. n Xd   Z0 d d  Z1 d S(   s:   Add things to old Pythons so I can pretend they are newer.i˙˙˙˙N(   t   env(   t   StringIO(   t   quotec         C   s
   |  j    S(   s    Produce the items from dict `d`.(   t   items(   t   d(    (    s3   /tmp/pip-build-hU8Cw8/coverage/coverage/backward.pyt   iitemsB   s    c         C   s
   |  j    S(   s    Produce the items from dict `d`.(   t	   iteritems(   R   (    (    s3   /tmp/pip-build-hU8Cw8/coverage/coverage/backward.pyR   F   s    c         C   s   t  |   j S(   s1   Get the `next` function for iterating over `seq`.(   t   itert   __next__(   t   seq(    (    s3   /tmp/pip-build-hU8Cw8/coverage/coverage/backward.pyt   iternextN   s    c         C   s   t  |   j S(   s1   Get the `next` function for iterating over `seq`.(   R   t   next(   R	   (    (    s3   /tmp/pip-build-hU8Cw8/coverage/coverage/backward.pyR
   R   s    c         C   s   |  j  d  S(   s   Convert string `s` to bytes.t   utf8(   t   encode(   t   s(    (    s3   /tmp/pip-build-hU8Cw8/coverage/coverage/backward.pyt   to_bytesY   s    c         C   s
   t  |   S(   s7   Produce a byte string with the ints from `byte_values`.(   t   bytes(   t   byte_values(    (    s3   /tmp/pip-build-hU8Cw8/coverage/coverage/backward.pyt   binary_bytes]   s    c         C   s   |  S(   s,   Turn a bytes object into a sequence of ints.(    (   t   bytes_value(    (    s3   /tmp/pip-build-hU8Cw8/coverage/coverage/backward.pyt   bytes_to_intsa   s    c         C   s   |  S(   s+   Convert string `s` to bytes (no-op in 2.x).(    (   R   (    (    s3   /tmp/pip-build-hU8Cw8/coverage/coverage/backward.pyR   g   s    c         C   s   d j  d   |  D  S(   s7   Produce a byte string with the ints from `byte_values`.t    c         s   s   |  ] } t  |  Vq d  S(   N(   t   chr(   t   .0t   b(    (    s3   /tmp/pip-build-hU8Cw8/coverage/coverage/backward.pys	   <genexpr>m   s    (   t   join(   R   (    (    s3   /tmp/pip-build-hU8Cw8/coverage/coverage/backward.pyR   k   s    c         c   s    x |  D] } t  |  Vq Wd S(   s,   Turn a bytes object into a sequence of ints.N(   t   ord(   R   t   byte(    (    s3   /tmp/pip-build-hU8Cw8/coverage/coverage/backward.pyR   o   s    t   __builtin__t   builtinsc           C   s&   t  r" t t  d  r" t  j   n  d S(   s7   Invalidate any import caches that may or may not exist.t   invalidate_cachesN(   t	   importlibt   hasattrR   (    (    (    s3   /tmp/pip-build-hU8Cw8/coverage/coverage/backward.pyt   invalidate_import_caches   s    c      	   C   sÄ   y d d l  m } Wn t k
 r- d } n X| d k rG |  d } n  | re | |  |  j   } n[ x( t j   D] } | d d k rr Pqr qr Wt | d   } t j |  | | |  } Wd QX| S(   sě   Import a local file as a module.

    Opens a file in the current directory named `modname`.py, imports it
    as `modname`, and returns the module object.  `modfile` is the file to
    import if it isn't in the current directory.

    i˙˙˙˙(   t   SourceFileLoaders   .pyi    t   rN(   t   importlib.machineryR"   t   ImportErrort   Nonet   load_modulet   impt   get_suffixest   open(   t   modnamet   modfileR"   t   modt   sufft   f(    (    s3   /tmp/pip-build-hU8Cw8/coverage/coverage/backward.pyt   import_local_file   s    
(2   t   __doc__t   syst   coverageR    t	   cStringIOR   R%   t   iot   ConfigParsert   configparsert
   basestringt   string_classt	   NameErrort   strt   unicodet   unicode_classt   cPicklet   picklet   xranget   ranget   shlexR   t   shlex_quotet   pipesR   t   AttributeErrorR   R   R   R
   t   PY3R   R   R   t   modulest   BUILTINSt   KeyErrorR   t   importlib.utilR&   R(   t   utilt	   find_spect   importlib_util_find_spect	   Exceptiont   MAGIC_NUMBERt   PYC_MAGIC_NUMBERt	   get_magicR!   R0   (    (    (    s3   /tmp/pip-build-hU8Cw8/coverage/coverage/backward.pyt   <module>   s   





								


	