mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-23 21:21:20 +08:00
test: skip litellm/toolguard component imports when absent (Python 3.14)
The direct-import sweep (test_all_lfx_component_modules_directly_importable) flags any import error not in its expected-missing allow-list as a hard failure. litellm and toolguard are gated to python_version<'3.14' in pyproject, so on a clean 3.14 install they are absent and 6 modules fail: the 3 crewai components (`from crewai import Agent` -> litellm) and the 3 models_and_agents/policies components (import toolguard directly). Add litellm and toolguard to the allow-list alongside the existing altk/langchain_ibm/ibm_watsonx_ai gated entries so these import failures are classified as skipped rather than failed on 3.14. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -410,6 +410,12 @@ class TestDirectModuleImports:
|
||||
"altk",
|
||||
"langchain_ibm",
|
||||
"ibm_watsonx_ai",
|
||||
# litellm has no 3.14-compatible release, so it is gated to
|
||||
# python_version<'3.14'. Its absence surfaces transitively
|
||||
# via crewai (``from crewai import Agent`` -> litellm) and
|
||||
# via toolguard (the policies components import it directly).
|
||||
"litellm",
|
||||
"toolguard",
|
||||
]
|
||||
):
|
||||
return ("skipped", modname, "missing optional dependency")
|
||||
|
||||
Reference in New Issue
Block a user