
    osj                    h    d dl mZ d dlmZmZ d dlmZ  G d deee	f         Z
 G d de      ZdgZy)	    )annotations)ABCabstractmethod)Tokenc                  N    e Zd Zd
dZddZdddZddZddZddZddZ	dd	Z
y)Contextc                    t         N
ValueError)selfkeyvalues      P/root/.hermes/venv/lib/python3.12/site-packages/opentelemetry/context/context.py__setitem__zContext.__setitem__           c                    t         r
   r   )r   r   s     r   __delitem__zContext.__delitem__   r   r   Nc                    t         r
   r   )r   r   defaults      r   
setdefaultzContext.setdefault   r   r   c                    t         r
   r   )r   r   argss      r   popzContext.pop   r   r   c                    t         r
   r   r   s    r   popitemzContext.popitem   r   r   c                    t         r
   r   r   s    r   clearzContext.clear   r   r   c                    t         r
   r   )r   r   kwargss      r   updatezContext.update   r   r   c                    t         r
   r   )r   others     r   __ior__zContext.__ior__    r   r   )r   strr   objectreturnNone)r   r'   r)   r*   r
   )r   r'   r   r(   r)   r(   )r   r'   r   r(   r)   r(   )r)   ztuple[str, object])r)   r*   )r   r(   r"   r(   r)   r*   )r%   r(   r)   r   )__name__
__module____qualname__r   r   r   r   r   r    r#   r&    r   r   r   r   
   s*    r   r   c                  F    e Zd ZdZedd       Zedd       Zedd       Zy)	_RuntimeContextzThe RuntimeContext interface provides a wrapper for the different
    mechanisms that are used to propagate context in Python.
    Implementations can be made available via entry_points and
    selected through environment variables.
    c                     y)zSets the current `Context` object. Returns a
        token that can be used to reset to the previous `Context`.

        Args:
            context: The Context to set.
        Nr.   )r   contexts     r   attachz_RuntimeContext.attach+       r   c                     y)z%Returns the current `Context` object.Nr.   r   s    r   get_currentz_RuntimeContext.get_current4   r4   r   c                     y)zpResets Context to a previous value

        Args:
            token: A reference to a previous Context.
        Nr.   )r   tokens     r   detachz_RuntimeContext.detach8   r4   r   N)r2   r   r)   Token[Context])r)   r   )r8   r:   r)   r*   )r+   r,   r-   __doc__r   r3   r6   r9   r.   r   r   r0   r0   $   sC       4 4  r   r0   N)
__future__r   abcr   r   contextvarsr   dictr'   r(   r   r0   __all__r.   r   r   <module>rA      s:    # # d3; 4c : +r   