+
    <j6                        R t ^ RIt^ RIt^ RIt^ RIt^ RIHtHtHtH	t	H
t
HtHt ^ RIHtHt ^ RIHt ^ RIHt ^ RIHt ^ RIHtHt ]P2                  t]
! R]4      t]'       d   R	MR
tRt]! RRRRRR7      t]P>                  ]P@                  ]PB                  ]PD                  ]PF                  3t$]P@                  ]P>                  ]PB                  3t%]! ]&4      t'R R lt(R R lt)R R lt* ! R R4      t+R# )a  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
N)AnyDictIterableListNewTypeOptionalTuple)ConfigurationError!ConfigurationFileCouldNotBeLoaded)appdirs)WINDOWS)	getLogger)
ensure_direnumKindzpip.inizpip.confuserglobalsiteenvzenv-var)USERGLOBALSITEENVENV_VARc                0    V ^8  d   QhR\         R\         /#    namereturnstr)formats   "P/opt/headortail/venv/lib/python3.14/site-packages/pip/_internal/configuration.py__annotate__r#   2   s      # #     c                    V P                  4       P                  RR4      p V P                  R4      '       d
   V R,          p V # )zAMake a name consistent regardless of source (environment or file)_-z--:r   NN)lowerreplace
startswith)r   s   &r"   _normalize_namer+   2   s7    ::<S)DtBxKr$   c                F    V ^8  d   QhR\         R\        \         ,          /# r   )r    r   )r!   s   "r"   r#   r#   :   s      3 49 r$   c                 V    R V 9  d   RV  R2p\        V4      hV P                  R ^4      # ).zVKey does not contain dot separated section and key. Perhaps you wanted to use 'global.z
' instead?)r	   split)r   error_messages   & r"   _disassemble_keyr1   :   s>    
$115jB 	 !//::c1r$   c                \    V ^8  d   QhR\         \        \        \        ,          3,          /# r   r   )r   r   r   r    )r!   s   "r"   r#   r#   D   s       dDIo!6 r$   c                  v   \         P                  ! R 4       U u. uF'  p \        P                  P	                  V \
        4      NK)  	  pp \        P                  P	                  \        P                  \
        4      p\        P                  P	                  \        P                  P                  R4      \        '       d   R MR\
        4      p\        P                  P	                  \         P                  ! R 4      \
        4      p\        P                  V\        P                  V.\        P                  W4./# u up i )pip~z.pip)r   site_config_dirsospathjoinCONFIG_BASENAMEsysprefix
expanduserr   user_config_dirkindsr   r   r   )r9   global_config_filessite_config_filelegacy_config_filenew_config_files        r"   get_configuration_filesrE   D   s    8?8P8PQV8W8WT?+8W   ww||CJJ@
3f
 ggll7#:#:5#A?SO)

%&

'9 s   -D6c                     a a ] tR t^Wt oRtR-V3R lV 3R llltV3R lR ltV3R lR ltV3R lR	 ltV3R
 lR lt	V3R lR lt
V3R lR ltV3R lR ltV3R lR lt]V3R lR l4       tV3R lR ltV3R lR ltV3R lR ltV3R lR ltV3R lR ltV3R  lR! ltV3R" lR# ltV3R$ lR% ltV3R& lR' ltV3R( lR) ltV3R* lR+ ltR,tVtV ;t# ).Configurationa  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                :   < V ^8  d   QhRS[ RS[S[,          RR/# )r   isolated	load_onlyr   N)boolr   r   )r!   __classdict__s   "r"   r#   Configuration.__annotate__e   s+     G G G(4. GD Gr$   c           
     ^  < \         SV `  4        VeG   V\        9  d<   \        RP	                  RP                  \        \        \        4      4      4      4      hWn        W n	        \         Uu/ uF  q3. bK  	  upV n        \         Uu/ uF  q3/ bK  	  upV n        . V n        R # u upi u upi )Nz5Got invalid value for load_only - should be one of {}z, )super__init__VALID_LOAD_ONLYr	   r!   r:   mapreprrI   rJ   OVERRIDE_ORDER_parsers_config_modified_parsers)selfrI   rJ   variant	__class__s   &&& r"   rP   Configuration.__init__e   s     Yo%E$GNNIIc$89 
 !" (6H
'5GRK~H
 (64
'5GRK~4
 EGH
4
s   .B%	B*c                   < V ^8  d   QhRR/# r   r   N )r!   rL   s   "r"   r#   rM   z   s     * *d *r$   c                n    V P                  4        V P                  '       g   V P                  4        R# R# )z<Loads configuration from configuration files and environmentN)_load_config_filesrI   _load_environment_varsrX   s   &r"   loadConfiguration.loadz   s(    !}}}'') r$   c                0   < V ^8  d   QhRS[ S[,          /# r3   )r   r    )r!   rL   s   "r"   r#   rM      s      (3- r$   c                    V P                   f   Q R4       h V P                  4       ^ ,          #   \         d     R# i ; i)z7Returns the file with highest priority in configurationNz)Need to be specified a file to be editing)rJ   _get_parser_to_modify
IndexErrorrb   s   &r"   get_file_to_editConfiguration.get_file_to_edit   sC    ~~)V+VV)	--/22 		s   . ==c                F   < V ^8  d   QhRS[ S[S[S[3,          ,          /# r3   )r   r   r    r   )r!   rL   s   "r"   r#   rM      s!     ( (xc3h0 (r$   c                6    V P                   P                  4       # )zPReturns key-value pairs like dict.items() representing the loaded
configuration
)_dictionaryitemsrb   s   &r"   rn   Configuration.items   s     %%''r$   c                &   < V ^8  d   QhRS[ RS[/# )r   keyr   r    r   )r!   rL   s   "r"   r#   rM      s     
B 
BS 
BS 
Br$   c                    Tp\        V4      p V P                  V,          #   \         d    \        T4       \	        RT 24      hi ; i)z#Get a value from the configuration.No such key - )r+   rm   KeyErrorr1   r	   )rX   rq   orig_keys   && r"   	get_valueConfiguration.get_value   sU    c"	B##C(( 	B S!$~hZ%@AA		Bs	   " %Ac                *   < V ^8  d   QhRS[ RS[RR/# )r   rq   valuer   Nrr   )r!   rL   s   "r"   r#   rM      s"     . .S . . .r$   c                ~   \        V4      pV P                  4        V P                  '       g   Q hV P                  4       w  r4VeH   \	        V4      w  rVVP                  V4      '       g   VP                  V4       VP                  WVV4       W P                  V P                  ,          V&   V P                  W44       R# )z$Modify a value in the configuration.N)
r+   _ensure_have_load_onlyrJ   rg   r1   has_sectionadd_sectionsetrV   _mark_as_modified)rX   rq   rz   fnameparsersectionr   s   &&&    r"   	set_valueConfiguration.set_value   s    c"##%~~~~224,S1MG %%g..""7+JJwe,,1T^^$S)u-r$   c                $   < V ^8  d   QhRS[ RR/# )r   rq   r   Nr   )r!   rL   s   "r"   r#   rM      s     . .s .t .r$   c                ,   Tp\        V4      pV P                  4        V P                  '       g   Q hWP                  V P                  ,          9  d   \	        RV 24      hV P                  4       w  r4Ve   \        V4      w  rVVP                  V4      '       d   VP                  WV4      '       g   \	        R4      hVP                  V4      '       g   VP                  V4       V P                  W44       V P                  V P                  ,          V R# )z#Unset a value in the configuration.rt   Nz4Fatal Internal error [id=1]. Please report as a bug.)r+   r|   rJ   rV   r	   rg   r1   r}   remove_optionrn   remove_sectionr   )rX   rq   rv   r   r   r   r   s   &&     r"   unset_valueConfiguration.unset_value   s    c"##%~~~~ll4>>22$~hZ%@AA224,S1MG""7++0D0DW0S0S )J 
 <<((%%g.""51LL(-r$   c                   < V ^8  d   QhRR/# r]   r^   )r!   rL   s   "r"   r#   rM      s      d r$   c                   V P                  4        V P                   Fr  w  r\        P                  RV4       \	        \
        P                  P                  V4      4        \        VR4      ;_uu_ 4       pVP                  V4       RRR4       Kt  	  R#   + '       g   i     K  ; i  \         d   p\        RT RT 24      hRp?ii ; i)z!Save the current in-memory state.zWriting to %swNz:An error occurred while writing to the configuration file z: )r|   rW   loggerinfor   r8   r9   dirnameopenwriteOSErrorr	   )rX   r   r   ferrors   &    r"   saveConfiguration.save   s    ##%!33MEKK/ rwwu-.%%%LLO &% 4 &%% (PgRw( s6   !B)5BB)B& B)&B))C
4CC
c                   < V ^8  d   QhRR/# r]   r^   )r!   rL   s   "r"   r#   rM      s     M M Mr$   c                x    V P                   f   \        R4      h\        P                  RV P                   4       R # )Nz'Needed a specific file to be modifying.z$Will be working with %s variant only)rJ   r	   r   debugrb   s   &r"   r|   $Configuration._ensure_have_load_only   s+    >>!$%NOO;T^^Lr$   c                6   < V ^8  d   QhRS[ S[S[3,          /# r3   )r   r    r   )r!   rL   s   "r"   r#   rM      s     	 	T#s(^ 	r$   c                h    / p\          F%  pVP                  V P                  V,          4       K'  	  V# )z3A dictionary representing the loaded configuration.)rT   updaterV   )rX   retvalrY   s   &  r"   rm   Configuration._dictionary   s/    
 %GMM$,,w/0 & r$   c                   < V ^8  d   QhRR/# r]   r^   )r!   rL   s   "r"   r#   rM      s     ? ?D ?r$   c                   \        V P                  4       4      pV\        P                  ,          R,          \        P
                  .8X  d   \        P                  R4       R# VP                  4        Fx  w  r#V Fm  pV P                  e)   W P                  8w  d   \        P                  RWB4       K9  V P                  W$4      pV P                  V,          P                  WE34       Ko  	  Kz  	  R# )z,Loads configuration from configuration files:       NzZSkipping loading configuration files due to environment's PIP_CONFIG_FILE being os.devnullNz Skipping file '%s' (variant: %s))dictiter_config_filesr@   r   r8   devnullr   r   rn   rJ   
_load_filerU   append)rX   config_filesrY   filesr   r   s   &     r"   r`    Configuration._load_config_files   s    D2245		"3'BJJ<7LLA *002NG >>-'^^2KLL!CUT8 g&--uo>  3r$   c                ,   < V ^8  d   QhRS[ RS[RS[/# )r   rY   r   r   )r   r    RawConfigParser)r!   rL   s   "r"   r#   rM     s"      $ s  r$   c                   \         P                  R W4       V P                  V4      pVP                  4        FE  pVP	                  V4      pV P
                  V,          P                  V P                  WE4      4       KG  	  V# )z'For variant '%s', will try loading '%s')r   verbose_construct_parsersectionsrn   rV   r   _normalized_keys)rX   rY   r   r   r   rn   s   &&&   r"   r   Configuration._load_file  si    @'Q''.(GLL)ELL!(()>)>w)NO ) r$   c                &   < V ^8  d   QhRS[ RS[/# )r   r   r   r    r   )r!   rL   s   "r"   r#   rM     s      s  r$   c                X   \         P                  ! 4       p\        P                  P	                  V4      '       d,   \
        P                  ! R 4      p VP                  WR7       V# V#   \         d    \        RT R2TR7      h\         P                   d   p\        TR7      hRp?ii ; i)F)encodingzcontains invalid z characters)reasonr   )r   N)configparserr   r8   r9   existslocalegetpreferredencodingreadUnicodeDecodeErrorr
   Error)rX   r   r   locale_encodingr   s   &&   r"   r   Configuration._construct_parser  s    --/
 77>>%  $99%@O
EE< v & 7..?{K   %% E7eDDEs   A( (.B)B)B$$B)c                   < V ^8  d   QhRR/# r]   r^   )r!   rL   s   "r"   r#   rM   *  s     
 
 
r$   c                    V P                   \        P                  ,          P                  V P	                  RV P                  4       4      4       R# )z.Loads configuration from environment variablesz:env:N)rV   r@   r   r   r   get_environ_varsrb   s   &r"   ra   $Configuration._load_environment_vars*  s6    U]]#**!!'4+@+@+BC	
r$   c                h   < V ^8  d   QhRS[ RS[S[S[ S[3,          ,          RS[S[ S[3,          /# )r   r   rn   r   )r    r   r   r   r   )r!   rL   s   "r"   r#   rM   0  s:      #+E#s(O#<	c3hr$   c                Z    / pV F"  w  rEVR,           \        V4      ,           pWSV&   K$  	  V# )zNormalizes 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+   )rX   r   rn   
normalizedr   valrq   s   &&&    r"   r   Configuration._normalized_keys0  s7     
IDC-/$"77C!sO  r$   c                F   < V ^8  d   QhRS[ S[S[S[3,          ,          /# r3   )r   r   r    )r!   rL   s   "r"   r#   rM   >  s!     $ $(5c?"; $r$   c              #     "   \         P                  P                  4        FG  w  rVP                  R4      '       g   K  VR,          P	                  4       pV\
        9  g   KB  W23x  KI  	  R# 5i)z@Returns a generator with all environmental vars with prefix PIP_PIP_:   NNN)r8   environrn   r*   r(   ENV_NAMES_IGNORED)rX   rq   r   r   s   &   r"   r   Configuration.get_environ_vars>  sL     

((*HC~~f%%2w}}00)O	 +s   8A.A.#A.c                V   < V ^8  d   QhRS[ S[S[S[S[,          3,          ,          /# r3   )r   r   r   r   r    )r!   rL   s   "r"   r#   rM   G  s&        8E$S	/,B#C  r$   c              #  T  "   \         P                  P                  RR4      p\        4       p\        P
                  V\        P
                  ,          3x  V P                  '       * ;'       d/    T;'       d     \         P                  P                  V4      '       * pV'       d*   \        P                  V\        P                  ,          3x  \        P                  V\        P                  ,          3x  Ve   \        P                  V.3x  R# \        P                  . 3x  R# 5i)a`  Yields variant and configuration files associated with it.

This should be treated like items of a dictionary. The order
here doesn't affect what gets overridden. That is controlled
by OVERRIDE_ORDER. However this does control the order they are
displayed to the user. It's probably most ergonomic to display
things in the same order as OVERRIDE_ORDER
PIP_CONFIG_FILEN)r8   r   getrE   r@   r   rI   r9   r   r   r   r   )rX   env_config_filer   should_load_user_configs   &   r"   r   Configuration.iter_config_filesG  s      **..):DA.0llL666 '+mm"3 #
 #
?? ?9
 #**l5::666 jj,uzz222&))o...))R-s   A5D(8,D(%BD(c                <   < V ^8  d   QhRS[ RS[S[S[3,          /# )r   rY   r   )r   r   r    r   )r!   rL   s   "r"   r#   rM   g  s#     % %D %T#s(^ %r$   c                (    V P                   V,          # )z#Get values present in a config file)rV   )rX   rY   s   &&r"   get_values_in_config"Configuration.get_values_in_configg  s    ||G$$r$   c                6   < V ^8  d   QhRS[ S[S[3,          /# r3   )r   r    r   )r!   rL   s   "r"   r#   rM   k  s      uS/-A'B r$   c                    V P                   '       g   Q hV P                  V P                   ,          pV'       g   \        R 4      hVR,          # )z4Fatal Internal error [id=2]. Please report as a bug.)rJ   rU   r	   )rX   parserss   & r"   rg   #Configuration._get_parser_to_modifyk  sA    ~~~~--/$F 
 r{r$   c                *   < V ^8  d   QhRS[ RS[RR/# )r   r   r   r   Nr   )r!   rL   s   "r"   r#   rM   y  s"     = =s =O = =r$   c                f    W3pW0P                   9  d   V P                   P                  V4       R # R # N)rW   r   )rX   r   r   file_parser_tuples   &&& r"   r   Configuration._mark_as_modifiedy  s0    "O$:$::""))*;< ;r$   c                    < V ^8  d   QhRS[ /# r3   r   )r!   rL   s   "r"   r#   rM   ~  s     B B# Br$   c                P    V P                   P                   R V P                  : R2# )())rZ   __name__rm   rb   s   &r"   __repr__Configuration.__repr__~  s'    ..))*!D,<,<+?qAAr$   )rV   rW   rU   rI   rJ   r   )r   
__module____qualname____firstlineno____doc__rP   rc   ri   rn   rw   r   r   r   r|   propertyrm   r`   r   r   ra   r   r   r   r   rg   r   r   __static_attributes____classdictcell____classcell__)rZ   rL   s   @@r"   rG   rG   W   s     G G** * ( (
B 
B. .&. .: 0M M
 	 	? ?.  *
 
 $ $   @% % = =
B B Br$   rG   )versionhelp),r   r   r   r8   r<   typingr   r   r   r   r   r   r   pip._internal.exceptionsr	   r
   pip._internal.utilsr   pip._internal.utils.compatr   pip._internal.utils.loggingr   pip._internal.utils.miscr   r   r   r    r   r;   r   r@   r   r   r   r   r   rT   rQ   r   r   r+   r1   rE   rG   r^   r$   r"   <module>r      s      	 
 F F F ( . 1 5..vs&)J%  				 uzz5::uyy%--O**ellEJJ6	8	&hB hBr$   