HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.60.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 5 05:00:59 EST 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //var/opt/nydus/ops/mysql/opentelemetry/context/__pycache__/contextvars_context.cpython-39.pyc
a

�,�h��@s6ddlmZddlmZmZGdd�de�ZdgZdS)�)�
ContextVar)�Context�_RuntimeContextc@sPeZdZdZdZdd�dd�Zeed�dd	�Zed�d
d�Z	edd�d
d�Z
dS)�ContextVarsRuntimeContextz�An implementation of the RuntimeContext interface which wraps ContextVar under
    the hood. This is the preferred implementation for usage with Python 3.5+
    Zcurrent_contextN)�returncCst|jt�d�|_dS)N)�default)r�_CONTEXT_KEYr�_current_context��self�r�b/opt/nydus/tmp/pip-target-wkfpz8uv/lib64/python/mysql/opentelemetry/context/contextvars_context.py�__init__sz"ContextVarsRuntimeContext.__init__)�contextrcCs|j�|�S)z�Sets the current `Context` object. Returns a
        token that can be used to reset to the previous `Context`.

        Args:
            context: The Context to set.
        )r	�set)rrrrr
�attachsz ContextVarsRuntimeContext.attachcCs
|j��S)z%Returns the current `Context` object.)r	�getr
rrr
�get_current&sz%ContextVarsRuntimeContext.get_current)�tokenrcCs|j�|�dS)zpResets Context to a previous value

        Args:
            token: A reference to a previous Context.
        N)r	�reset)rrrrr
�detach*sz ContextVarsRuntimeContext.detach)�__name__�
__module__�__qualname__�__doc__rrr�objectrrrrrrr
rs	rN)�contextvarsrZ#mysql.opentelemetry.context.contextrrr�__all__rrrr
�<module>s