
    g`                     l    d dl Z d dlmZmZ  G d de j                  eef         Z G d de      ZdgZ	y)    N)ABCabstractmethodc                        e Zd ZdededdfdZy)ContextkeyvaluereturnNc                     t         )N)
ValueError)selfr   r   s      R/var/www/openai/venv/lib/python3.12/site-packages/opentelemetry/context/context.py__setitem__zContext.__setitem__   s        )__name__
__module____qualname__strobjectr    r   r   r   r      s    s 6 d r   r   c                   Z    e Zd ZdZededefd       Zedefd       Zededdf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.
    contextr	   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   r   s     r   attachz_RuntimeContext.attach       r   c                      y)z%Returns the current `Context` object.Nr   )r   s    r   get_currentz_RuntimeContext.get_current(   r   r   tokenNc                      y)zpResets Context to a previous value

        Args:
            token: A reference to a previous Context.
        Nr   )r   r   s     r   detachz_RuntimeContext.detach,   r   r   )
r   r   r   __doc__r   r   r   r   r   r    r   r   r   r   r      sf     g &   4W 4 4 F t  r   r   )
typingabcr   r   Dictr   r   r   r   __all__r   r   r   <module>r&      s;     #fkk#v+& 
c : +r   