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_apideprecation
    Module●Since v0.1

    deprecation

    Helper functions for deprecating parts of the LangChain API.

    This module was adapted from matplotlib's _api/deprecation.py module.

    Warning

    This module is for internal use only. Do not use it in your own code. We may change the API at any time with no warning.

    Attributes

    attribute
    T

    Functions

    function
    is_caller_internal

    Return whether the caller at depth of this function is internal.

    function
    deprecated

    Decorator to mark a function, a class, or a property as deprecated.

    When deprecating a classmethod, a staticmethod, or a property, the @deprecated decorator should go under @classmethod and @staticmethod (i.e., deprecated should directly decorate the underlying callable), but over @property.

    When deprecating a class C intended to be used as a base class in a multiple inheritance hierarchy, C must define an __init__ method (if C instead inherited its __init__ from its own base class, then @deprecated would mess up __init__ inheritance when installing its own (deprecation-emitting) C.__init__).

    Parameters are the same as for warn_deprecated, except that obj_type defaults to 'class' if decorating a class, 'attribute' if decorating a property, and 'function' otherwise.

    function
    suppress_langchain_deprecation_warning

    Context manager to suppress LangChainDeprecationWarning.

    function
    warn_deprecated

    Display a standardized deprecation.

    function
    surface_langchain_deprecation_warnings

    Unmute LangChain deprecation warnings.

    function
    rename_parameter

    Decorator indicating that parameter old of func is renamed to new.

    The actual implementation of func should use new, not old. If old is passed to func, a DeprecationWarning is emitted, and its value is used, even if new is also passed by keyword.

    Classes

    class
    LangChainDeprecationWarning

    A class for issuing deprecation warnings for LangChain users.

    class
    LangChainPendingDeprecationWarning

    A class for issuing deprecation warnings for LangChain users.

    View source on GitHub