Your IP : 3.142.198.108


Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/configparser.cpython-312.opt-2.pyc

�

�Q�f����	ddlmZddlmZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZdZe
ZdZdZGd�de�ZGd	�d
e�ZGd�de�ZGd
�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�Ze�ZGd�d�ZGd�d e�Z Gd!�d"e�Z!Gd#�d$e�Z"Gd%�d&e�Z#Gd'�d(e#�Z$Gd)�d*e�Z%Gd+�d,e�Z&y)-�)�MutableMapping)�ChainMapN)�NoSectionError�DuplicateOptionError�DuplicateSectionError�
NoOptionError�InterpolationError�InterpolationDepthError�InterpolationMissingOptionError�InterpolationSyntaxError�ParsingError�MissingSectionHeaderError�ConfigParser�RawConfigParser�
Interpolation�BasicInterpolation�ExtendedInterpolation�LegacyInterpolation�SectionProxy�ConverterMapping�DEFAULTSECT�MAX_INTERPOLATION_DEPTH�DEFAULT�
c� �eZdZ	dd�Zd�ZeZy)�Errorc�>�||_tj||�y�N)�message�	Exception�__init__)�self�msgs  �3/opt/alt/python312/lib64/python3.12/configparser.pyr!zError.__init__�s��������4��%�c��|jSr)r�r"s r$�__repr__zError.__repr__�s���|�|�r%N)�)�__name__�
__module__�__qualname__r!r(�__str__�r%r$rr�s��1�&���Gr%rc��eZdZ	d�Zy)rc�T�tj|d|���||_|f|_y)NzNo section: )rr!�section�args�r"r1s  r$r!zNoSectionError.__init__�s#��
���t��:�;�����K��	r%N�r*r+r,r!r.r%r$rr�s
��<� r%rc��eZdZ	dd�Zy)rNc�v�t|�dg}|�Tdt|�g}|� |jdj|��|jd�|j|�|}n|j	dd�t
j
|dj|��||_||_	||_
|||f|_y)N� already exists�While reading from � [line {0:2d}]z
: section rzSection r))�repr�append�format�extend�insertrr!�joinr1�source�linenor2)r"r1r@rAr#rs      r$r!zDuplicateSectionError.__init__�s����G�}�/�0����,�d�6�l�;�G��!����/�6�6�v�>�?��N�N�<�(��N�N�3���C��J�J�q�*�%�
���t�R�W�W�S�\�*�����������f�f�-��	r%�NNr4r.r%r$rr�s���.r%rc��eZdZ	dd�Zy)rNc��t|�dt|�dg}|�Tdt|�g}|� |jdj|��|jd�|j|�|}n|j	dd�t
j
|dj|��||_||_	||_
||_||||f|_y)	Nz in section r7r8r9z	: option rzOption r))
r:r;r<r=r>rr!r?r1�optionr@rAr2)r"r1rEr@rAr#rs       r$r!zDuplicateOptionError.__init__�s����F�|�^�T�'�]� �"����,�d�6�l�;�G��!����/�6�6�v�>�?��N�N�;�'��N�N�3���C��J�J�q�)�$�
���t�R�W�W�S�\�*��������������f�f�f�5��	r%rBr4r.r%r$rr�s���6r%rc��eZdZ	d�Zy)rc�j�tj|d|�d|���||_||_||f|_y)Nz
No option z
 in section: �rr!rEr1r2)r"rEr1s   r$r!zNoOptionError.__init__�s4��
���t���)�	*��������W�%��	r%Nr4r.r%r$rr�s
��+�&r%rc��eZdZ	d�Zy)r	c�`�tj||�||_||_|||f|_yrrH)r"rEr1r#s    r$r!zInterpolationError.__init__s,��
���t�S�!��������W�c�*��	r%Nr4r.r%r$r	r	�s
��:�+r%r	c��eZdZ	d�Zy)rc��dj||||�}tj||||�||_||||f|_y)Nz�Bad value substitution: option {!r} in section {!r} contains an interpolation key {!r} which is not a valid option name. Raw value: {!r})r<r	r!�	referencer2)r"rEr1�rawvalrMr#s      r$r!z(InterpolationMissingOptionError.__init__sI��!�!'�����F�!K�	�	�#�#�D�&�'�3�?�"����W�f�i�8��	r%Nr4r.r%r$rr	s
��K�9r%rc��eZdZy)rN)r*r+r,r.r%r$rrs��r%rc��eZdZ	d�Zy)r
c�x�dj||t|�}tj||||�|||f|_y)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})r<rr	r!r2)r"rEr1rNr#s     r$r!z InterpolationDepthError.__init__ sF����&���*A��!�	�
	�#�#�D�&�'�3�?��W�f�-��	r%Nr4r.r%r$r
r
s
��:�.r%r
c�&��eZdZ	�fd�Zd�Z�xZS)r
c�V��t�|�d|���||_g|_|f|_y)Nz Source contains parsing errors: )�superr!r@�errorsr2)r"r@�	__class__s  �r$r!zParsingError.__init__-s/���
���;�F�:�F�G��������J��	r%c�r�|jj||f�|xjd||fzz
c_y)Nz
	[line %2d]: %s)rUr;r)r"rA�lines   r$r;zParsingError.append3s0�������F�D�>�*����,���~�=�=�r%)r*r+r,r!r;�
__classcell__�rVs@r$r
r
*s���H��>r%r
c��eZdZ	d�Zy)rc�z�tj|d|||fz�||_||_||_|||f|_y)Nz7File contains no section headers.
file: %r, line: %d
%r)rr!r@rArXr2)r"�filenamerArXs    r$r!z"MissingSectionHeaderError.__init__;sH��
����G�
�v�t�$�
%�	&���������	��v�t�,��	r%Nr4r.r%r$rr8s
��J�-r%rc�&�eZdZ	d�Zd�Zd�Zd�Zy)rc��|Srr.)r"�parserr1rE�value�defaultss      r$�
before_getzInterpolation.before_getO����r%c��|Srr.�r"r`r1rEras     r$�
before_setzInterpolation.before_setRrdr%c��|Srr.rfs     r$�before_readzInterpolation.before_readUrdr%c��|Srr.rfs     r$�before_writezInterpolation.before_writeXrdr%N)r*r+r,rcrgrirkr.r%r$rrLs��L����r%rc�D�eZdZ	ejd�Zd�Zd�Zd�Zy)rz
%\(([^)]+)\)sc	�V�g}|j||||||d�dj|�S�N�r)��_interpolate_somer?�r"r`r1rErarb�Ls       r$rczBasicInterpolation.before_getm�/�������v�v�q�%��(�A�N��w�w�q�z�r%c��|jdd�}|jjd|�}d|vrtd||j	d�fz��|S)Nz%%r)�%�1invalid interpolation syntax in %r at position %d��replace�_KEYCRE�sub�
ValueError�find�r"r`r1rEra�	tmp_values      r$rgzBasicInterpolation.before_setr�`���M�M�$��+�	��L�L�$�$�R��3�	��)���+�.3�Y�^�^�C�5H�-I�J�K�
K��r%c
���|j||d|��}|tkDr
t|||��|�r|jd�}	|	dkr|j	|�y|	dkDr|j	|d|	�||	d}|dd}
|
dk(r|j	d�|dd}n�|
dk(r�|j
j
|�}|�t||d|z��|j|jd��}||j�d}	||}
d|
vr|j||||
|||dz�n"|j	|
�nt||d	|����|r��yy#t$rt||||�d�wxYw)
NT��raw�fallbackrvrro��(�'bad interpolation variable reference %rz+'%' must be followed by '%' or '(', found: )�getrr
r}r;rz�matchr�optionxform�group�end�KeyErrorrrq)r"r`rE�accum�restr1�map�depthrN�p�c�m�var�vs              r$rqz$BasicInterpolation._interpolate_somezs������G�V����E���*�*�)�&�'�6�B�B���	�	�#��A��1�u����T�"���1�u����T�"�1�X�&��A�B�x���Q�q�	�A��C�x����S�!��A�B�x���c���L�L�&�&�t�,���9�2�6�7�A�D�H�J�J��(�(������4���A�E�E�G�H�~��@��C��A��!�8��*�*�6�6�5�!�+2�C����D��L�L��O�.��G�#'�*�+�+�?��, �@�9�����6�;?�@�@�s�<E�E!N�	r*r+r,�re�compilerzrcrgrqr.r%r$rr\s*��I��b�j�j�)�*�G��
�'+r%rc�D�eZdZ	ejd�Zd�Zd�Zd�Zy)rz
\$\{([^}]+)\}c	�V�g}|j||||||d�dj|�Srnrprrs       r$rcz ExtendedInterpolation.before_get�rtr%c��|jdd�}|jjd|�}d|vrtd||j	d�fz��|S)Nz$$r)�$rwrxr~s      r$rgz ExtendedInterpolation.before_set�r�r%c
��|j||d|��}|tkDr
t|||��|�r�|jd�}	|	dkr|j	|�y|	dkDr|j	|d|	�||	d}|dd}
|
dk(r|j	d�|dd}�n:|
dk(�r$|j
j
|�}|�t||d|z��|jd�jd	�}||j�d}|}
|}	t|�dk(r|j|d�}||}nLt|�dk(r.|d}
|j|d�}|j|
|d�
�}nt||d|����d|vr5|j%|||||
t'|j)|
d�
��|dz�n"|j	|�nt||d|����|r���yy#tttf$rt!|||d	j#|��d�wxYw)
NTr�r�rror��{r��:)r�zMore than one ':' found: z+'$' must be followed by '$' or '{', found: )r�rr
r}r;rzr�rr��splitr��lenr�r�rrrr?rq�dict�items)r"r`rEr�r�r1r�r�rNr�r�r��path�sect�optr�s                r$rqz'ExtendedInterpolation._interpolate_some�s=�����G�V����E���*�*�)�&�'�6�B�B���	�	�#��A��1�u����T�"���1�u����T�"�1�X�&��A�B�x���Q�q�	�A��C�x����S�!��A�B�x���c���L�L�&�&�t�,���9�2�6�7�A�D�H�J�J��w�w�q�z�'�'��,���A�E�E�G�H�~������K��4�y�A�~�$�0�0��a��9����H���T��a��#�A�w��$�0�0��a��9��"�J�J�t�S�d�J�;��6�"�G�=A�C�E�E��!�8��*�*�6�3��q�$�+/����T�t��0L�+M�+0�1�9�6��L�L��O�.��G�#'�*�+�+�Y��D!�.�-�@�K�9�������$��A�FJ�K�K�s
�A4G�3H
Nr�r.r%r$rr�s)��>��b�j�j�)�*�G��
�4+r%rc�`��eZdZ	ejd�Z�fd�Zd�Zd�Ze	d��Z
�xZS)rz%\(([^)]*)\)s|.c�\��t�|�|i|��tjdtd��y)Nz�LegacyInterpolation has been deprecated since Python 3.2 and will be removed from the configparser module in Python 3.13. Use BasicInterpolation or ExtendedInterpolation instead.r�)�
stacklevel)rTr!�warnings�warn�DeprecationWarning)r"r2�kwargsrVs   �r$r!zLegacyInterpolation.__init__�s.���
���$�)�&�)��
�
�
G�
�1�		
r%c�@�|}t}|rS|dz}|rHd|vrDtj|j|��}|jj||�}	||z}nn|r�S|rd|vr
t|||��|S#t$r!}	t||||	jd�d�d}	~	wwxYw)Nroz%()r`r)
r�	functools�partial�_interpolation_replacerzr{r�rr2r
)
r"r`r1rEra�varsrNr�ry�es
          r$rczLegacyInterpolation.before_get�s�����'����Q�J�E�����#�+�+�D�,G�,G�39�;�����(�(��%�8��F�!�D�L�E�
���T�U�]�)�&�'�6�B�B���� �F�9���������<�AE�F��F�s�A3�3	B�<B�Bc��|Srr.rfs     r$rgzLegacyInterpolation.before_setrdr%c�p�|jd�}|�|j�Sd|j|�zS)Nroz%%(%s)s)r�r�)r�r`�ss   r$r�z*LegacyInterpolation._interpolation_replaces6���K�K��N���9��;�;�=� ��v�1�1�!�4�4�4r%)r*r+r,r�r�rzr!rcrg�staticmethodr�rYrZs@r$rr�s?���@��b�j�j�+�,�G�
��(��5��5r%rc
���eZdZ	dZdZdZe�Zejeej�Zejejd��ej�Z
ejejd��ej�Zejd�Zddddddddd	�Zd
edfddd
ddeeed
�d�Zd�Zd�Zd�Zd�Zd�Zd8d�Zd8d�Zd9d�Zd:d�Zdd
ed�d�Zd�Zdd
ed�d�Z dd
ed�d�Z!dd
ed�d�Z"dd
ed�d�Z#edd
f�fd�	Z$d �Z%d!�Z&d"�Z'd8d#�Z(d;d$�Z)d%�Z*d&�Z+d'�Z,d(�Z-d)�Z.d*�Z/d+�Z0d,�Z1d-�Z2d.�Z3d/�Z4d0�Z5d1�Z6d2�Z7d3�Z8d4d4d4d5�d6�Z9e:d7��Z;�xZ<S)<rz�
        \[                                 # [
        (?P<header>.+)                     # very permissive!
        \]                                 # ]
        a�
        (?P<option>.*?)                    # very permissive!
        \s*(?P<vi>{delim})\s*              # any number of space/tab,
                                           # followed by any of the
                                           # allowed delimiters,
                                           # followed by any space/tab
        (?P<value>.*)$                     # everything up to eol
        a�
        (?P<option>.*?)                    # very permissive!
        \s*(?:                             # any number of space/tab,
        (?P<vi>{delim})\s*                 # optionally followed by
                                           # any of the allowed
                                           # delimiters, followed by any
                                           # space/tab
        (?P<value>.*))?$                   # everything up to eol
        z=|:��delimz\STF)�1�yes�true�on�0�no�false�offN��=r�)�#�;)�
delimiters�comment_prefixes�inline_comment_prefixes�strict�empty_lines_in_values�default_section�
interpolation�
convertersc��||_|j�|_|j�|_t|�|_|j�|_t
||	�|j
|	<t|�|_|dk(r |r|jn|j|_n�djd�|D��}|rDtj|jj!|��tj"�|_nCtj|j$j!|��tj"�|_t|xsd�|_t|xsd�|_||_||_||_|	|_|
|_|j2t4ur|j6|_|j2�t9�|_t;|j2t8�s!t=dt?|j2�����|t4ur|jjA|�|r|jC|�yy)Nr��|c3�FK�|]}tj|����y�wr)r��escape)�.0�ds  r$�	<genexpr>z+RawConfigParser.__init__.<locals>.<genexpr>Ws����:�z�!����1��z�s�!r�r.zSinterpolation= must be None or an instance of Interpolation; got an object of type )"�_dict�	_sections�	_defaultsr�_converters�_proxiesr�tuple�_delimiters�	OPTCRE_NV�OPTCRE�_optcrer?r�r��_OPT_NV_TMPLr<�VERBOSE�	_OPT_TMPL�_comment_prefixes�_inline_comment_prefixes�_strict�_allow_no_value�_empty_lines_in_valuesr��_interpolation�_UNSET�_DEFAULT_INTERPOLATIONr�
isinstance�	TypeError�type�update�_read_defaults)
r"rb�	dict_type�allow_no_valuer�r�r�r�r�r�r�r�r�s
             r$r!zRawConfigParser.__init__Fs�����
�������������+�D�1����
�
���
�)5�d�O�)L��
�
�o�&� ��,�����#�-;�4�>�>����D�L����:�z�:�:�A��!�z�z�$�*;�*;�*B�*B��*B�*K�*,�*�*� 6��� "�z�z�$�.�.�*?�*?�a�*?�*H�*,�*�*� 6���!&�'7�'=�2�!>���(-�.E�.K��(L��%����-���&;��#�,���+������&�(�"&�"=�"=�D�����&�"/�/�D���$�-�-�}�=��*�*.�t�/B�/B�*C�)D�F��
��V�#����#�#�J�/������)�r%c��|jSr)r�r's r$rbzRawConfigParser.defaultsss���~�~�r%c�J�	t|jj��Sr)�listr��keysr's r$�sectionszRawConfigParser.sectionsvs��A��D�N�N�'�'�)�*�*r%c���	||jk(rtd|z��||jvrt|��|j	�|j|<t||�|j|<y)NzInvalid section name: %r)r�r|r�rr�rr�r3s  r$�add_sectionzRawConfigParser.add_section{sh��	�
�d�*�*�*��7�'�A�B�B��d�n�n�$�'��0�0�"&�*�*�,����w��!-�d�G�!<��
�
�g�r%c� �	||jvSr)r�r3s  r$�has_sectionzRawConfigParser.has_section�s��	��$�.�.�(�(r%c���		|j|j�}|j	|j
�t
|j��S#t$r
t|�d�wxYwr)r��copyr�rr�r�r�r�)r"r1�optss   r$�optionszRawConfigParser.options�sb��G�	4��>�>�'�*�/�/�1�D�	
���D�N�N�#��D�I�I�K� � ���	4� ��)�t�3�	4�s�A�A*c��	t|tttjf�r|g}tj|�}g}|D]k}	t||��5}|j||�ddd�t|tj�rtj|�}|j|��m|S#1swY�MxYw#t$rY��wxYw)N)�encoding)r��str�bytes�os�PathLike�io�
text_encoding�open�_read�OSError�fspathr;)r"�	filenamesr�read_okr]�fps      r$�readzRawConfigParser.read�s���
	��i�#�u�b�k�k�!:�;�"��I��#�#�H�-����!�H�
��(�X�6�"��J�J�r�8�,�7��(�B�K�K�0��9�9�X�.���N�N�8�$�"���7�6���
��
�s*�
B?�B3�'B?�3B<	�8B?�?	C�
Cc�j�	|�
	|j}|j||�y#t$rd}Y� wxYw)Nz<???>)�name�AttributeErrorr	)r"�fr@s   r$�	read_filezRawConfigParser.read_file�sB��	��>�
!�����	
�
�
�1�f���"�
!� ��
!�s�$�2�2c�T�	tj|�}|j||�yr)r�StringIOr)r"�stringr@�sfiles    r$�read_stringzRawConfigParser.read_string�s!��5����F�#�����u�f�%r%c��	t�}|j�D]�\}}t|�}	|j|�|j|�|j�D]q\}}|jt|��}|�t|�}|jr||f|vr
t|||��|j||f�|j|||��s��y#tt
f$r|jr||vr�Y��wxYwr)
�setr�rr�rr|r��addr�r)r"�
dictionaryr@�elements_addedr1r��keyras        r$�	read_dictzRawConfigParser.read_dict�s���	����'�-�-�/�M�G�T��'�l�G�
�� � ��)�
���w�'�"�j�j�l�
��U��&�&�s�3�x�0���$���J�E��<�<�W�c�N�n�$D�.�w��V�D�D��"�"�G�S�>�2�����#�u�-�+�0��*�:�6�
��<�<�G�~�$=���
�s�C� C:�9C:�r�r�r�c� �		|j||�}|j|�}	||}|s|�|S|jj|||||�S#t$r|tur�|cYSwxYw#t$r|turt||��|cYSwxYwr)�
_unify_valuesrr�r�r�rr�rc)r"r1rEr�r�r�r�ras        r$r�zRawConfigParser.get�s���
	�	 ��"�"�7�D�1�A��!�!�&�)��	 ��f�I�E��%�-��L��&�&�1�1�$����23�5�
5��#�	 ��6�!����		 ���	 ��6�!�#�F�G�4�4���		 �s"�A�A+�A(�'A(�+B
�B
c�6�||j||fi|���Sr)r�)r"r1�convrEr�s     r$�_getzRawConfigParser._gets���H�D�H�H�W�f�7��7�8�8r%c�t�	|j|||f||d�|��S#ttf$r|tur�|cYSwxYw)N)r�r�)r&rrr�)r"r1rEr%r�r�r�r�s        r$�	_get_convzRawConfigParser._get_convsU��	��4�9�9�W�d�F�'��$�'�%�'�
'���
�.�	��6�!���O�	�s��7�7c�<�|j||tf|||d�|��S�Nr!)r(�int�r"r1rEr�r�r�r�s       r$�getintzRawConfigParser.getints/���t�~�~�g�v�s�;��$�'/�;�39�;�	;r%c�<�|j||tf|||d�|��Sr*)r(�floatr,s       r$�getfloatzRawConfigParser.getfloats/���t�~�~�g�v�u�;�#�D�'/�;�39�;�	;r%c�H�|j|||jf|||d�|��Sr*)r(�_convert_to_booleanr,s       r$�
getbooleanzRawConfigParser.getboolean$s9���t�~�~�g�v�t�/G�/G�O�"%�D�8�O�GM�O�	Or%c������	�	�turt�
��	�S�jj	��		�	j�j��t�	j��}|r,|j�D]\}}|�	�j|�<��	��fd�}|r�	fd�}|D�cgc]}|||�f��c}S#t$r��jk7rt���Y��wxYwcc}w)Nc�H���jj��|�|��Sr)r�rc)rEr�r1r"s ���r$�<lambda>z'RawConfigParser.items.<locals>.<lambda>As%���d�&9�&9�&D�&D�T��V�Q�v�Y��'+r%c����|Srr.)rEr�s �r$r6z'RawConfigParser.items.<locals>.<lambda>Ds	���!�F�)r%)
r�rTr�r�r�r�r�r�r�rr�r�r�)r"r1r�r��	orig_keysrra�value_getterrEr�rVs``       @�r$r�zRawConfigParser.items)s����		��f���7�=�?�"��N�N���!��	.�
�H�H�T�^�^�G�,�-������N�	��"�j�j�l�
��U�+0��$�"�"�3�'�(�+�+���3�L�=F�G�Y�6���f�-�.�Y�G�G���	.��$�.�.�.�$�W�-�-�/�	.��Hs�C�.C+�#C(�'C(c�T�	|j�D]}||}||=||fcSt�r)r�r��r"rras   r$�popitemzRawConfigParser.popitemGs:��	��=�=�?�C���I�E��S�	���:��#��r%c�"�|j�Sr)�lower)r"�	optionstrs  r$r�zRawConfigParser.optionxformTs����� � r%c���	|r||jk(r|j|�}||jvS||jvry|j|�}||j|vxs||jvS)NF)r�r�r�r�)r"r1rEs   r$�
has_optionzRawConfigParser.has_optionWs��	N��'�T�%9�%9�9��%�%�f�-�F��T�^�^�+�+�
�D�N�N�
*���%�%�f�-�F��d�n�n�W�5�5�0�����/�
1r%c��	|r|jj||||�}|r||jk(r
|j}n	|j|}|||j|�<y#t
$r
t
|�d�wxYwr)r�rgr�r�r�r�rr�)r"r1rEra�sectdicts     r$rzRawConfigParser.setes������'�'�2�2�4��&�38�:�E��'�T�%9�%9�9��~�~�H�
8��>�>�'�2��.3���!�!�&�)�*���
8�$�W�-�4�7�
8�s�A%�%A;c�j�	|rdj|jd�}n|jd}|jr6|j||j|jj�|�|jD]1}|j|||j|j�|��3y)Nz {} r)r<r�r��_write_sectionr�r�r�)r"r�space_around_delimitersr�r1s     r$�writezRawConfigParser.writess���	�#��
�
�d�.�.�q�1�2�A�� � ��#�A��>�>�����D�$8�$8�$(�N�N�$8�$8�$:�A�
?��~�~�G�����G� $���w� 7� =� =� ?��
D�&r%c�X�	|jdj|��|D]s\}}|jj||||�}|�|js|t|�j
dd�z}nd}|jdj||���u|jd�y)Nz[{}]
�
z
	r)z{}{}
)rGr<r�rkr�rry)r"r�section_name�
section_items�	delimiterrras       r$rEzRawConfigParser._write_section�s���;�
�������.�/�'�J�C���'�'�4�4�T�<��5:�<�E�� ��(<�(<�!�C��J�$6�$6�t�V�$D�D�����H�H�X�_�_�S�%�0�1�(�	����r%c���	|r||jk(r
|j}n	|j|}|j|�}||v}|r||=|S#t$r
t	|�d�wxYwr)r�r�r�r�rr�)r"r1rErC�existeds     r$�
remove_optionzRawConfigParser.remove_option�s{����'�T�%9�%9�9��~�~�H�
8��>�>�'�2���!�!�&�)���H�$����� ����
�
8�$�W�-�4�7�
8�s�A�A"c�\�	||jv}|r|j|=|j|=|Sr)r�r�)r"r1rNs   r$�remove_sectionzRawConfigParser.remove_section�s3��$��T�^�^�+������w�'��
�
�g�&��r%c�v�||jk7r|j|�st|��|j|Sr)r�r�r�r��r"rs  r$�__getitem__zRawConfigParser.__getitem__�s6���$�&�&�&�t�/?�/?��/D��3�-���}�}�S�!�!r%c���||vr|||ury||jk(r|jj�n+||jvr|j|j�|j	||i�yr)r�r��clearr�r r;s   r$�__setitem__zRawConfigParser.__setitem__�sj���$�;�4��9��-���$�&�&�&��N�N� � �"�
�D�N�N�
"��N�N�3��%�%�'�����U�|�$r%c��||jk(rtd��|j|�st|��|j	|�y)Nz"Cannot remove the default section.)r�r|r�r�rQrSs  r$�__delitem__zRawConfigParser.__delitem__�sB���$�&�&�&��A�B�B�����$��3�-�����C� r%c�F�||jk(xs|j|�Sr)r�r�rSs  r$�__contains__zRawConfigParser.__contains__�s#���d�*�*�*�C�d�.>�.>�s�.C�Cr%c�2�t|j�dzS)Nro)r�r�r's r$�__len__zRawConfigParser.__len__�s���4�>�>�"�Q�&�&r%c�t�tj|jf|jj	��Sr)�	itertools�chainr�r�r�r's r$�__iter__zRawConfigParser.__iter__�s)������ 4� 4�6����8K�8K�8M�N�Nr%c��	t�}d}d}d}d}d}d}		t|d��D�]t\}}
tj}|jD�cic]}|d��}
}|tjk(r�|
r�i}|
j�D]S\}}|
j
||dz�}|dk(r�!|||<|dk(s|dkDs�1|
|dz
j�s�Ht||�}�U|}
|tjk(r|
r��|jD]%}|
j�j|�s�#d}n|tjk(rd}|
d|j�}|s>|jr |�.|�,|r*||�%||jd�ntj}��b|jj|
�}|r|j!�nd}|�|r||kDr||j|����|}|j"j%|�}|r�|j'd�}||j(vr>|j*r||vr
t-|||��|j(|}|j/|�ne||j0k(r
|j2}nI|j5�}||j(|<t7||�|j8|<|j/|�d}���|�
t;|||
��|j<j%|�}|r�|j'ddd	�\}}}|s|j?|	|||
�}	|jA|jC��}|j*r||f|vrtE||||��|j/||f�|�|j�}|g||<��Zd||<��a|j?|	|||
�}	��w	|jG�|	r|	�ycc}w#|jG�wxYw)
Nrro)�start���r)�headerrE�vira)$r�	enumerate�sys�maxsizer�r�r}�isspace�minr��strip�
startswithr�r;�NONSPACECRE�searchrc�SECTCREr�r�r�r�rrr�r�r�rr�rr��
_handle_errorr��rstripr�_join_multiline_values)r"r�fpnamer�cursect�sectname�optnamerA�indent_levelr�rX�
comment_startr��inline_prefixes�
next_prefixes�prefix�indexra�first_nonspace�cur_indent_level�morf�optvals                       r$r	zRawConfigParser._read�s���	� ���������������_	*� )�"�A� 6� 6���� #���
�26�2O�2O�"P�2O�Q�1�b�5�2O��"P�#�s�{�{�2��$&�M�)8�)>�)>�)@�
��� $�	�	�&�%��'� :�� �B�;�$�05�
�f�-� �A�:�%�!�)��U�1�W�
�8M�8M�8O�,/�
�u�,E�M�
*A�'4�O�$�s�{�{�2��#�4�4�F��z�z�|�.�.�v�6�()�
��5�!�C�K�K�/�$(�M��^�m�,�2�2�4����2�2�*�1�#�/�#�#�G�,�8�#�G�,�3�3�B�7�(+�{�{���!%�!1�!1�!8�!8��!>��=K�>�#7�#7�#9�QR� ��'�G�$�|�3��G�$�+�+�E�2�$4�L����+�+�E�2�B��#%�8�8�H�#5��#�t�~�~�5�#�|�|��N�0J�&;�H�f�<B�'D�!D�&*�n�n�X�&>�G�*�.�.�x�8�%��)=�)=�=�&*�n�n�G�&*�j�j�l�G�7>�D�N�N�8�4�6B�4��6R�D�M�M�(�3�*�.�.�x�8�"&�� ��7����M�M�"�\�\�/�/��6���24�(�(�8�T�7�2S�/�G�R��#*�$(�$6�$6�q�&�&�$�$O��&*�&6�&6�w�~�~�7G�&H�G� $���!)�7� 3�~� E�&:�8�W�;A�6�'K�!K�*�.�.��'�/B�C� &�1�)/�����4:�8��� 0�48��� 0�!%� 2� 2�1�f�f�d� K�A�y!7�|
�'�'�)���G�
��{#Q��v
�'�'�)�s7�2N9�
N4�AN9�/N9�%N9�,.N9�JN9�4N9�9Oc�v�|j|jf}tj|f|jj��}|D]m\}}|j�D]U\}}t
|t�rdj|�j�}|jj||||�||<�W�oy)NrI)r�r�r_r`r�r�r�r�r?rrr�ri)r"rb�all_sectionsr1r�r�vals       r$rsz&RawConfigParser._join_multiline_valuesJs����'�'����7�� ����{�'+�~�~�';�';�'=�?�� ,��G�W�$�]�]�_�	��c��c�4�(��)�)�C�.�/�/�1�C� $� 3� 3� ?� ?��@G�@D�c�!K���
�-�!-r%c�r�	|j�D]#\}}||j|j|�<�%yr)r�r�r�)r"rbrras    r$r�zRawConfigParser._read_defaultsVs5��	+�"�.�.�*�J�C��49�D�N�N�4�+�+�C�0�1�+r%c�V�|st|�}|j|t|��|Sr)r
r;r:)r"�excrtrArXs     r$rqzRawConfigParser._handle_error\s&����v�&�C��
�
�6�4��:�&��
r%c�$�	i}	|j|}i}|r9|j	�D]&\}}|�t|�}|||j
|�<�(t|||j�S#t$r||jk7rt|�d�Y�zwxYwr)	r�r�r�rr�rr��	_ChainMapr�)r"r1r��sectiondict�vardictrras       r$r#zRawConfigParser._unify_valuesbs���	���	8��.�.��1�K�
���"�j�j�l�
��U��$���J�E�16���(�(��-�.�+���+�t�~�~�>�>���	8��$�.�.�.�$�W�-�4�7�/�	8�s�A(�($B�Bc��	|j�|jvrtd|z��|j|j�S)NzNot a boolean: %s)r>�BOOLEAN_STATESr|)r"ras  r$r2z#RawConfigParser._convert_to_booleanvsC��	��;�;�=�� 3� 3�3��0�5�8�9�9��"�"�5�;�;�=�1�1r%r))r1rErac���	t|t�std��t|t�std��|jr|rt|t�std��yy)Nzsection names must be stringszoption keys must be stringszoption values must be strings)r�rr�r�)r"r1rEras    r$�_validate_value_typesz%RawConfigParser._validate_value_types}s`��	��'�3�'��;�<�<��&�#�&��9�:�:��#�#�u��e�S�)�� ?�@�@�*�(-r%c��|jSr)r�r's r$r�zRawConfigParser.converters�s�����r%r)z<string>)z<dict>)T)=r*r+r,�
_SECT_TMPLr�r�rr�r�r�r�rpr<r�r�rnr��
_default_dictrr�r!rbr�r�r�r�rrrr r�r&r(r-r0r3r�r<r�rArrGrErOrQrTrWrYr[r]rar	rsr�rqr#r2r��propertyr�rYrZs@r$rrs����6��J�
�I��L�+�_���b�j�j��R�Z�Z�0�G�
�R�Z�Z�	�(�(�u�(�5�r�z�z�
B�F���
�
�<�.�.�U�.�;�R�Z�Z�H�I��"�*�*�U�#�K���d�$� ���e�M�N�!%�
� %�+*�5?�",�d��D�!,�%�&�+*�Z�+�
=�)�!��6
�&�
.�>+0�d�V�#5�J9�7<�$�!��.3���;�
05�4� �;�
27�T�"�O�
#��D�H�<�!�1�3�D�(�
��"�
%�!�D�'�O�z�x
K�:��?�(2�02�"�B�A�*� �� r%rc�@��eZdZ	e�Zd�fd�	Z�fd�Zd�Z�xZS)rc�P��	|j||��t�|�	|||�y�N)rEra)r�rTr)r"r1rErarVs    �r$rzConfigParser.set�s+���	.��"�"�&��"�>�
���G�V�U�+r%c�J��	|j|��t�|�	|�y)N)r1)r�rTr�)r"r1rVs  �r$r�zConfigParser.add_section�s(���	�	
�"�"�7�"�3�
���G�$r%c��		|j}t�|_|j|j|i�||_y#|_wxYwr)r�rr r�)r"rb�hold_interpolations   r$r�zConfigParser._read_defaults�sK��	�
	5�!%�!4�!4��"/�/�D���N�N�D�0�0�(�;�<�"4�D���"4�D��s�8A�	Ar)	r*r+r,rr�rr�r�rYrZs@r$rr�s���2�/�1��,�%�5r%rc�v�eZdZ	d�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zed
��Z
ed��Zdd
ddd�d�Zy)rc��	||_||_|jD]?}d|z}tj|j
t
||���}t|||��Ay)Nr���_impl)�_parser�_namer�r�r�r��getattr�setattr)r"r`rr%r�getters      r$r!zSectionProxy.__init__�sU��N������
��%�%�D��$�,�C��&�&�t�x�x�w�v�s�7K�L�F��D�#�v�&�&r%c�8�dj|j�S)Nz
<Section: {}>)r<r�r's r$r(zSectionProxy.__repr__�s���%�%�d�j�j�1�1r%c��|jj|j|�st|��|jj	|j|�Sr)r�rAr�r�r�rSs  r$rTzSectionProxy.__getitem__�s?���|�|�&�&�t�z�z�3�7��3�-���|�|����
�
�C�0�0r%c��|jj||��|jj|j||�Sr�)r�r�rr�r;s   r$rWzSectionProxy.__setitem__�s6�����*�*�#�U�*�C��|�|����
�
�C��7�7r%c��|jj|j|�r&|jj|j|�st	|��yr)r�rAr�rOr�rSs  r$rYzSectionProxy.__delitem__�sA�����'�'��
�
�C�8����*�*�4�:�:�s�;��3�-��<r%c�N�|jj|j|�Sr)r�rAr�rSs  r$r[zSectionProxy.__contains__�s���|�|�&�&�t�z�z�3�7�7r%c�4�t|j��Sr)r��_optionsr's r$r]zSectionProxy.__len__�s���4�=�=�?�#�#r%c�>�|j�j�Sr)r�rar's r$razSectionProxy.__iter__�s���}�}��'�'�)�)r%c���|j|jjk7r%|jj|j�S|jj	�Sr)r�r�r�r�rbr's r$r�zSectionProxy._options�sD���:�:����5�5�5��<�<�'�'��
�
�3�3��<�<�(�(�*�*r%c��|jSr)r�r's r$r`zSectionProxy.parser�s���|�|�r%c��|jSr)r�r's r$rzSectionProxy.name�s���z�z�r%NF)r�r�r�c�d�	|s|jj}||j|f|||d�|��Sr*)r�r�r�)r"rEr�r�r�r�r�s       r$r�zSectionProxy.get�sD��	���L�L�$�$�E��T�Z�Z��2�S�t�&�2�*0�2�	2r%r)r*r+r,r!r(rTrWrYr[r]rar�r�r`rr�r.r%r$rr�sk��5�'�2�1�
8� �
8�$�*�+���������
2��D��
2r%rc�V�eZdZ	ejd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zy)	rz^get(?P<name>.+)$c�
�||_i|_t|j�D]]}|jj	|�}|rtt
|j|��s�@d|j|jd�<�_y)Nr)r��_data�dir�	GETTERCREr��callabler�r�)r"r`r�r�s    r$r!zConverterMapping.__init__se�������
��$�,�,�'�F����$�$�V�,�A��H�W�T�\�\�6�%B�C��*.�D�J�J�q�w�w�v��'�	(r%c� �|j|Sr)r�rSs  r$rTzConverterMapping.__getitem__s���z�z�#��r%c	���	d|z}|dk(rtd��||j|<tj|jj|��}||_	t|j||�|jj�D]0}tj|j|��}t|||��2y#t$r%tdj|t|����wxYw)Nr�zIncompatible key: {} (type: {})z)Incompatible key: cannot use "" as a name)r%r�)
r�r|r<r�r�r�r�r�r(�	converterr��valuesr�)r"rra�k�func�proxyr�s       r$rWzConverterMapping.__setitem__s���	8����A�
��:��H�I�I���
�
�3��� � ����!7�!7�e�D���������a��&��\�\�(�(�*�E��&�&�u�y�y��=�F��E�1�f�%�+���	8�� � &��s�D��I� 6�8�
8�	8�s�B=�=.C+c��	d|xsdz}|j|=tj|j
f|j
j
��D]}	t||��y#t$rt|��wxYw#t$rY�6wxYw)Nr�)	r�r�r�r_r`r�r��delattrr)r"rr��insts    r$rYzConverterMapping.__delitem__#s���	 �����%�A�
�J�J�s�O��O�O�T�\�\�O�T�\�\�5H�5H�5J�K�D�
���a� �L���	 ��3�-��	 ��"�
��
�s�	A$�A<�$A9�<	B�Bc�,�t|j�Sr)�iterr�r's r$razConverterMapping.__iter__1s���D�J�J��r%c�,�t|j�Sr)r�r�r's r$r]zConverterMapping.__len__4s���4�:�:��r%N)r*r+r,r�r�r�r!rTrWrYrar]r.r%r$rr�s8�����
�
�/�0�I�/��&� � �r%r)'�collections.abcr�collectionsrr�r�rr_rr�rhr��__all__r�r�rrr rrrrrr	rrr
r
r�objectr�rrrrrrrrr.r%r$�<module>r�s>��K�Z+�-��	��	�	�
��5���
�����

�I�
� �U� �.�E�.�46�5�6�6&�E�&�+��+�	9�&8�	9��1��
.�0�
.�>�5�>�-��-�"
���
�
� E+��E+�PG+�M�G+�T,5�-�,5�^w	 �n�w	 �t5�?�5�@C2�>�C2�L8�~�8r%

?>