HEX
Server: LiteSpeed
System: Linux s787.bom1.mysecurecloudhost.com 4.18.0-477.13.1.lve.el8.x86_64 #1 SMP Thu Jun 1 16:40:47 EDT 2023 x86_64
User: mobilech (5348)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/setuptools/__pycache__/_static.cpython-310.pyc
o

;j��@s@ddlmZddlmZddlZddlmZGdd�d�Zde	d	e
d
e
ddfdd
�ZGdd�de
e�ZGdd�de
e�ZGdd�dee�ZdD]Zeeed�qGGdd�dee�ZdD]Zeeed�q[Gdd�dejje�Zed�Zdedefdd�Ze
ee
eeeeeiZdedefd d!�Zdedefd"d#�Ze�Ze�ZdS)$�)�wraps)�TypeVarN�)�SetuptoolsDeprecationWarningc@seZdZUdZdZeed<dS)�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__�rr�F/opt/saltstack/salt/lib/python3.10/site-packages/setuptools/_static.pyr	s
r�target�method�copying�returncsJt||d���durdSt��dtf��fdd��}d|_t|||�dS)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�selfcs4d|_tjdd��d�dd��|g|�Ri|��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)Zdue_date)rr�emit)r�args�kwargs�r�fnrr�_replacement's��z+_prevent_modification.<locals>._replacement�)�getattrrrr�setattr)rrrrrrr�_prevent_modificationsrc@�eZdZdS)�StrN�rr	r
rrrrr!=�r!c@r )�TupleNr"rrrrr$Ar#r$c@�eZdZdZdS)�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�rr	r
rrrrrr&E�r&)
�__delitem__�__iadd__�__setitem__�append�clear�extend�insert�remove�reverse�popz
`list(value)`c@r%)�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'rrrrr3lr(r3)r)�__ior__r+r-r2�popitem�
setdefault�updatez
`dict(value)`c@r%)�SpecifierSetz>Not exactly a built-in type but useful for ``requires-python``Nr'rrrrr8�r(r8�T�valuecCs|S)z
    >>> noop(42)
    42
    r�r:rrr�noop�sr<cCst�t|�t�|�S)zc
    >>> is_static(attempt_conversion("hello"))
    True
    >>> is_static(object())
    False
    )�_CONVERSIONS�get�typer<r;rrr�attempt_conversion�sr@cCst|t�o|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
    )�
isinstancerrr;rrr�	is_static�srB)�	functoolsr�typingrZpackaging.specifiersZ	packaging�warningsrrr?�strrr!�tupler$�listr&�_method�dictr3Z
specifiersr8r9r<r=r@�objectrrBZ
EMPTY_LISTZ
EMPTY_DICTrrrr�<module>s,"