LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
    • Overview
    • Caches
    • Callbacks
    • Documents
    • Document loaders
    • Embeddings
    • Exceptions
    • Language models
    • Serialization
    • Output parsers
    • Prompts
    • Rate limiters
    • Retrievers
    • Runnables
    • Utilities
    • Vector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    OverviewCachesCallbacksDocumentsDocument loadersEmbeddingsExceptionsLanguage modelsSerializationOutput parsersPromptsRate limitersRetrieversRunnablesUtilitiesVector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    Language
    Theme
    Pythonlangchain-core_apideprecationwarn_deprecated
    Function●Since v0.1

    warn_deprecated

    Display a standardized deprecation.

    Copy
    warn_deprecated(
      since: str,
      *,
      message: str = '',
      name: str = '',
      alternative: str = '',
      alternative_import: str = '',
      pending: bool = False,
      obj_type: str = '',
      addendum: str = '',
      removal: str = '',
      package: str = ''
    ) -> None

    Parameters

    NameTypeDescription
    since*str

    The release at which this API became deprecated.

    messagestr
    Default:''

    Override the default deprecation message.

    The %(since)s, %(name)s, %(alternative)s, %(obj_type)s, %(addendum)s, and %(removal)s format specifiers will be replaced by the values of the respective arguments passed to this function.

    namestr
    Default:''

    The name of the deprecated object.

    alternativestr
    Default:''

    An alternative API that the user may use in place of the deprecated API.

    The deprecation warning will tell the user about this alternative if provided.

    alternative_importstr
    Default:''

    An alternative import that the user may use instead.

    pendingbool
    Default:False

    If True, uses a PendingDeprecationWarning instead of a DeprecationWarning.

    Cannot be used together with removal.

    obj_typestr
    Default:''

    The object type being deprecated.

    addendumstr
    Default:''

    Additional text appended directly to the final message.

    removalstr
    Default:''

    The expected removal version.

    With the default (an empty string), a removal version is automatically computed from since. Set to other Falsy values to not schedule a removal date.

    Cannot be used together with pending.

    packagestr
    Default:''

    The package of the deprecated object.

    View source on GitHub