HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //snap/certbot/4965/lib/python3.12/site-packages/setuptools/__pycache__/_static.cpython-312.pyc
�

9�h����ddlmZddlmZddlZddlmZGd�d�Zde	d	e
d
e
ddfd�ZGd
�de
e�ZGd�de
e�ZGd�dee�ZdD]Zeeed��Gd�dee�ZdD]Zeeed��Gd�dej(j*e�Zed�Zdedefd�Ze
ee
eeeeeiZdedefd�Zdedefd�Ze�Ze�Zy) �)�wraps)�TypeVarN�)�SetuptoolsDeprecationWarningc� �eZdZUdZdZeed<y)�Statica`
    Wrapper for built-in object types that are allow setuptools to identify
    static core metadata (in opposition to ``Dynamic``, as defined :pep:`643`).

    The trick is to mark values with :class:`Static` when they come from
    ``pyproject.toml`` or ``setup.cfg``, so if any plugin overwrite the value
    with a built-in, setuptools will be able to recognise the change.

    We inherit from built-in classes, so that we don't need to change the existing
    code base to deal with the new types.
    We also should strive for immutability objects to avoid changes after the
    initial parsing.
    F�	_mutated_N)�__name__�
__module__�__qualname__�__doc__r	�bool�__annotations__����/build/snapcraft-certbot-c9561b03ef7f16aa90eb6754ca5f17a1/parts/certbot/install/lib/python3.12/site-packages/setuptools/_static.pyrr	s����I�t�rr�target�method�copying�returnc����t||d����yt��dtf��fd��}d|_t	|||�y)a	
    Because setuptools is very flexible we cannot fully prevent
    plugins and user customizations from modifying static values that were
    parsed from config files.
    But we can attempt to block "in-place" mutations and identify when they
    were done.
    N�selfc�b��d|_tjdd��d�d���|g|��i|��S)NTz/Direct modification of value will be disallowedz�
            In an effort to implement PEP 643, direct/in-place changes of static values
            that come from configuration files are deprecated.
            If you need to modify this value, please first create a copy with z�
            and make sure conform to all relevant standards when overriding setuptools
            functionality (https://packaging.python.org/en/latest/specifications/).
            )i��
r)�due_date)r	r�emit)r�args�kwargsr�fns   ��r�_replacementz+_prevent_modification.<locals>._replacement'sS������$�)�)�=�O�PW�i�X
�
�$�
	
��$�(��(��(�(r�)�getattrrrr
�setattr)rrrr rs  ` @r�_prevent_modificationr$sN���
����	&�B�	�z��
�2�Y�)�6�)��)�"�L���F�F�L�)rc��eZdZy)�StrN�r
rrrrrr&r&=���rr&c��eZdZy)�TupleNr'rrrr*r*Ar(rr*c��eZdZdZy)�Lista�
    :meta private:
    >>> x = List([1, 2, 3])
    >>> is_static(x)
    True
    >>> x += [0]  # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
    SetuptoolsDeprecationWarning: Direct modification ...
    >>> is_static(x)  # no longer static after modification
    False
    >>> y = list(x)
    >>> y.clear()
    >>> y
    []
    >>> y == x
    False
    >>> is_static(List(y))
    True
    N�r
rrr
rrrr,r,Es��rr,)
�__delitem__�__iadd__�__setitem__�append�clear�extend�insert�remove�reverse�popz
`list(value)`c��eZdZdZy)�Dicta�
    :meta private:
    >>> x = Dict({'a': 1, 'b': 2})
    >>> is_static(x)
    True
    >>> x['c'] = 0  # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
    SetuptoolsDeprecationWarning: Direct modification ...
    >>> x._mutated_
    True
    >>> is_static(x)  # no longer static after modification
    False
    >>> y = dict(x)
    >>> y.popitem()
    ('b', 2)
    >>> y == x
    False
    >>> is_static(Dict(y))
    True
    Nr-rrrr9r9ls��rr9)r.�__ior__r0r2r7�popitem�
setdefault�updatez
`dict(value)`c��eZdZdZy)�SpecifierSetz>Not exactly a built-in type but useful for ``requires-python``Nr-rrrr?r?�s��Hrr?�T�valuec��|S)z
    >>> noop(42)
    42
    r�rAs r�nooprD�s	��
�Lrc�R�tjt|�t�|�S)zc
    >>> is_static(attempt_conversion("hello"))
    True
    >>> is_static(object())
    False
    )�_CONVERSIONS�get�typerDrCs r�attempt_conversionrI�s �����D��K��.�u�5�5rc�@�t|t�xr
|jS)z�
    >>> is_static(a := Dict({'a': 1}))
    True
    >>> is_static(dict(a))
    False
    >>> is_static(b := List([1, 2, 3]))
    True
    >>> is_static(list(b))
    False
    )�
isinstancerr	rCs r�	is_staticrL�s���e�V�$�<�U�_�_�)<�<r)�	functoolsr�typingr�packaging.specifiers�	packaging�warningsrrrH�strr$r&�tupler*�listr,�_method�dictr9�
specifiersr?r@rDrFrI�objectrrL�
EMPTY_LIST�
EMPTY_DICTrrr�<module>r[s;�����2���$*�$�*��*�c�*�d�*�D	�#�v�	�	�E�6�	��4���0�:�G��$���9�:��4���0	�
:�G��$���9�
:�I�9�'�'�4�4�f�I��C�L�����a���S�%���d�D�$�?��6�a�6�A�6�=�V�=��=��V�
�
�V�
r