Skip to content

docs: fix outdated 'langchain import hub' to use langchain_classic - #5791

Open
SpiliosDmk (SpiliosDimakopoulos) wants to merge 1 commit into
langchain-ai:mainfrom
SpiliosDimakopoulos:fix/langchain-hub-import-classic
Open

docs: fix outdated 'langchain import hub' to use langchain_classic#5791
SpiliosDmk (SpiliosDimakopoulos) wants to merge 1 commit into
langchain-ai:mainfrom
SpiliosDimakopoulos:fix/langchain-hub-import-classic

Conversation

@SpiliosDimakopoulos

Copy link
Copy Markdown
Contributor

What

Fixes an outdated import in two integration docs that raises
ImportError: cannot import name 'hub' from 'langchain' under
LangChain 1.0+.

  • src/oss/python/integrations/retrievers/egnyte.mdx
  • src/oss/python/integrations/tools/ibm_watsonx_sql.mdx

Why

Per the LangChain v1 migration guide (src/oss/python/migrate/langchain-v1.mdx),
the hub module moved from the langchain package to langchain-classic
in v1. These two pages still show:

from langchain import hub

which fails on LangChain 1.0+. Changed to:

from langchain_classic import hub

This follows the same pattern already applied to retriever imports in
PR #1196 (issue #1195), which fixed the same class of outdated import
for a different module.

Type of change

  • Documentation fix (broken code example)

2-line, docs-only change with no functional impact outside the code samples.

Per the LangChain v1 migration guide, the hub module moved from
the langchain package to langchain-classic. Two integration docs
still show the old import, which raises
ImportError: cannot import name 'hub' from 'langchain'
under LangChain 1.0+.

Affected files:
- src/oss/python/integrations/retrievers/egnyte.mdx
- src/oss/python/integrations/tools/ibm_watsonx_sql.mdx
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for opening a docs PR, SpiliosDmk (@SpiliosDimakopoulos)! When it's ready for review, please add the relevant reviewers:

  • @mdrxy (Python integrations)

@github-actions github-actions Bot added integration For docs updates for LangChain integrations langchain For docs changes to LangChain oss python For content related to the Python version of LangChain projects external User is not a member of langchain-ai labels Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external User is not a member of langchain-ai integration For docs updates for LangChain integrations langchain For docs changes to LangChain oss python For content related to the Python version of LangChain projects

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant