grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026o ®û|jôÖã@s® ddlmZddlmZddlZddlZddlZddlZddl Z ddl Z ddl Z gd¢Z e ZdZdZGdd„deƒZGd d „d eƒZGd d „d eƒZGd d„deƒZGdd„deƒZGdd„deƒZGdd„deƒZGdd„deƒZGdd„deƒZGdd„deƒZGdd„deƒZeƒZGdd„dƒZGdd „d eƒZ Gd!d"„d"eƒZ!Gd#d$„d$eƒZ"Gd%d&„d&eƒZ#Gd'd(„d(e#ƒZ$Gd)d*„d*e$ƒZ%Gd+d,„d,eƒZ&Gd-d.„d.eƒZ'dS)/é)ÚMutableMapping)ÚChainMapN)ÚNoSectionErrorÚDuplicateOptionErrorÚDuplicateSectionErrorÚ NoOptionErrorÚInterpolationErrorÚInterpolationDepthErrorÚInterpolationMissingOptionErrorÚInterpolationSyntaxErrorÚ ParsingErrorÚMissingSectionHeaderErrorÚ ConfigParserÚSafeConfigParserÚRawConfigParserÚ InterpolationÚBasicInterpolationÚExtendedInterpolationÚLegacyInterpolationÚ SectionProxyÚConverterMappingÚ DEFAULTSECTÚMAX_INTERPOLATION_DEPTHZDEFAULTé c@s$eZdZ ddd„Zdd„ZeZdS)ÚErrorÚcCs||_t ||¡dS©N)ÚmessageÚ ExceptionÚ__init__)ÚselfÚmsg©r"ú3/opt/alt/python310/lib64/python3.10/configparser.pyr¬szError.__init__cCó|jSr)r©r r"r"r#Ú__repr__°ózError.__repr__N)r)Ú__name__Ú __module__Ú __qualname__rr&Ú__str__r"r"r"r#r©s  rc@óeZdZ dd„ZdS)rcCs$t |d|f¡||_|f|_dS)NzNo section: %r)rrÚsectionÚargs©r r-r"r"r#r¹s zNoSectionError.__init__N©r(r)r*rr"r"r"r#r¶ó rc@óeZdZ ddd„ZdS)rNcCs’t|ƒdg}|dur)dt|ƒg}|dur| d |¡¡| d¡| |¡|}n| dd¡t |d |¡¡||_||_ ||_ |||f|_ dS)Nú already existsúWhile reading from ú [line {0:2d}]z : section rzSection r) ÚreprÚappendÚformatÚextendÚinsertrrÚjoinr-ÚsourceÚlinenor.)r r-r<r=r!rr"r"r#rÇs     zDuplicateSectionError.__init__©NNr0r"r"r"r#r¿src@r2)rNcCs¢t|ƒdt|ƒdg}|dur-dt|ƒg}|dur | d |¡¡| d¡| |¡|}n| dd¡t |d |¡¡||_||_ ||_ ||_ ||||f|_ dS) Nz in section r3r4r5z : option rzOption r) r6r7r8r9r:rrr;r-Úoptionr<r=r.)r r-r?r<r=r!rr"r"r#ràs"ÿ    zDuplicateOptionError.__init__r>r0r"r"r"r#rÙsrc@r,)rcCs.t |d||f¡||_||_||f|_dS)NzNo option %r in section: %r©rrr?r-r.)r r?r-r"r"r#r÷s ÿzNoOptionError.__init__Nr0r"r"r"r#rôr1rc@r,)rcCs(t ||¡||_||_|||f|_dSrr@)r r?r-r!r"r"r#rs zInterpolationError.__init__Nr0r"r"r"r#rÿr1rc@r,)r cCs8d ||||¡}t ||||¡||_||||f|_dS)NzˆBad value substitution: option {!r} in section {!r} contains an interpolation key {!r} which is not a valid option name. Raw value: {!r})r8rrÚ referencer.)r r?r-ÚrawvalrAr!r"r"r#r s  þz(InterpolationMissingOptionError.__init__Nr0r"r"r"r#r r1r c@s eZdZdS)r N)r(r)r*r"r"r"r#r sr c@r,)r cCs0d ||t|¡}t ||||¡|||f|_dS)Nz¢Recursion limit exceeded in value substitution: option {!r} in section {!r} contains an interpolation key which cannot be substituted in {} steps. Raw value: {!r})r8rrrr.)r r?r-rBr!r"r"r#r sÿýz InterpolationDepthError.__init__Nr0r"r"r"r#r r1r c@s:eZdZ d dd„Zedd„ƒZejdd„ƒZdd„ZdS) r NcCsP|r|rtdƒ‚|s|stdƒ‚|r|}t |d|¡||_g|_|f|_dS)Nz:Cannot specify both `filename' and `source'. Use `source'.z%Required argument `source' not given.z"Source contains parsing errors: %r)Ú ValueErrorrrr<Úerrorsr.)r r<Úfilenamer"r"r#r-s zParsingError.__init__cCs tjdtdd�|jS©NzNThe 'filename' attribute will be removed in Python 3.12. Use 'source' instead.é©Ú stacklevel©ÚwarningsÚwarnÚDeprecationWarningr<r%r"r"r#rE<s ýzParsingError.filenamecCs tjdtdd�||_dSrFrJ©r Úvaluer"r"r#rEFs ý cCs*|j ||f¡|jd||f7_dS)Nz [line %2d]: %s)rDr7r)r r=Úliner"r"r#r7PszParsingError.appendr>)r(r)r*rÚpropertyrEÚsetterr7r"r"r"r#r *s    r c@r,)r cCs8t |d|||f¡||_||_||_|||f|_dS)Nz7File contains no section headers. file: %r, line: %d %r)rrr<r=rPr.)r rEr=rPr"r"r#rXsÿþz"MissingSectionHeaderError.__init__Nr0r"r"r"r#r Ur1r c@s.eZdZ dd„Zdd„Zdd„Zdd„Zd S) rcCó|Srr")r Úparserr-r?rOÚdefaultsr"r"r#Ú before_getlózInterpolation.before_getcCrSrr"©r rTr-r?rOr"r"r#Ú before_setorWzInterpolation.before_setcCrSrr"rXr"r"r#Ú before_readrrWzInterpolation.before_readcCrSrr"rXr"r"r#Ú before_writeurWzInterpolation.before_writeN)r(r)r*rVrYrZr[r"r"r"r#ris  rc@ó0eZdZ e d¡Zdd„Zdd„Zdd„ZdS) rz %\(([^)]+)\)sc Có$g}| ||||||d¡d |¡S©Nér©Ú_interpolate_somer;©r rTr-r?rOrUÚLr"r"r#rVŠó zBasicInterpolation.before_getcCó<| dd¡}|j d|¡}d|vrtd|| d¡fƒ‚|S)Nz%%rú%ú1invalid interpolation syntax in %r at position %d©ÚreplaceÚ_KEYCREÚsubrCÚfind©r rTr-r?rOZ tmp_valuer"r"r#rY�ó  ÿzBasicInterpolation.before_setc Csb|j||d|d�}|tkrt|||ƒ‚|r¯| d¡} | dkr%| |¡dS| dkr8| |d| …¡|| d…}|dd…} | dkrN| d¡|dd…}n]| dkr¢|j |¡} | durdt||d|ƒ‚| |   d¡¡} ||   ¡d…}z|| } Wnt y‰t |||| ƒd‚wd| vrœ|  |||| |||d¡n| | ¡n t||d |fƒ‚|sdSdS) NT©ÚrawÚfallbackrfrr_rGú(ú'bad interpolation variable reference %rz/'%%' must be followed by '%%' or '(', found: %r)Úgetrr rlr7rjÚmatchr Ú optionxformÚgroupÚendÚKeyErrorr ra)r rTr?ÚaccumÚrestr-ÚmapÚdepthrBÚpÚcÚmÚvarÚvr"r"r#ra—sX       ÿ  ÿÿÿ  ÿ ÿþ áz$BasicInterpolation._interpolate_someN© r(r)r*ÚreÚcompilerjrVrYrar"r"r"r#rys   rc@r\) rz \$\{([^}]+)\}c Cr]r^r`rbr"r"r#rVÇrdz ExtendedInterpolation.before_getcCre)Nz$$rú$rgrhrmr"r"r#rYÌrnz ExtendedInterpolation.before_setc Csæ|j||d|d�}|tkrt|||ƒ‚|rñ| d¡} | dkr%| |¡dS| dkr8| |d| …¡|| d…}|dd…} | dkrN| d¡|dd…}nŸ| dkrä|j |¡} | durdt||d|ƒ‚|  d¡  d ¡} ||   ¡d…}|} |}z7t | ƒdkr‹|  | d¡}||}n#t | ƒdkr¥| d} |  | d¡}|j| |dd �}n t||d |fƒ‚Wnt ttfyÄt|||d  | ¡ƒd‚wd|vrÞ| ||||| t|j| dd �ƒ|d¡n| |¡n t||d |fƒ‚|sdSdS) NTror†rr_rGÚ{rsú:)rpzMore than one ':' found: %rz-'$' must be followed by '$' or '{', found: %r)rtrr rlr7rjrur rwÚsplitrxÚlenrvryrrr r;raÚdictÚitems)r rTr?rzr{r-r|r}rBr~rr€ÚpathZsectÚoptr‚r"r"r#raÔst       ÿ   þ€ÿÿÿþ ÿþ Ôz'ExtendedInterpolation._interpolate_someNrƒr"r"r"r#rÁs   rc@s4eZdZ e d¡Zdd„Zdd„Zedd„ƒZ dS) rz%\(([^)]*)\)s|.c Csœ|}t}|r@|d8}|r=d|vr=tj|j|d�}|j ||¡}z||}Wnty<} z t|||| jdƒd‚d} ~ wwn|s|rLd|vrLt |||ƒ‚|S)Nr_z%()rTr) rÚ functoolsÚpartialÚ_interpolation_replacerjrkryr r.r ) r rTr-r?rOÚvarsrBr}riÚer"r"r#rVs0 ÿ ÿÿ€ÿô zLegacyInterpolation.before_getcCrSrr"rXr"r"r#rY%rWzLegacyInterpolation.before_setcCs(| d¡}|dur | ¡Sd| |¡S)Nr_z%%(%s)s)rwrv)rurTÚsr"r"r#r‘(s z*LegacyInterpolation._interpolation_replaceN) r(r)r*r„r…rjrVrYÚ staticmethodr‘r"r"r"r#r s rc s4eZdZ dZdZdZeƒZe  eej ¡Z e  ej dd�ej ¡Z e  ej dd�ej ¡Ze  d¡Zddddddddd œZd edfd d d ddeeed œdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdcdd„Zdcdd„Zdddd „Zded"d#„Zdcd$d%„Zdd ed&œd'd(„Zd)d*„Z dd ed&œd+d,„Z!dd ed&œd-d.„Z"dd ed&œd/d0„Z#dd ed&œd1d2„Z$edd f‡fd3d4„ Z%d5d6„Z&d7d8„Z'd9d:„Z(dcd;d<„Z)dfd=d>„Z*d?d@„Z+dAdB„Z,dCdD„Z-dEdF„Z.dGdH„Z/dIdJ„Z0dKdL„Z1dMdN„Z2dOdP„Z3dQdR„Z4dSdT„Z5dUdV„Z6dWdX„Z7dYdZ„Z8d[d\„Z9d]d]d]d^œd_d`„Z:e;dadb„ƒZ<‡Z=S)grz¥ \[ # [ (?P
.+) # very permissive! \] # ] a( (?P