ok

Mini Shell

Direktori : /opt/cloudlinux/venv/lib/python3.11/site-packages/raven/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/raven/__pycache__/context.cpython-311.pyc

�

�܋f����dZddlmZ	ddlmZmZn#e$rddlmZmZYnwxYwddlm	Z	ddl
mZ
ddlm
Z
	ddlmZn#e$r	ddlmZYnwxYwe	��Zd�ZGd	�d
e	ee��ZddlZdS)z�
raven.context
~~~~~~~~~~~~~

:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
�)�absolute_import)�Mapping�Iterable)�local)�ref)�	iteritems)�	get_identc�Z�	ttj��S#t$rgcYSwxYw)z7Returns all the active contexts for the current thread.)�list�_active_contexts�contexts�AttributeError���D/opt/cloudlinux/venv/lib64/python3.11/site-packages/raven/context.py�get_active_contextsrs=����$�-�.�.�.�������	�	�	����s��*�*c��eZdZdZdd�Zed���Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zdd�Zd�Zdd�Zd�Zd�Zdd�ZdS)�Contexta'
    Stores context until cleared.

    >>> def view_handler(view_func, *args, **kwargs):
    >>>     context = Context()
    >>>     context.merge(tags={'key': 'value'})
    >>>     try:
    >>>         return view_func(*args, **kwargs)
    >>>     finally:
    >>>         context.clear()
    Nc���tj�|dup|j��}|�t	|��}||_|���i|_t��|_	||_dS�N)
�raven�breadcrumbs�make_buffer�enable_breadcrumbs�weakref�_client�activate�data�set�exceptions_to_skip)�self�clientrs   r�__init__zContext.__init__2sq���'�3�3��d�N�7�f�7�9�9�����V�_�_�F����
	
�
�
������	�"%�%�%���&����rc�<�|j�dS|���Sr)r�r!s rr"zContext.clientAs���<���4��|�|�~�~�rc� �t|��Sr)�idr%s r�__hash__zContext.__hash__Gs
���$�x�x�rc�
�||uSrr�r!�others  r�__eq__zContext.__eq__Js���u�}�rc�.�|�|��Sr)r,r*s  r�__ne__zContext.__ne__Ms���;�;�u�%�%�%�%rc��|j|Sr�r)r!�keys  r�__getitem__zContext.__getitem__Ps���y��~�rc�*�t|j��Sr)�iterrr%s r�__iter__zContext.__iter__Ss���D�I���rc�*�t|j��Sr)�lenrr%s r�__len__zContext.__len__Vs���4�9�~�~�rc�B�dt|��j�d|j�d�S)N�<z: �>)�type�__name__rr%s r�__repr__zContext.__repr__Ys$���!�$�Z�Z�0�0�0�$�)�)�)�<�<rc�.�|���|Sr)rr%s r�	__enter__zContext.__enter__\s���
�
�����rc�.�|���dSr)�
deactivate)r!�exc_type�	exc_value�tbs    r�__exit__zContext.__exit__`s���������rFc��|rt��|_tj�dt�����|��dS)Nr
)�get_thread_ident�_sticky_threadr�__dict__�
setdefaultr�add)r!�stickys  rrzContext.activatecsI���	5�"2�"4�"4�D���!�,�,�Z����?�?�C�C�D�I�I�I�I�Irc�h�	tj�|��dS#t$rYdSwxYwr)rr
�discardrr%s rrBzContext.deactivatehsF��	��%�-�-�d�3�3�3�3�3���	�	�	��D�D�	���s�#�
1�1Tc���|r|���|j}t|��D]E\}}|dvr7|�|i��t|��D]\}}||||<��@|||<�FdS)N)�tags�extra)rrrrK)r!rr�dr1�value�t_key�t_values        r�mergez
Context.mergens����	��M�M�O�O�O��I��#�D�/�/�	�	�J�C���'�'�'����S�"�%�%�%�&/��&6�&6�,�,�N�E�7�$+�A�c�F�5�M�M�,���#���
	�	rc��||_dSrr0)r!rs  rrzContext.setzs
����	�	�	rc��|jSrr0r%s r�getzContext.get}s
���y�rc���i|_|j���|j���|� |j}|�t��|jk}|r|���dSdSr)rr �clearrr"rH�main_thread_idrB)r!rBr"s   rr\z
Context.clear�s�����	���%�%�'�'�'����� � � �
���[�F��!�-�/�/�6�3H�H�
��	��O�O������	�	rr)F)T)r=�
__module__�__qualname__�__doc__r#�propertyr"r(r,r.r2r5r8r>r@rFrrBrWrrZr\rrrrr%sA������
�
�
'�
'�
'�
'�����X��
������&�&�&����������=�=�=�������J�J�J�J�
���
�
�
�
������������rrN)r`�
__future__r�collections.abcrr�ImportError�collections�	threadingrrr�raven.utils.compatr�threadr	rH�_threadrrr�raven.breadcrumbsrrrr�<module>rksi����'�&�&�&�&�&�.�1�1�1�1�1�1�1�1�1���.�.�.�-�-�-�-�-�-�-�-�-�-�.����������"�"�"�"�"�"�(�(�(�(�(�(�6�4�4�4�4�4�4�4���6�6�6�5�5�5�5�5�5�5�5�6�����5�7�7�����i�i�i�i�i�e�W�h�i�i�i�X�����s��
#�#�A�A�
A

Zerion Mini Shell 1.0