| Name | Type | Description |
|---|---|---|
since* | str | Release at which this API became deprecated. |
message | str | Default: ''Override the default deprecation message. See upstream
|
name | str | Default: ''Name of the deprecated object. |
alternative | str | Default: '' |
alternative_import | str | Default: '' |
pending | bool | Default: False |
obj_type | str | Default: '' |
addendum | str | Default: '' |
removal | str | Default: '' |
package | str | Default: '' |
stacklevel | int | Default: 2 |
Emit a deprecation warning with caller-controlled stack attribution.
langchain_core.warn_deprecated formats a standard message but hardcodes
stacklevel=4 in its internal warnings.warn call. That value targets a
decorator-wrapped frame layout; when called directly from a deprecated
method's body the warning is attributed one frame too high (above the
user's call site). This wrapper captures the formatted upstream warning
and re-emits it with an explicit stacklevel, so the warning points at
the user's call site.
Alternative API the user may use instead.
Alternative import path the user may use instead.
If True, uses a PendingDeprecationWarning instead of a
DeprecationWarning. Cannot be combined with removal.
Object type label (e.g., "function", "class").
Additional text appended to the final message.
Expected removal version. Cannot be combined with pending.
Package name attribution for the deprecation message.
Frames above this call to attribute the warning to,
using the same convention as warnings.warn (1 = this call,
2 = the caller of the method body that invoked us, etc.).