
    Ki%                    L    S SK Jr  S SKJrJr  S SKJrJr   " S S\5      rS/r	g)    )annotations)
ContextVarToken)Context_RuntimeContextc                  D    \ rS rSrSrSrS
S jrSS jrSS jrSS jr	Sr
g	)ContextVarsRuntimeContext   zAn implementation of the RuntimeContext interface which wraps ContextVar under
the hood. This is the preferred implementation for usage with Python 3.5+
current_contextc                F    [        U R                  [        5       S9U l        g )N)default)r   _CONTEXT_KEYr   _current_contextselfs    k/var/www/html/dynamic-report/venv/lib/python3.13/site-packages/opentelemetry/context/contextvars_context.py__init__"ContextVarsRuntimeContext.__init__   s     *wy!
    c                8    U R                   R                  U5      $ )zSets 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)r   contexts     r   attach ContextVarsRuntimeContext.attach"   s     $$((11r   c                6    U R                   R                  5       $ )z%Returns the current `Context` object.)r   getr   s    r   get_current%ContextVarsRuntimeContext.get_current+   s    $$((**r   c                :    U R                   R                  U5        g)zXResets Context to a previous value

Args:
    token: A reference to a previous Context.
N)r   reset)r   tokens     r   detach ContextVarsRuntimeContext.detach/   s     	##E*r   )r   N)returnNone)r   r   r$   Token[Context])r$   r   )r!   r&   r$   r%   )__name__
__module____qualname____firstlineno____doc__r   r   r   r   r"   __static_attributes__ r   r   r	   r	      s"     %L

2++r   r	   N)

__future__r   contextvarsr   r   opentelemetry.context.contextr   r   r	   __all__r-   r   r   <module>r2      s'    # ) B+ +D '
'r   