hyb
2026-01-07 c7f60dc7e9a36596f0e0d1787bd0cca4e9b57bcb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
Ë
ñúhû8ãóÜ—dZddlmZddlZddlZddlZddlZddlmZddl    m
Z
m Z ddl m Z mZddlmZddlmZdd    lmZdd
lmZmZej0Ze d e«Zerd nd ZdZeddddd¬«Zej<ej>ej@ejBejDfZ#ej>ej<ej@fZ$ee%«Z&dd„Z'dd„Z(dd„Z)Gd„d«Z*y)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
é)Ú annotationsN)ÚIterable)ÚAnyÚNewType)ÚConfigurationErrorÚ!ConfigurationFileCouldNotBeLoaded)Úappdirs)ÚWINDOWS)Ú    getLogger)Ú
ensure_dirÚenumÚKindzpip.inizpip.conf)ÚversionÚhelpÚuserÚglobalÚsiteÚenvzenv-var)ÚUSERÚGLOBALÚSITEÚENVÚENV_VARcór—|j«jdd«}|jd«r|dd}|S)zAMake a name consistent regardless of source (environment or file)Ú_ú-z--éN)ÚlowerÚreplaceÚ
startswith)Únames úNH:\Change_password\venv_build\Lib\site-packages\pip/_internal/configuration.pyÚ_normalize_namer#5s6€à :‰:‹<× Ñ   SÓ )€DØ ‡tÔØABˆxˆØ €KócóP—d|vrd|›d}t|«‚|jdd«S)Nú.zVKey does not contain dot separated section and key. Perhaps you wanted to use 'global.z
' instead?é)rÚsplit)r!Ú error_messages  r"Ú_disassemble_keyr*=s>€Ø
$ð 1Ø15°°jð Bð    ô! Ó/Ð/Ø :‰:c˜1Ó Ðr$cód—tjd«Dcgc]&}tjj    |t
«‘Œ(}}tjj    t jt
«}tjj    tjjd«trdndt
«}tjj    tjd«t
«}tj|tj|gtj||giScc}w)NÚpipú~z.pip)r    Úsite_config_dirsÚosÚpathÚjoinÚCONFIG_BASENAMEÚsysÚprefixÚ
expanduserr
Úuser_config_dirÚkindsrrr)r0Úglobal_config_filesÚsite_config_fileÚlegacy_config_fileÚnew_config_files     r"Úget_configuration_filesr<Gs؀ä8?×8PÑ8PÐQVÓ8WöØ04Œ‰ ‰ Tœ?Õ+ðÐðô—w‘w—|‘|¤C§J¡J´Ó@ÐÜŸ™Ÿ™Ü
‰×ј3Ó݉˜fÜóÐô
—g‘g—l‘l¤7×#:Ñ#:¸5Ó#AÄ?ÓS€Oä  ‰ Ð)Ü 
‰
Ð%Ð&Ü 
‰
Ð'¨Ð9ð ðùòs˜+D-có܇—eZdZdZddˆfd„ Zdd„Zdd„Zdd„Zdd„Zdd„Z    dd„Z
dd    „Z dd
„Z e dd „«Zdd „Zd d „Zd!d„Zdd„Z                        d"d„Zd#d„Zd$d„Zd%d„Zd&d„Zd'd„Zd(d„ZˆxZS))Ú 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
óR•—t‰|«|C|tvr;tdj    dj t tt««««‚||_||_    tDcic]}|g“Œc}|_ tDcic]}|i“Œc}|_ g|_ ycc}wcc}w)Nz5Got invalid value for load_only - should be one of {}z, )ÚsuperÚ__init__ÚVALID_LOAD_ONLYrÚformatr1ÚmapÚreprÚisolatedÚ    load_onlyÚOVERRIDE_ORDERÚ_parsersÚ_configÚ_modified_parsers)ÚselfrFrGÚvariantÚ    __class__s    €r"rAzConfiguration.__init__hs¬ø€Ü ‰ÑÔà Ð   Y´oÑ%EÜ$ØG×NÑNØ—I‘Iœc¤$¬Ó8Ó9óóð ð
!ˆŒ Ø"ˆŒô(6öH
Ø#ˆGR‰KòH
ˆŒ ô(6ö?
Ø#ˆGR‰Kò?
ˆŒ ðEGˆÕùò H
ùò?
s Á+
BÂ
B$có^—|j«|js|j«yy)z<Loads configuration from configuration files and environmentN)Ú_load_config_filesrFÚ_load_environment_vars©rLs r"ÚloadzConfiguration.load}s&€à ×ÑÔ!؏}Š}Ø × 'Ñ 'Õ )ðr$cón—|j€Jd«‚    |j«dS#t$rYywxYw)z7Returns the file with highest priority in configurationNz)Need to be specified a file to be editingr)rGÚ_get_parser_to_modifyÚ
IndexErrorrRs r"Úget_file_to_editzConfiguration.get_file_to_editƒsC€à~‰~Ð)ÐVÐ+VÓVÐ)ð    Ø×-Ñ-Ó/°Ñ2Ð 2øÜò    Ùð    ús •(¨    4³4có6—|jj«S)z`Returns key-value pairs like dict.items() representing the loaded
        configuration
        )Ú _dictionaryÚitemsrRs r"rZzConfiguration.itemsŒs€ð×Ñ×%Ñ%Ó'Ð'r$cóؗ|}t|«}    i}|jj«D]}|j|«Œ||S#t$rt |«t d|›«‚wxYw)z#Get a value from the configuration.úNo such key - )r#rYÚvaluesÚupdateÚKeyErrorr*r)rLÚkeyÚorig_keyÚ clean_configÚ file_valuess     r"Ú    get_valuezConfiguration.get_value’s€€àˆÜ˜cÓ"ˆð        BØ+-ˆLØ#×/Ñ/×6Ñ6Ó8ò 1 Ø×#Ñ# KÕ0ð 1à Ñ$Ð $øÜò    Bô ˜SÔ !Ü$ ~°h°ZÐ%@ÓAÐ Að        Bús 6AÁ#A)cóº—t|«}|j«|jsJ‚|j«\}}|Ct    |«\}}|j |«s|j |«|j|||«|j|jj|i«||j|j||<|j||«y)z$Modify a value in the configuration.N) r#Ú_ensure_have_load_onlyrGrUr*Ú has_sectionÚ add_sectionÚsetrJÚ
setdefaultÚ_mark_as_modified)rLr`ÚvalueÚfnameÚparserÚsectionr!s       r"Ú    set_valuezConfiguration.set_value¡sÁ€ä˜cÓ"ˆØ ×#Ñ#Ô%à~Š~Ј~Ø×2Ñ2Ó4‰ ˆˆvà Ð Ü,¨SÓ1‰MˆGTð×%Ñ% gÔ.Ø×"Ñ" 7Ô+Ø J‰Jw  eÔ ,à  ‰ T—^‘^Ñ$×/Ñ/°°rÔ:Ø38ˆ ‰ T—^‘^Ñ$ UÑ+¨CÑ0Ø ×јu fÕ-r$có€—|}t|«}|j«|jsJ‚|j«\}}||j|j|vr)||j|jvrt d|›«‚|pt |«\}}|j|«r|j||«s t d«‚|j|«s|j|«|j||«    |j|j||=y#t$r|j|j|=YywxYw)z#Unset a value in the configuration.r\Nz4Fatal Internal error [id=1]. Please report as a bug.) r#rfrGrUrJrr*rgÚ remove_optionrZÚremove_sectionrkr_)rLr`rarmrnror!s       r"Ú unset_valuezConfiguration.unset_valueµs0€àˆÜ˜cÓ"ˆØ ×#Ñ#Ô%à~Š~Ј~Ø×2Ñ2Ó4‰ ˆˆvð t—|‘| D§N¡NÑ3°EÑ:Ñ :ؘ4Ÿ<™<¨¯©Ñ7Ñ7ä$ ~°h°ZÐ%@ÓAÐ Aà Ð Ü,¨SÓ1‰MˆGTà×"Ñ" 7Ô+°×0DÑ0DÀWÈdÔ0Sô)ØJóðð
—<‘< Ô(Ø×%Ñ% gÔ.Ø × "Ñ " 5¨&Ô 1ð    2Ø— ‘ ˜TŸ^™^Ñ,¨UÑ3°CÑ8øÜò    2Ø— ‘ ˜TŸ^™^Ñ,¨SÒ1ð    2úsÃ9DÄ#D=Ä<D=cór—|j«|jD]j\}}tjd|«t    t
j j|««    t|d«5}|j|«ddd«Œly#1swYŒ xYw#t$r}td|›d|›«‚d}~wwxYw)z!Save the current in-memory state.z Writing to %sÚwNz:An error occurred while writing to the configuration file z: ) rfrKÚloggerÚinfor r/r0ÚdirnameÚopenÚwriteÚOSErrorr)rLrmrnÚfÚerrors     r"ÚsavezConfiguration.save×s­€à ×#Ñ#Ô%à!×3Ñ3ò    ‰MˆE6Ü K‰K˜¨Ô /ô ”r—w‘w—‘ uÓ-Ô .ð ܘ% Ó%ð$¨Ø—L‘L ”O÷$øñ    ÷$ð$ûäò Ü(ØPؐg˜R ˜wð(óðûð ús0Á" BÁ.B ÂB B    ÂB    B6 B1Â1B6cór—|j€ td«‚tjd|j«y)Nz'Needed a specific file to be modifying.z$Will be working with %s variant only)rGrrwÚdebugrRs r"rfz$Configuration._ensure_have_load_onlyïs+€Ø >‰>Ð !Ü$Ð%NÓOÐ O܏ ‰ Ð;¸T¿^¹^ÕLr$có\—i}tD] }|j|j|«Œ"|S)z3A dictionary representing the loaded configuration.)rHr^rJ)rLÚretvalrMs   r"rYzConfiguration._dictionaryôs4€ð
ˆä%ò    1ˆGØ M‰M˜$Ÿ,™, wÑ/Õ 0ð    1ðˆ r$cóº—t|j««}|tjddtj
gk(rt jd«y|j«D]q\}}|D]g}|j'||jk7rt jd||«Œ6|j||«}|j|j||f«ŒiŒsy)z,Loads configuration from configuration filesrr'zZSkipping loading configuration files due to environment's PIP_CONFIG_FILE being os.devnullNz Skipping file '%s' (variant: %s)) ÚdictÚiter_config_filesr7rr/ÚdevnullrwrrZrGÚ
_load_filerIÚappend)rLÚ config_filesrMÚfilesrmrns      r"rPz Configuration._load_config_filess̀ä˜D×2Ñ2Ó4Ó5ˆ Ø œŸ    ™    Ñ " 1 QÐ '¬B¯J©J¨<Ò 7Ü L‰LðAô ð à*×0Ñ0Ó2ò     ?‰NˆGUØò
?ð—>‘>Ð-°'¸T¿^¹^Ò2KÜ—L‘LÐ!CÀUÈGÔTØàŸ™¨°%Ó8ð— ‘ ˜gÑ&×-Ñ-¨u°f¨oÕ>ñ
?ñ     ?r$cóB—tjd||«|j|«}|j«D]c}|j    |«}|j
|j |i«|j
||j|j||««Œe|S)Nz'For variant '%s', will try loading '%s')    rwÚverboseÚ_construct_parserÚsectionsrZrJrjr^Ú_normalized_keys)rLrMrmrnrorZs      r"rˆzConfiguration._load_files’€Ü‰Ð@À'È5ÔQØ×'Ñ'¨Ó.ˆà—‘Ó(ò    WˆGØ—L‘L Ó)ˆEØ L‰L˜Ñ !× ,Ñ ,¨U°BÔ 7Ø L‰L˜Ñ ! %Ñ (× /Ñ /°×0EÑ0EÀgÈuÓ0UÕ Vð    Wð
ˆ r$cóB—tj«}tjj    |«r+t j d«}    |j||¬«|S|S#t$rtd|›d|¬«‚tj$r}t|¬«‚d}~wwxYw)NF)Úencodingzcontains invalid z  characters)Úreasonrm)r~) Ú configparserÚRawConfigParserr/r0ÚexistsÚlocaleÚgetpreferredencodingÚreadÚUnicodeDecodeErrorrÚError)rLrmrnÚlocale_encodingr~s     r"rŽzConfiguration._construct_parser"sŸ€Ü×-Ñ-Ó/ˆô
7‰7>‰>˜%Ô  Ü$×9Ñ9¸%Ó@ˆOð
EØ— ‘ ˜E¨O Ô<ðˆ ˆvˆ øô&ò ä7Ø.¨Ð.?¸{ÐKØôðô ×%Ñ%ò Eä7¸eÔDÐDûð EúsÁ
A!Á!,B BÂBcóø—|jtjjdi«|jtjdj    |j d|j «««y)z.Loads configuration from environment variablesz:env:N)rJr7rrjr^rÚget_environ_varsrRs r"rQz$Configuration._load_environment_vars7sX€à  ‰ ”U—]‘]Ñ#×.Ñ.¨w¸Ô;Ø  ‰ ”U—]‘]Ñ# GÑ,×3Ñ3Ø × !Ñ ! '¨4×+@Ñ+@Ó+BÓ Cõ    
r$cóJ—i}|D]\}}|dzt|«z}|||<Œ|S)z×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#)rLrorZÚ
normalizedr!Úvalr`s       r"rzConfiguration._normalized_keys>s@€ðˆ
Øò    "‰IˆD#ؘC‘-¤/°$Ó"7Ñ7ˆCØ!ˆJsŠOð    "ðÐr$c#óÀK—tjj«D]9\}}|jd«sŒ|ddj    «}|t
vsŒ4||f–—Œ;y­w)z@Returns a generator with all environmental vars with prefix PIP_ÚPIP_éN)r/ÚenvironrZr rÚENV_NAMES_IGNORED)rLr`r¡r!s    r"ržzConfiguration.get_environ_varsLsUèø€äŸ
™
×(Ñ(Ó*ò    $‰HˆCØ~‰~˜fÕ%ؘ1˜2w—}‘}“ØÔ0Ò0Ø ˜)“Oñ        $ùs‚6A¹AÁ    Ac#óK—tjjdd«}t«}tj
|tj
f–—|j xr$|xrtjj|« }|r%tj|tjf–—tj|tjf–—|tj|gf–—ytjgf–—y­w)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) r/r¥Úgetr<r7rrFr0r–rrr)rLÚenv_config_filerŠÚshould_load_user_configs    r"r†zConfiguration.iter_config_filesUsÈèø€ôŸ*™*Ÿ.™.Ð):¸DÓAˆÜ.Ó0ˆ äl‰l˜L¬¯©Ñ6Ð6Ò6ð'+§m¡mÐ"3ò#
Ø Ò ?¤§¡§¡¨Ó ?ð9
Ðñ #ä—*‘*˜l¬5¯:©:Ñ6Ð6Ò 6ôj‰j˜,¤u§z¡zÑ2Ð2Ò2à Ð &Ü—)‘)˜oÐ.Ð.Ó .ä—)‘)˜R-Ó ùs‚C<C>có —|j|S)z#Get values present in a config file)rJ)rLrMs  r"Úget_values_in_configz"Configuration.get_values_in_configus€à|‰|˜GÑ$Ð$r$cót—|jsJ‚|j|j}|s td«‚|dS)Nz4Fatal Internal error [id=2]. Please report as a bug.éÿÿÿÿ)rGrIr)rLÚparserss  r"rUz#Configuration._get_parser_to_modifyys?€à~Š~Ј~Ø—-‘- §¡Ñ/ˆÙä$ØFóð ð
r‰{Ðr$có`—||f}||jvr|jj|«yy©N)rKr‰)rLrmrnÚfile_parser_tuples    r"rkzConfiguration._mark_as_modified‡s4€Ø" F˜OÐØ  D×$:Ñ$:Ñ :Ø × "Ñ "× )Ñ )Ð*;Õ <ð ;r$cóN—|jj›d|j›dS)Nú(ú))rNÚ__name__rYrRs r"Ú__repr__zConfiguration.__repr__Œs'€Ø—.‘.×)Ñ)Ð*¨!¨D×,<Ñ,<Ð+?¸qÐAÐAr$r²)rFÚboolrGz Kind | NoneÚreturnÚNone)rºr»)rºz
str | None)rºúIterable[tuple[str, Any]])r`Ústrrºr)r`r½rlrrºr»)r`r½rºr»)rºzdict[str, dict[str, Any]])rMrrmr½rºr•)rmr½rºr•)ror½rZr¼rºúdict[str, Any])rºzIterable[tuple[str, str]])rºz Iterable[tuple[Kind, list[str]]])rMrrºr¾)rºztuple[str, RawConfigParser])rmr½rnr•rºr»)rºr½)r·Ú
__module__Ú __qualname__Ú__doc__rArSrWrZrdrprtrrfÚpropertyrYrPrˆrŽrQrržr†r­rUrkr¸Ú __classcell__)rNs@r"r>r>Zsžø„ñ öGó**ó ó(ó Bó.ó( 2óDó0Mð
ò    óð    ó?ó.    óó*
ð Øð Ø#<ð à    ó ó$ó ó@%ó ó=÷
Br$r>)r!r½rºr½)r!r½rºz    list[str])rºzdict[Kind, list[str]])+rÁÚ
__future__rr”r—r/r3Úcollections.abcrÚtypingrrÚpip._internal.exceptionsrrÚpip._internal.utilsr    Úpip._internal.utils.compatr
Úpip._internal.utils.loggingr Úpip._internal.utils.miscr r r•r½rr2r¦r7rrrrrrHrBr·rwr#r*r<r>©r$r"ú<module>rÍsÚðñ õ#ãÛ Û    Û
Ý$ß÷õ(Ý.Ý1ß5à×.Ñ.€ÙˆvsÓ€á&‘)¨J€Ø%Ðñ     Ø    Ø Ø    Ø Ø ô     €ð—‘˜uŸz™z¨5¯:©:°u·y±yÀ%Ç-Á-ÐO€Ø—*‘*˜eŸl™l¨E¯J©JÐ6€á    8Ó    €óóó÷&sBòsBr$