reset_deprecation_dedupe(
*targets: object = (),
) -> None| Name | Type | Description |
|---|---|---|
*targets | object | Default: ()Decorated callables (or properties wrapping them) to reset. |
Reset the @deprecated decorator's dedupe flag for testing.
The langchain_core @deprecated decorator emits each warning at most once
per process via a closure-bound warned flag. Tests that assert per-call
emission must reset that flag between cases — otherwise the assertions
become reorder-sensitive (notably under pytest -n auto).
Accepts decorated functions, methods, and property objects (in which
case the fget closure is reset). Targets without the expected warned
freevar are silently skipped, so passing non-decorated callables is safe.