Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3366,7 +3366,7 @@
"filename": "src/backend/tests/unit/base/models/test_model_utils.py",
"hashed_secret": "c053ecf9ed41df0311b9df13cc6c3b6078d2d3c2",
"is_verified": false,
"line_number": 97
"line_number": 94
}
],
"src/backend/tests/unit/components/bundles/agentics/test_llm_factory.py": [
Expand Down Expand Up @@ -9287,5 +9287,5 @@
}
]
},
"generated_at": "2026-06-03T21:32:15Z"
"generated_at": "2026-06-04T22:07:43Z"
}
4 changes: 2 additions & 2 deletions src/backend/base/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ dependencies = [
'elevenlabs==1.58.1; python_version == "3.12"',
'elevenlabs>=1.52.0,<2.0.0; python_version != "3.12"',
"scipy>=1.15.2,<2.0.0",
"ibm-watsonx-ai>=1.3.1,<2.0.0; python_version < '3.14'",
"langchain-ibm~=1.0.2; python_version < '3.14'",
"ibm-watsonx-ai>=1.3.1,<2.0.0",
"langchain-ibm~=1.1.0",
Comment on lines +99 to +100

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Check for stale 3.14-gating assumptions in tests/docs.
rg -n -C2 "python_version<'3\\.14'|Python 3\\.14\\+|not available on Python 3\\.14|upstream pins exclude 3\\.14|pytest\\.skip\\(" \
  src/backend/tests/unit/base/models/test_model_utils.py \
  src/bundles/ibm/tests/test_watsonx_embeddings.py \
  src/bundles/ibm/README.md

# Confirm base and bundle Watsonx constraints are still aligned.
rg -n -C1 "\"ibm-watsonx-ai|langchain-ibm" \
  src/backend/base/pyproject.toml \
  src/bundles/ibm/pyproject.toml

Repository: langflow-ai/langflow

Length of output: 2720


Fix lingering Python 3.14 “upstream gated” skips in IBM Watsonx tests

  • src/backend/tests/unit/base/models/test_model_utils.py:12-17 and src/bundles/ibm/tests/test_watsonx_embeddings.py:11-14 still pytest.skip(..., allow_module_level=True) on ImportError with comments referencing python_version<'3.14' gating; this can mask real 3.14 importability regressions.
  • Update these tests to assert the newly supported 3.14 import path (and remove/adjust the outdated gating rationale/skip logic) in line with the dependency pins in src/backend/base/pyproject.toml:99-100.
  • Ensure src/bundles/ibm/README.md:29-38 also no longer documents the old <3.14 gating behavior.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/backend/base/pyproject.toml` around lines 99 - 100, Tests currently skip
on ImportError with legacy python_version<'3.14' gating which can hide real
import regressions; update the two test modules (test_model_utils.py and
test_watsonx_embeddings.py) to remove the pytest.skip(...,
allow_module_level=True) import-based skip and instead directly import/assert
the IBM Watsonx client/package import path that should now succeed per the
pinned deps ("ibm-watsonx-ai" and "langchain-ibm"); remove or update the inline
comments referencing "<3.14" gating and replace with a simple import/assert
check (or an explicit failure message) so failures surface, and similarly edit
the IBM bundle README section describing `<3.14` gating to reflect the new
supported 3.14 importability.

"trustcall>=0.0.38,<1.0.0",
"langchain-chroma~=0.2.6",
"jaraco-context>=6.1.0",
Expand Down
15 changes: 6 additions & 9 deletions src/backend/tests/unit/base/models/test_model_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@
is set on a different attribute than the one ``next()`` happens to find first.
"""

import pytest

try:
from langchain_ibm import ChatWatsonx
except (ImportError, TypeError):
# langchain-ibm is gated to python_version<'3.14' because ibm-watsonx-ai
# has not yet adapted to Python 3.14's StrEnum initialization changes.
pytest.skip("langchain-ibm not available on Python 3.14+", allow_module_level=True)

# langchain-ibm / ibm-watsonx-ai are core langflow-base deps importable on every
# supported Python version (3.10-3.14), so import directly: a hard failure here
# surfaces a real import regression instead of silently skipping the suite.
# (ibm-watsonx-ai 1.5.13 fixed the Python 3.14 StrEnum initialization
# incompatibility that previously forced the upstream <3.14 cap.)
from langchain_ibm import ChatWatsonx
from langchain_openai import AzureChatOpenAI, ChatOpenAI
from lfx.base.models.model_metadata import create_model_metadata
from lfx.base.models.model_utils import fetch_live_watsonx_models, get_model_name
Expand Down
7 changes: 4 additions & 3 deletions src/bundles/ibm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ components appear in the palette under the `ibm` bundle group.
> succeeds on that architecture, but `DB2VectorStoreComponent` will
> fail to build the vector store at runtime there. Use an x86_64 image
> or install `ibm-db` from source if you need Db2 on aarch64.
> * `ibm-watsonx-ai` and `langchain-ibm` upstream pin `<3.14`. The marker
> gates both deps the same way, so the watsonx components are only
> importable on Python 3.13 and below until upstream lifts the cap.
> * `ibm-watsonx-ai` (>=1.5.13) and `langchain-ibm` (>=1.1.0) added Python 3.14
> support upstream, so the watsonx components are importable on every
> supported Python version (3.10-3.14). Earlier releases capped at `<3.14`;
> the bundle pins were bumped to pick up the 3.14-capable builds.

## Develop

Expand Down
12 changes: 8 additions & 4 deletions src/bundles/ibm/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,19 @@ keywords = ["langflow", "lfx", "extension", "bundle", "ibm", "db2", "watsonx", "
# wheel does not ship for linux/aarch64, so the dep would otherwise
# break ``pip install`` on that arch.
# * ``ibm-watsonx-ai`` and ``langchain-ibm`` power ``WatsonxAIComponent``
# and ``WatsonxEmbeddingsComponent``. Both upstreams pin ``<3.14``, so
# the marker stays in lockstep with the langflow-base dep block.
# and ``WatsonxEmbeddingsComponent``. Both upstreams added Python 3.14
# support (``ibm-watsonx-ai`` 1.5.13, ``langchain-ibm`` 1.1.0), so the
# former ``python_version < '3.14'`` markers are lifted. ``ibm-watsonx-ai``
# raised its floor to ``>=3.11`` on the 3.14-capable build, so the universal
# resolver forks: a 3.14 build on the 3.14 Docker image, an older
# 3.10-compatible build elsewhere. Kept in lockstep with langflow-base.
# * ``langchain-community`` provides the helpers DB2VS leans on.
dependencies = [
"lfx>=0.5.0",
"langchain-community>=0.4.1,<1.0.0",
"ibm-db>=3.2.9,<4.0.0; sys_platform != 'linux' or platform_machine != 'aarch64'",
"ibm-watsonx-ai>=1.3.1,<2.0.0; python_version < '3.14'",
"langchain-ibm~=1.0.2; python_version < '3.14'",
"ibm-watsonx-ai>=1.3.1,<2.0.0",
"langchain-ibm~=1.1.0",
]

[project.urls]
Expand Down
14 changes: 5 additions & 9 deletions src/bundles/ibm/tests/test_watsonx.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@

from unittest.mock import Mock, patch

# langchain-ibm / ibm-watsonx-ai are real runtime deps of the lfx-ibm bundle,
# importable on every supported Python version including 3.14 (upstream lifted
# the <3.14 cap). Import directly so a real import regression surfaces instead
# of silently skipping the suite.
import langchain_ibm # noqa: F401
import pytest

try:
import langchain_ibm # noqa: F401
except ImportError:
# langchain-ibm is gated to python_version<'3.14' in the bundle's
# pyproject.toml because upstream pins exclude 3.14. Skip these tests
# on 3.14 until upstream adapts.
pytest.skip("langchain-ibm not available", allow_module_level=True)

from lfx.schema.dotdict import dotdict

# NOTE: the prior in-tree test pre-populated ``sys.modules["langchain_ibm"]``
Expand Down
16 changes: 6 additions & 10 deletions src/bundles/ibm/tests/test_watsonx_embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@

from unittest.mock import Mock, patch

# ibm-watsonx-ai and langchain-ibm are real runtime deps of the lfx-ibm bundle,
# importable on every supported Python version including 3.14 (ibm-watsonx-ai
# 1.5.13 / langchain-ibm 1.1.0 lifted the upstream <3.14 cap). Import directly so
# a real import regression surfaces instead of silently skipping the suite.
import ibm_watsonx_ai # noqa: F401
import langchain_ibm # noqa: F401
import pytest

try:
import ibm_watsonx_ai # noqa: F401
import langchain_ibm # noqa: F401
except ImportError:
# langchain-ibm and ibm-watsonx-ai are gated to python_version<'3.14' in
# the bundle's pyproject.toml because upstream pins exclude 3.14. Skip
# these tests on 3.14 until upstream adapts.
pytest.skip("langchain-ibm / ibm-watsonx-ai not available", allow_module_level=True)

from lfx.schema.dotdict import dotdict

# NOTE: prior in-tree versions of these tests pre-populated
Expand Down
Loading
Loading