MCPcopy Create free account
hub / github.com/hynek/structlog / unbind_threadlocal

Function unbind_threadlocal

src/structlog/threadlocal.py:313–323  ·  view source on GitHub ↗

Tries to remove bound *keys* from threadlocal logging context if present. .. versionadded:: 20.1.0 .. deprecated:: 22.1.0

(*keys: str)

Source from the content-addressed store, hash-verified

311
312
313def unbind_threadlocal(*keys: str) -> None:
314 """
315 Tries to remove bound *keys* from threadlocal logging context if present.
316
317 .. versionadded:: 20.1.0
318 .. deprecated:: 22.1.0
319 """
320 _deprecated()
321 context = _get_context()
322 for key in keys:
323 context.pop(key, None)
324
325
326@contextlib.contextmanager

Callers 2

bound_threadlocalFunction · 0.85

Calls 2

_deprecatedFunction · 0.85
_get_contextFunction · 0.85

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…