langchain - ✅(Solved) Fix langchain-tests needs a new release now that langchain-core 1.3.2 has been released [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
langchain-ai/langchain#37047Fetched 2026-04-29 06:11:35
View on GitHub
Comments
1
Participants
2
Timeline
9
Reactions
0
Timeline (top)
labeled ×3closed ×1commented ×1cross-referenced ×1

Using langchain-tests 1.1.6 against the test suite of langchain-core 1.3.2 results in a ModuleNotFoundError because langchain-tests does not include the new langchain_tests.utils.stream_lifecycle module.

Error Message

[ 11s] ==================================== ERRORS ==================================== [ 11s] ___ ERROR collecting tests/unit_tests/language_models/test_compat_bridge.py ____ [ 11s] ImportError while importing test module '/home/abuild/rpmbuild/BUILD/python-langchain-core-test-1.3.2-build/langchain_core-1.3.2/tests/unit_tests/language_models/test_compat_bridge.py'. [ 11s] Hint: make sure your test modules/packages have valid Python names. [ 11s] Traceback: [ 11s] /usr/lib64/python3.11/importlib/init.py:126: in import_module [ 11s] return _bootstrap._gcd_import(name[level:], package, level) [ 11s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [ 11s] tests/unit_tests/language_models/test_compat_bridge.py:6: in <module> [ 11s] from langchain_tests.utils.stream_lifecycle import assert_valid_event_stream [ 11s] E ModuleNotFoundError: No module named 'langchain_tests.utils.stream_lifecycle'

Root Cause

Using langchain-tests 1.1.6 against the test suite of langchain-core 1.3.2 results in a ModuleNotFoundError because langchain-tests does not include the new langchain_tests.utils.stream_lifecycle module.

Fix Action

Fix / Workaround

  • This is a bug, not a usage question.
  • I added a clear and descriptive title that summarizes this issue.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangChain rather than my code.
  • The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
  • This is not related to the langchain-community package.
  • I posted a self-contained, minimal, reproducible example. A maintainer can copy it and run it AS IS.

Other Dependencies

httpx: 0.28.1 jsonpatch: 1.33 numpy: 2.4.3 orjson: 3.11.8 packaging: 26.0 pydantic: 2.13.1 pytest: 9.0.2 pytest-asyncio: 1.3.0 pytest-benchmark: 5.2.3 pytest-codspeed: 4.3.0 pytest-recording: 0.13.4 pytest-socket: 0.7.0 pyyaml: 6.0.3 requests: 2.33.1 requests-toolbelt: 1.0.0 rich: 14.3.3 syrupy: 5.0.0 tenacity: 9.1.2 typing-extensions: 4.15.0 uuid-utils: 0.14.1 vcrpy: 8.1.1 wrapt: 2.1.2 xxhash: 3.6.0 zstandard: 0.25.0

PR fix notes

PR #37067: release(standard-tests): 1.1.7

Description (problem / solution / changelog)

Resolves https://github.com/langchain-ai/langchain/issues/37047

Changed files

  • libs/standard-tests/pyproject.toml (modified, +1/-1)
  • libs/standard-tests/uv.lock (modified, +2/-2)

Code Example

[   11s] ==================================== ERRORS ====================================
[   11s] ___ ERROR collecting tests/unit_tests/language_models/test_compat_bridge.py ____
[   11s] ImportError while importing test module '/home/abuild/rpmbuild/BUILD/python-langchain-core-test-1.3.2-build/langchain_core-1.3.2/tests/unit_tests/language_models/test_compat_bridge.py'.
[   11s] Hint: make sure your test modules/packages have valid Python names.
[   11s] Traceback:
[   11s] /usr/lib64/python3.11/importlib/__init__.py:126: in import_module
[   11s]     return _bootstrap._gcd_import(name[level:], package, level)
[   11s]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[   11s] tests/unit_tests/language_models/test_compat_bridge.py:6: in <module>
[   11s]     from langchain_tests.utils.stream_lifecycle import assert_valid_event_stream
[   11s] E   ModuleNotFoundError: No module named 'langchain_tests.utils.stream_lifecycle'

---
RAW_BUFFERClick to expand / collapse

Submission checklist

  • This is a bug, not a usage question.
  • I added a clear and descriptive title that summarizes this issue.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangChain rather than my code.
  • The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
  • This is not related to the langchain-community package.
  • I posted a self-contained, minimal, reproducible example. A maintainer can copy it and run it AS IS.

Package (Required)

  • langchain
  • langchain-openai
  • langchain-anthropic
  • langchain-classic
  • langchain-core
  • langchain-model-profiles
  • langchain-tests
  • langchain-text-splitters
  • langchain-chroma
  • langchain-deepseek
  • langchain-exa
  • langchain-fireworks
  • langchain-groq
  • langchain-huggingface
  • langchain-mistralai
  • langchain-nomic
  • langchain-ollama
  • langchain-openrouter
  • langchain-perplexity
  • langchain-qdrant
  • langchain-xai
  • Other / not sure / general

Related Issues / PRs

No response

Reproduction Steps / Example Code (Python)

[   11s] ==================================== ERRORS ====================================
[   11s] ___ ERROR collecting tests/unit_tests/language_models/test_compat_bridge.py ____
[   11s] ImportError while importing test module '/home/abuild/rpmbuild/BUILD/python-langchain-core-test-1.3.2-build/langchain_core-1.3.2/tests/unit_tests/language_models/test_compat_bridge.py'.
[   11s] Hint: make sure your test modules/packages have valid Python names.
[   11s] Traceback:
[   11s] /usr/lib64/python3.11/importlib/__init__.py:126: in import_module
[   11s]     return _bootstrap._gcd_import(name[level:], package, level)
[   11s]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[   11s] tests/unit_tests/language_models/test_compat_bridge.py:6: in <module>
[   11s]     from langchain_tests.utils.stream_lifecycle import assert_valid_event_stream
[   11s] E   ModuleNotFoundError: No module named 'langchain_tests.utils.stream_lifecycle'

Error Message and Stack Trace (if applicable)

Description

Using langchain-tests 1.1.6 against the test suite of langchain-core 1.3.2 results in a ModuleNotFoundError because langchain-tests does not include the new langchain_tests.utils.stream_lifecycle module.

System Info

System Information

OS: Linux OS Version: #1 SMP PREEMPT_DYNAMIC Sun Apr 12 17:36:53 UTC 2026 (c7234f7) Python Version: 3.13.13 (main, Apr 08 2026, 11:09:04) [GCC]

Package Information

langchain_core: 1.3.2 langsmith: 0.7.35 langchain_protocol: 0.0.12 langchain_tests: 1.1.6

Optional packages not installed

deepagents deepagents-cli

Other Dependencies

httpx: 0.28.1 jsonpatch: 1.33 numpy: 2.4.3 orjson: 3.11.8 packaging: 26.0 pydantic: 2.13.1 pytest: 9.0.2 pytest-asyncio: 1.3.0 pytest-benchmark: 5.2.3 pytest-codspeed: 4.3.0 pytest-recording: 0.13.4 pytest-socket: 0.7.0 pyyaml: 6.0.3 requests: 2.33.1 requests-toolbelt: 1.0.0 rich: 14.3.3 syrupy: 5.0.0 tenacity: 9.1.2 typing-extensions: 4.15.0 uuid-utils: 0.14.1 vcrpy: 8.1.1 wrapt: 2.1.2 xxhash: 3.6.0 zstandard: 0.25.0

extent analysis

TL;DR

The most likely fix is to upgrade the langchain-tests package to a version that includes the langchain_tests.utils.stream_lifecycle module.

Guidance

  • Verify that the langchain_tests.utils.stream_lifecycle module is not available in the current version of langchain-tests (1.1.6) by checking the package documentation or source code.
  • Check the langchain-core documentation to see if there are any specific version requirements or recommendations for langchain-tests.
  • Consider upgrading langchain-tests to the latest version available, or to a version that is known to be compatible with langchain-core 1.3.2.
  • If upgrading langchain-tests is not possible, consider modifying the test code to remove the dependency on the missing module.

Notes

The issue seems to be caused by a version mismatch between langchain-core and langchain-tests. Upgrading langchain-tests to a compatible version should resolve the issue.

Recommendation

Apply workaround: Upgrade langchain-tests to a version that includes the langchain_tests.utils.stream_lifecycle module, as this is the most likely cause of the error.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

langchain - ✅(Solved) Fix langchain-tests needs a new release now that langchain-core 1.3.2 has been released [1 pull requests, 1 comments, 2 participants]