2bi6 SrSSKrSSKrSSKrSSKrSSKJrJrJrJ r J r J r J r SSK JrJr SSKJr SSKJr SSKJr SSKJrJr \R2r\ "S \5r\(aS OS rS r\"S SSSSS9r\R>\R@\RB\RD\RF4r$\R@\R>\RB4r%\"\&5r'S\S\4Sjr(S\S\ \4Sjr)S\\\ \44Sjr*"SS5r+g)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)AnyDictIterableListNewTypeOptionalTuple)ConfigurationError!ConfigurationFileCouldNotBeLoaded)appdirs)WINDOWS) getLogger) ensure_direnumKindzpip.inizpip.conf)versionhelpuserglobalsiteenvzenv-var)USERGLOBALSITEENVENV_VARnamereturnc|UR5RSS5nURS5(aUSSnU$)zAMake a name consistent regardless of source (environment or file)_-z--N)lowerreplace startswith)rs ڍ/builddir/build/BUILDROOT/alt-python313-pip-23.3.1-3.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/pip/_internal/configuration.py_normalize_namer'2s9 ::<  S )D tABx KcjSU;aSRU5n[U5eURSS5$)N.zbKey does not contain dot separated section and key. Perhaps you wanted to use 'global.{}' instead?)formatr split)r error_messages r&_disassemble_keyr/:s: $ = &, !// ::c1 r(cv[R"S5Vs/sH'n[RR U[ 5PM) nn[RR [ R[ 5n[RR [RRS5[(aSOS[ 5n[RR [R"S5[ 5n[RU[RU/[RX4/0$s snf)Npip~z.pip)r site_config_dirsospathjoinCONFIG_BASENAMEsysprefix expanduserr user_config_dirkindsrrr)r5global_config_filessite_config_filelegacy_config_filenew_config_files r&get_configuration_filesrADs8?8P8PQV8W8W T?+8Www||CJJ@ 3f ggll7#:#:5#A?SO ) %& '9 s.D6c^\rSrSrSrS$S\S\\SS4U4SjjjrS%Sjr S\\ 4S jr S\ \ \ \44S jrS \ S\4S jrS \ S \SS4SjrS \ SS4SjrS%SjrS%Sjr\S\\ \44Sj5rS%SjrS\S\ S\4SjrS\ S\4SjrS%SjrS\ S\ \ \ \4S\\ \44SjrS\ \ \ \ 44SjrS\ \ \\\ 44Sjr S\S\\ \44Sjr!S\ \ \44Sjr"S\ S \SS4S!jr#S\ 4S"jr$S#r%U=r&$)& ConfigurationWaHandles 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. Nisolated load_onlyrc \>[TU]5 UbEU[;a;[SR SR [ [[5555eXlX l [Vs0sHo3/_M snUl [Vs0sHo30_M snUl /Ul gs snfs snf)Nz5Got invalid value for load_only - should be one of {}z, )super__init__VALID_LOAD_ONLYr r,r6mapreprrErFOVERRIDE_ORDER_parsers_config_modified_parsers)selfrErFvariant __class__s r&rIConfiguration.__init__es   Yo%E$GNNIIc$89  ! "(6H '5GRK~H  (64 '5GRK~4  EG H 4 s , B$ B)chUR5 UR(dUR5 gg)z>2 2$~hZ%@A A224   ,S1MG""7++0D0DW0S0S)J <<((%%g.  " "5 1 LL ( -r(cUR5 URHjup[RSU5 [ [ R RU55 [US5nURU5 SSS5 Ml g!,(df  M~=f![an[SUSU35eSnAff=f)z!Save the current in-memory state.z Writing to %swNz:An error occurred while writing to the configuration file z: ) rmrPloggerinforr4r5dirnameopenwriteOSErrorr )rQrrrsferrors r&saveConfiguration.saves ##%!33ME KK / rwwu- . %%LLO&%4&% (PgRw( s6! B-B ?B B BB B>(B99B>ctURc [S5e[RSUR5 g)Nz'Needed a specific file to be modifying.z$Will be working with %s variant only)rFr r~debugrXs r&rm$Configuration._ensure_have_load_onlys+ >> !$%NO O ;T^^Lr(c`0n[H!nURURU5 M# U$)z3A dictionary representing the loaded configuration.)rMupdaterO)rQretvalrRs r&raConfiguration._dictionarys/ %G MM$,,w/ 0& r(c[UR55nU[RSS[R /:Xa[ RS5 gUR5Hrup#UHgnURb'X R:wa[ RSXB5 M7URX$5nURURXE45 Mi Mt g)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)) dictiter_config_filesr<rr4devnullr~rrbrF _load_filerNappend)rQ config_filesrRfilesrrrss r&rV Configuration._load_config_filessD2245  "1Q 'BJJ< 7 LLA  *002NG>>-'^^2KLL!CUT8 g&--uo>3r(rRrrc[RSX5 URU5nUR5HAnUR U5nUR UR URXE55 MC U$)Nz'For variant '%s', will try loading '%s')r~verbose_construct_parsersectionsrbrOr_normalized_keys)rQrRrrrsrtrbs r&rConfiguration._load_file si@'Q''.(GLL)E LL ! ( ()>)>w)N O) r(c@[R"5n[RR U5(a([ R "S5nURXS9 U$U$![a [SUS3US9e[Ran[US9eSnAff=f)NF)encodingzcontains invalid z characters)reasonrr)r) configparserRawConfigParserr4r5existslocalegetpreferredencodingreadUnicodeDecodeErrorr Error)rQrrrslocale_encodingrs r&rConfiguration._construct_parsers--/ 77>>% $99%@O E E < v & 7..?{K %% E7eDD EsA$$+B BBcUR[RRUR SUR 555 g)z.Loads configuration from environment variablesz:env:N)rOr<rrrget_environ_varsrXs r&rW$Configuration._load_environment_vars*s6 U]]#**  ! !'4+@+@+B C r(rtrbcJ0nUHupEUS-[U5-nXSU'M U$)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')rQrtrb normalizedrvalrds r&rConfiguration._normalized_keys0s7 IDC-/$"77C!sOr(c## [RR5HAupURS5(dMUSSR 5nU[ ;dM<X24v MC g7f)z@Returns a generator with all environmental vars with prefix PIP_PIP_N)r4environrbr%r#ENV_NAMES_IGNORED)rQrdrrs r&rConfiguration.get_environ_vars>sN ((*HC~~f%%12w}}00)O +s8A'A' A'c#0# [RRSS5nUb[RU/4v O[R/4v [ 5n[R U[R 4v UR(+=(a- U=(a [RRU5(+nU(a%[RU[R4v [RU[R4v g7f)zoYields variant and configuration files associated with it. This should be treated like items of a dictionary. PIP_CONFIG_FILEN) r4rgetr<rrArrEr5rrr)rQ config_filershould_load_user_configs r&rConfiguration.iter_config_filesGsjjnn%6=  "))k]* *))R- .0 llL666'+mm"3#  7BGGNN;79  #**l5::66 6jj,uzz222sDDc URU$)z#Get values present in a config file)rO)rQrRs r&get_values_in_config"Configuration.get_values_in_configes||G$$r(cUR(deURURnU(d [S5eUS$)Nz4Fatal Internal error [id=2]. Please report as a bug.)rFrNr )rQparserss r&r\#Configuration._get_parser_to_modifyis?~~~--/$F  r{r(rsc`X4nX0R;aURRU5 ggN)rPr)rQrrrsfile_parser_tuples r&rqConfiguration._mark_as_modifiedws0"O $:$: :  " " ) )*; < ;r(cPURRSUR<S3$)N())rS__name__rarXs r&__repr__Configuration.__repr__|s'..))*!D,<,<+?qAAr()rOrPrNrErFr)rN)'r __module__ __qualname____firstlineno____doc__boolrrrIrYstrr^rr rrbrirurzrrmpropertyrrarVrrrrWrrrrrr\rqr__static_attributes__ __classcell__)rSs@r&rCrCWs GG(4.GDGG** (3-(xc3h0( BS BS B.S...&.s.t.:0M  T#s(^  ?.$ss*  #+E#s(O#<  c3h $(5c?";$38E$S /,B#C3<%D%T#s(^% uS/-A'B =s=O== B#BBr(rC),rrrr4r8typingrrrrrrr pip._internal.exceptionsr r pip._internal.utilsr pip._internal.utils.compatr pip._internal.utils.loggingrpip._internal.utils.miscrrrrrr7rr<rrrrrrMrJrr~r'r/rArCr(r&rs  FFF(.15..vs&)J%      uzz5::uyy%--O**ellEJJ6 8 ##349dDIo!6&fBfBr(