509318396
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
ó
wWS`c           @   ss  d  Z  d d l m Z m Z d d l m Z d d l m Z m Z m	 Z	 m
 Z
 m Z m Z m Z i d d d d d	 d
 d d d g f d d d d d d d d d d d d d d d d g f d d g f g d  6d d
 d! d" d# d$ d% d& d' d( d) d* d+ d, d- d. d/ d0 d1 d2 d3 d4 d5 d6 d7 g f d d8 d9 g f g d: 6Z e d: j e d  d; ƒ d< „  Z d= e f d> „  ƒ  YZ d? S(@   s¾   Fix changes imports of urllib which are now incompatible.
   This is rather similar to fix_imports, but because of the more
   complex nature of the fixing for urllib, it has its own fixer.
iÿÿÿÿ(   t
   alternatest
   FixImports(   t
   fixer_base(   t   Namet   Commat
   FromImportt   Newlinet   find_indentationt   Nodet   symss   urllib.requestt	   URLopenert   FancyURLopenert   urlretrievet
   _urlopenert   urlopent
   urlcleanupt   pathname2urlt   url2pathnames   urllib.parset   quotet
   quote_plust   unquotet   unquote_plust	   urlencodet	   splitattrt	   splithostt
   splitnportt   splitpasswdt	   splitportt
   splitqueryt   splittagt	   splittypet	   splitusert
   splitvalues   urllib.errort   ContentTooShortErrort   urllibt   install_openert   build_openert   Requestt   OpenerDirectort   BaseHandlert   HTTPDefaultErrorHandlert   HTTPRedirectHandlert   HTTPCookieProcessort   ProxyHandlert   HTTPPasswordMgrt   HTTPPasswordMgrWithDefaultRealmt   AbstractBasicAuthHandlert   HTTPBasicAuthHandlert   ProxyBasicAuthHandlert   AbstractDigestAuthHandlert   HTTPDigestAuthHandlert   ProxyDigestAuthHandlert   HTTPHandlert   HTTPSHandlert   FileHandlert
   FTPHandlert   CacheFTPHandlert   UnknownHandlert   URLErrort	   HTTPErrort   urllib2i   c          c   s•   t  ƒ  }  x… t j ƒ  D]w \ } } xh | D]` } | \ } } t | ƒ } d | | f Vd | | | f Vd | Vd | Vd | | f Vq) Wq Wd  S(   Ns�   import_name< 'import' (module=%r
                                  | dotted_as_names< any* module=%r any* >) >
                  sÆ   import_from< 'from' mod_member=%r 'import'
                       ( member=%s | import_as_name< member=%s 'as' any > |
                         import_as_names< members=any*  >) >
                  sI   import_from< 'from' module_star=%r 'import' star='*' >
                  st   import_name< 'import'
                                  dotted_as_name< module_as=%r 'as' any > >
                  sK   power< bare_with_attr=%r trailer< '.' member=%s > any* >
                  (   t   sett   MAPPINGt   itemsR    (   t   baret
   old_modulet   changest   changet
   new_modulet   members(    (    s=   /opt/alt/python27/lib64/python2.7/lib2to3/fixes/fix_urllib.pyt   build_pattern1   s    			t	   FixUrllibc           B   s5   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C   s   d j  t ƒ  ƒ S(   Nt   |(   t   joinRF   (   t   self(    (    s=   /opt/alt/python27/lib64/python2.7/lib2to3/fixes/fix_urllib.pyRF   J   s    c         C   s™   | j  d ƒ } | j } g  } x? t | j d  D], } | j t | d d | ƒt ƒ  g ƒ q0 W| j t t | j d d d | ƒƒ | j | ƒ d S(   s‘   Transform for the basic import case. Replaces the old
           import name with a comma separated list of its
           replacements.
        t   moduleiÿÿÿÿi    t   prefixN(	   t   getRL   R>   t   valuet   extendR   R   t   appendt   replace(   RJ   t   nodet   resultst
   import_modt   preft   namest   name(    (    s=   /opt/alt/python27/lib64/python2.7/lib2to3/fixes/fix_urllib.pyt   transform_importM   s    	*(c         C   sð  | j  d ƒ } | j } | j  d ƒ } | r½ t | t ƒ rI | d } n  d } x6 t | j D]' } | j | d k r] | d } Pq] q] W| rª | j t | d | ƒƒ qì|  j	 | d ƒ n/g  } i  }	 | d }
 xÍ |
 D]Å } | j
 t j k r| j d j } | j d j } n | j } d } | d	 k rÚ xl t | j D]Z } | | d k r>| d |	 k rx| j | d ƒ n  |	 j | d g  ƒ j | ƒ q>q>WqÚ qÚ Wg  } t | ƒ } t } d
 „  } x½ | D]µ } |	 | } g  } x8 | d  D], } | j | | | ƒ ƒ | j t ƒ  ƒ qìW| j | | d | ƒ ƒ t | | ƒ } | sa| j j j | ƒ rm| | _ n  | j | ƒ t } qËW| rÜg  } x( | d  D] } | j | t ƒ  g ƒ q›W| j | d ƒ | j | ƒ n |  j	 | d ƒ d S(   sš   Transform for imports of specific module elements. Replaces
           the module to be imported from with the appropriate new
           module.
        t
   mod_membert   memberi    i   RL   s!   This is an invalid module elementRE   i   u   ,c         S   sz   |  j  t j k rd t |  j d j d | ƒ|  j d j ƒ  |  j d j ƒ  g } t t j | ƒ g St |  j d | ƒg S(   Ni    RL   i   i   (   t   typeR	   t   import_as_nameR   t   childrenRN   t   cloneR   (   RW   RL   t   kids(    (    s=   /opt/alt/python27/lib64/python2.7/lib2to3/fixes/fix_urllib.pyt   handle_name�   s    iÿÿÿÿs   All module elements are invalidN(   RM   RL   t
   isinstancet   listt   NoneR>   RN   RQ   R   t   cannot_convertR[   R	   R\   R]   RP   t
   setdefaultR   t   TrueRO   R   R   t   parentt   endswitht   FalseR   (   RJ   RR   RS   RY   RU   RZ   t   new_nameRC   t   modulest   mod_dictRE   t   as_namet   member_namet	   new_nodest   indentationt   firstR`   RK   t   eltsRV   t   eltt   newt   nodest   new_node(    (    s=   /opt/alt/python27/lib64/python2.7/lib2to3/fixes/fix_urllib.pyt   transform_member]   sh    	

	+	

c         C   s²   | j  d ƒ } | j  d ƒ } d } t | t ƒ r@ | d } n  x6 t | j D]' } | j | d k rN | d } PqN qN W| rž | j t | d | j ƒƒ n |  j	 | d ƒ d S(   s.   Transform for calls to module members in code.t   bare_with_attrRZ   i    i   RL   s!   This is an invalid module elementN(
   RM   Rc   Ra   Rb   R>   RN   RQ   R   RL   Rd   (   RJ   RR   RS   t
   module_dotRZ   Rj   RC   (    (    s=   /opt/alt/python27/lib64/python2.7/lib2to3/fixes/fix_urllib.pyt   transform_dot©   s    
c         C   s®   | j  d ƒ r" |  j | | ƒ nˆ | j  d ƒ rD |  j | | ƒ nf | j  d ƒ rf |  j | | ƒ nD | j  d ƒ rˆ |  j | d ƒ n" | j  d ƒ rª |  j | d ƒ n  d  S(   NRK   RY   Rx   t   module_stars   Cannot handle star imports.t	   module_ass#   This module is now multiple modules(   RM   RX   Rw   Rz   Rd   (   RJ   RR   RS   (    (    s=   /opt/alt/python27/lib64/python2.7/lib2to3/fixes/fix_urllib.pyt	   transformº   s    (   t   __name__t
   __module__RF   RX   Rw   Rz   R}   (    (    (    s=   /opt/alt/python27/lib64/python2.7/lib2to3/fixes/fix_urllib.pyRG   H   s
   			L	N(   t   __doc__t   lib2to3.fixes.fix_importsR    R   t   lib2to3R   t   lib2to3.fixer_utilR   R   R   R   R   R   R	   R>   RP   RF   RG   (    (    (    s=   /opt/alt/python27/lib64/python2.7/lib2to3/fixes/fix_urllib.pyt   <module>   sD   4							