Viewing File: /opt/imunify360/venv/lib/python3.11/site-packages/sentry_sdk/__pycache__/_functools.cpython-311.pyc

�

��i���^�dZddlmZddlmZerddlmZddlmZdZdZ	ee	fd�Z
ee	fd	�Zd
S)z�
A backport of Python 3 functools to Python 2/3. The only important change
we rely upon is that `update_wrapper` handles AttributeError gracefully.
�)�partial)�MYPY)�Any)�Callable)�
__module__�__name__�__qualname__�__doc__�__annotations__)�__dict__c���|D]4}	t||��}t|||���%#t$rY�1wxYw|D]4}t||���t||i�����5||_|S)a�Update a wrapper function to look like the wrapped function

    wrapper is the function to be updated
    wrapped is the original function
    assigned is a tuple naming the attributes assigned directly
    from the wrapped function to the wrapper function (defaults to
    functools.WRAPPER_ASSIGNMENTS)
    updated is a tuple naming the attributes of the wrapper that
    are updated with the corresponding attribute from the wrapped
    function (defaults to functools.WRAPPER_UPDATES)
    )�getattr�setattr�AttributeError�update�__wrapped__)�wrapper�wrapped�assigned�updated�attr�values      �L/opt/imunify360/venv/lib64/python3.11/site-packages/sentry_sdk/_functools.py�update_wrapperrs����*�*��	*��G�T�*�*�E�
�G�T�5�)�)�)�)���	�	�	��D�	�����B�B�������%�%�g�g�t�R�&@�&@�A�A�A�A�"�G���Ns�(�
5�5c�2�tt|||���S)a|Decorator factory to apply update_wrapper() to a wrapper function

    Returns a decorator that invokes update_wrapper() with the decorated
    function as the wrapper argument and the arguments to wraps() as the
    remaining arguments. Default arguments are as for update_wrapper().
    This is a convenience function to simplify applying partial() to
    update_wrapper().
    �rrr)rrrs   r�wrapsr8s���>�7�X�w�W�W�W�W�N)r
�	functoolsr�sentry_sdk._typesr�typingrr�WRAPPER_ASSIGNMENTS�WRAPPER_UPDATESrr�rr�<module>r%s�����
������"�"�"�"�"�"�� ��������������� �� 3�O�����>0��
X�
X�
X�
X�
X�
Xr
Back to Directory File Manager