xjhddlmZddlmZmZddlmZGddeee fZ GddeZ dgZ y) ) annotations)ABCabstractmethod)TokencNeZdZd dZd dZd d dZddZddZddZddZ dd Z y)ContextctN ValueError)selfkeyvalues q/mnt/ssd/data/Dropbox/adrian/sandbox/mcp-query/venv/lib/python3.12/site-packages/opentelemetry/context/context.py __setitem__zContext.__setitem__ ctr r )r rs r __delitem__zContext.__delitem__rrNctr r )r rdefaults r setdefaultzContext.setdefaultrrctr r )r rargss rpopz Context.poprrctr r r s rpopitemzContext.popitemrrctr r rs rclearz Context.clearrrctr r )r rkwargss rupdatezContext.updaterrctr r )r others r__ior__zContext.__ior__ rr)rstrrobjectreturnNone)rr'r)r*r )rr'rr(r)r()rr'rr(r)r()r)ztuple[str, object])r)r*)rr(r"r(r)r*)r%r(r)r) __name__ __module__ __qualname__rrrrrr r#r&rrrr s*rrcFeZdZdZeddZeddZeddZy) _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. cy)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 rattachz_RuntimeContext.attach+rcy)z%Returns the current `Context` object.Nr.rs r get_currentz_RuntimeContext.get_current4r4rcy)zpResets Context to a previous value Args: token: A reference to a previous Context. Nr.)r tokens rdetachz_RuntimeContext.detach8r4rN)r2rr)Token[Context])r)r)r8r:r)r*)r+r,r-__doc__rr3r6r9r.rrr0r0$sC   44  rr0N) __future__rabcrr contextvarsrdictr'r(rr0__all__r.rrrAs:##d3;4 c : +r