£Á°èZ¨Ä…–K§‚«“ô4“ÒÙ´dîfUÙÃÅ WKbyÊ¦•êŽ…È®FÒ¿ÊÎóCozá¬S@6{Í:›œêZÌ:Š•_%:¢¾¾~;‘Ã~èŠ©ÊÇí`ÔÑ©úë™µ'5I¿fš×WO%ø9¾«¾DK|€ùÍD”Ýs]nHÕ¶ê×Ó¼ãžªéUWŸÈË%DÒÕ¬ï‘]/Åcx  ‰ï2ß]ä6G[]S£ÔÏ¯rs{úëóµmÒï#UQxo·õÞCe]"±/aÙ&Eã4ú9Jé_ÞåëdãöKë)AÞ                  ¯¹ægƒÛowÐø^d™ý½ßB7áyMä9ÜÖUã
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<html>

Rec           @   sz  d  Z  d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m Z m	 Z	 d d l
 m Z d d l m Z m Z d d l m Z m Z d d l m Z e r d d	 l m Z m Z m Z m Z m Z m Z m Z e j Z e d
 e  Z n  e j e   Z! d   Z" d   Z# e d d d d d d d d d d  Z$ e rQd n d Z% d   Z& d e' f d     YZ( d S(   s  Configuration management setup

Some terminology:
- name
  As written in config files.
- value
  Value associated with a name
- key
  Name combined with it's section (section.name)
- variant
  A single word describing where the configuration key-value pair came from
iN(   t   configparser(   t   ConfigurationErrort!   ConfigurationFileCouldNotBeLoaded(   t   appdirs(   t   WINDOWSt
   expanduser(   t
   ensure_dirt   enum(   t   MYPY_CHECK_RUNNING(   t   Anyt   Dictt   Iterablet   Listt   NewTypet   Optionalt   Tuplet   Kindc         C   s8   |  j    j d d  }  |  j d  r4 |  d }  n  |  S(   sF   Make a name consistent regardless of source (environment or file)
    t   _t   -s   --i   (   t   lowert   replacet
   startswith(   t   name(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyt   _normalize_name*   s    c         C   s:   d |  k r* d j  |   } t |   n  |  j d d  S(   Nt   .sb   Key does not contain dot separated section and key. Perhaps you wanted to use 'global.{}' instead?i   (   t   formatR   t   split(   R   t   error_message(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyt   _disassemble_key4   s
    	t   USERt   usert   GLOBALt   globalt   SITEt   sitet   ENVt   envt   ENV_VARs   env-vars   pip.inis   pip.confc          C   s   g  t  j d  D] }  t j j |  t  ^ q } t j j t j t  } t j j t d  t	 rg d n d t  } t j j t  j
 d  t  } i | t j 6| g t j 6| | g t j 6S(   Nt   pipt   ~s   .pip(   R   t   site_config_dirst   ost   patht   joint   CONFIG_BASENAMEt   syst   prefixR   R   t   user_config_dirt   kindsR   R!   R   (   R*   t   global_config_filest   site_config_filet   legacy_config_filet   new_config_file(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyt   get_configuration_filesL   s    .				
t   Configurationc           B   s   e  Z d  Z d d  Z d   Z d   Z d   Z d   Z 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 d   Z d   Z d   Z d   Z RS(   s  Handles management of configuration.

    Provides an interface to accessing and managing configuration files.

    This class converts provides an API that takes "section.key-name" style
    keys and stores the value associated with it as "key-name" under the
    section "section".

    This allows for a clean interface wherein the both the section and the
    key-name are preserved in an easy to manage form in the configuration files
    and the data stored is also nice.
    c         C   s   t  t |   j   t j t j t j d  g } | | k rh t d j	 d j
 t t | d       n  | |  _ | |  _ t j t j t j t j t j g |  _ d d g |  _ d   |  j D |  _ d   |  j D |  _ g  |  _ d  S(   Ns5   Got invalid value for load_only - should be one of {}s   , it   versiont   helpc         S   s   i  |  ] } g  |  q S(    (    (   t   .0t   variant(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pys
   <dictcomp>   s   	 c         S   s   i  |  ] } i  |  q S(    (    (   R9   R:   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pys
   <dictcomp>   s   	 (   t   superR6   t   __init__R0   R   R   R!   t   NoneR   R   R+   t   mapt   reprt   isolatedt	   load_onlyR#   R%   t   _override_ordert   _ignore_env_namest   _parserst   _configt   _modified_parsers(   t   selfR@   RA   t   _valid_load_only(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyR<   q   s    %		'c         C   s$   |  j    |  j s  |  j   n  d S(   sE   Loads configuration from configuration files and environment
        N(   t   _load_config_filesR@   t   _load_environment_vars(   RG   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyt   load   s    
	c         C   sF   |  j  d k	 s t d   y |  j   d SWn t k
 rA d SXd S(   s@   Returns the file with highest priority in configuration
        s)   Need to be specified a file to be editingi    N(   RA   R=   t   AssertionErrort   _get_parser_to_modifyt
   IndexError(   RG   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyt   get_file_to_edit   s    	c         C   s   |  j  j   S(   s`   Returns key-value pairs like dict.items() representing the loaded
        configuration
        (   t   _dictionaryt   items(   RG   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyRQ      s    c         C   s<   y |  j  | SWn& t k
 r7 t d j |    n Xd S(   s,   Get a value from the configuration.
        s   No such key - {}N(   RP   t   KeyErrorR   R   (   RG   t   key(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyt	   get_value   s    c         C   s   |  j    |  j s t  |  j   \ } } | d k	 r~ t |  \ } } | j |  sh | j |  n  | j | | |  n  | |  j	 |  j | <|  j
 | |  d S(   s-   Modify a value in the configuration.
        N(   t   _ensure_have_load_onlyRA   RL   RM   R=   R   t   has_sectiont   add_sectiont   setRE   t   _mark_as_modified(   RG   RS   t   valuet   fnamet   parsert   sectionR   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyt	   set_value   s    
c         C   s   |  j    |  j s t  | |  j |  j k rG t d j |    n  |  j   \ } } | d k	 r t |  \ } } | j	 |  o | j
 | |  s t d   n  | j |  s | j |  n  |  j | |  n  |  j |  j | =d S(   s#   Unset a value in the configuration.s   No such key - {}s4   Fatal Internal error [id=1]. Please report as a bug.N(   RU   RA   RL   RE   R   R   RM   R=   R   RV   t   remove_optionRQ   t   remove_sectionRY   (   RG   RS   R[   R\   R]   R   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyt   unset_value   s    
c         C   ss   |  j    xb |  j D]W \ } } t j d |  t t j j |   t | d   } | j	 |  Wd QXq Wd S(   s*   Save the current in-memory state.
        s   Writing to %st   wN(
   RU   RF   t   loggert   infoR   R)   R*   t   dirnamet   opent   write(   RG   R[   R\   t   f(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyt   save   s    
c         C   s5   |  j  d  k r t d   n  t j d |  j   d  S(   Ns'   Needed a specific file to be modifying.s$   Will be working with %s variant only(   RA   R=   R   Rc   t   debug(   RG   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyRU      s    c         C   s2   i  } x% |  j  D] } | j |  j |  q W| S(   s<   A dictionary representing the loaded configuration.
        (   RB   t   updateRE   (   RG   t   retvalR:   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyRP      s    c         C   s   t  |  j    } | t j d d !t j g k rC t j d  d Sx | j   D] \ } } xq | D]i } |  j	 d k	 r | |  j	 k r t j d | |  qc n  |  j | |  } |  j | j | | f  qc WqP Wd S(   s5   Loads configuration from configuration files
        i    i   sZ   Skipping loading configuration files due to environment's PIP_CONFIG_FILE being os.devnullNs    Skipping file '%s' (variant: %s)(   t   dictt   iter_config_filesR0   R#   R)   t   devnullRc   Rj   RQ   RA   R=   t
   _load_fileRD   t   append(   RG   t   config_filesR:   t   filesR[   R\   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyRI   	  s     c         C   sl   t  j d | |  |  j |  } xC | j   D]5 } | j |  } |  j | j |  j | |   q/ W| S(   Ns'   For variant '%s', will try loading '%s'(   Rc   Rj   t   _construct_parsert   sectionsRQ   RE   Rk   t   _normalized_keys(   RG   R:   R[   R\   R]   RQ   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyRp   $  s    $c         C   s   t  j   } t j j |  r y | j |  Wq t k
 ri t d d j t	 j
 t   d |   q t  j k
 r } t d |   q Xn  | S(   Nt   reasons   contains invalid {} charactersR[   t   error(   R    t   RawConfigParserR)   R*   t   existst   readt   UnicodeDecodeErrorR   R   t   localet   getpreferredencodingt   Falset   Error(   RG   R[   R\   Rx   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyRt   /  s    c         C   s-   |  j  t j j |  j d |  j     d S(   s7   Loads configuration from environment variables
        s   :env:N(   RE   R0   R%   Rk   Rv   t   get_environ_vars(   RG   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyRJ   F  s    c         C   s?   i  } x2 | D]* \ } } | d t  |  } | | | <q W| S(   s   Normalizes items to construct a dictionary with normalized keys.

        This routine is where the names become keys and are made the same
        regardless of source - configuration files or environment.
        R   (   R   (   RG   R]   RQ   t
   normalizedR   t   valRS   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyRv   N  s
    c         c   sj   xc t  j j   D]R \ } } | j d  oA | d j   |  j k } | r | d j   | f Vq q Wd S(   s@   Returns a generator with all environmental vars with prefix PIP_t   PIP_i   N(   R)   t   environRQ   R   R   RC   (   RG   RS   R   t   should_be_yielded(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyR   [  s
    c         c   s   t  j j d d  } | d k	 r5 t j | g f Vn t j g  f Vt   } t j | t j f V|  j o | o t  j	 j
 |  } | r t j | t j f Vn  t j | t j f Vd S(   s   Yields variant and configuration files associated with it.

        This should be treated like items of a dictionary.
        t   PIP_CONFIG_FILEN(   R)   R   t   getR=   R0   R#   R5   R   R@   R*   Rz   R   R!   (   RG   t   config_fileRr   t   should_load_user_config(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyRn   g  s    		
c         C   s   |  j  | S(   s#   Get values present in a config file(   RE   (   RG   R:   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyt   get_values_in_config  s    c         C   s<   |  j  s t  |  j |  j  } | s4 t d   n  | d S(   Ns4   Fatal Internal error [id=2]. Please report as a bug.i(   RA   RL   RD   R   (   RG   t   parsers(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyRM     s    c         C   s2   | | f } | |  j  k r. |  j  j |  n  d  S(   N(   RF   Rq   (   RG   R[   R\   t   file_parser_tuple(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyRY     s    c         C   s   d j  |  j j |  j  S(   Ns   {}({!r})(   R   t	   __class__t   __name__RP   (   RG   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyt   __repr__  s    N(   R   t
   __module__t   __doc__R=   R<   RK   RO   RQ   RT   R^   Ra   Ri   RU   t   propertyRP   RI   Rp   Rt   RJ   Rv   R   Rn   R   RM   RY   R   (    (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyR6   c   s,   																			()   R   R}   t   loggingR)   R-   t   pip._vendor.six.movesR    t   pip._internal.exceptionsR   R   t   pip._internal.utilsR   t   pip._internal.utils.compatR   R   t   pip._internal.utils.miscR   R   t   pip._internal.utils.typingR   t   typingR	   R
   R   R   R   R   R   Ry   t   strR   t	   getLoggerR   Rc   R   R   R0   R,   R5   t   objectR6   (    (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyt   <module>   s4   4		
			