
    Xj                    |    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dS )	    )annotations)ABCabstractmethod)Tokenc                      e Zd Zd	dZdS )
ContextkeystrvalueobjectreturnNonec                    t           )N)
ValueError)selfr	   r   s      Z/var/www/FlaskApp/flask-venv/lib/python3.11/site-packages/opentelemetry/context/context.py__setitem__zContext.__setitem__   s        N)r	   r
   r   r   r   r   )__name__
__module____qualname__r    r   r   r   r   
   s(             r   r   c                  Z    e Zd ZdZedd            Zedd            Zedd
            ZdS )_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   r   Token[Context]c                    dS )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                    dS )z%Returns the current `Context` object.Nr   )r   s    r   get_currentz_RuntimeContext.get_current   r   r   tokenr   c                    dS )zpResets Context to a previous value

        Args:
            token: A reference to a previous Context.
        Nr   )r   r"   s     r   detachz_RuntimeContext.detach#   r   r   N)r   r   r   r   )r   r   )r"   r   r   r   )r   r   r   __doc__r   r   r!   r$   r   r   r   r   r      s~             ^ 4 4 4 ^4    ^  r   r   N)
__future__r   abcr   r   contextvarsr   dictr
   r   r   r   __all__r   r   r   <module>r+      s    # " " " " " # # # # # # # #          d3;   
    c   : +r   