Skip to content

Commit 5b9a79b

Browse files
Dev added support for python 3 13 (#74)
* Added support for python 3.13 * Added support for python 3.13 * back * back v2 * support python 3.13 * update setup poetry job * update setup poetry job v2 * fix setup * added python version to job * back action * update poetry version * back * back * back * run on supported version of package * run on supported version of package * run on supported version of package * run on supported version of package * run on supported version of package * added supported python version * update package version * change model_id for standard tests * v1 * make format
1 parent 04242d4 commit 5b9a79b

File tree

7 files changed

+412
-376
lines changed

7 files changed

+412
-376
lines changed

.github/actions/poetry_setup/action.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,9 @@ runs:
5959
# Delete and recreate the softlinks pipx expects to have.
6060
rm /opt/pipx/venvs/poetry/bin/python
6161
cd /opt/pipx/venvs/poetry/bin
62-
ln -s "$(which "python$PYTHON_VERSION")" python
63-
chmod +x python
62+
ln -sf "$(which "python$PYTHON_VERSION")" python
6463
cd /opt/pipx_bin/
65-
ln -s /opt/pipx/venvs/poetry/bin/poetry poetry
66-
chmod +x poetry
64+
ln -sf /opt/pipx/venvs/poetry/bin/poetry poetry
6765
6866
# Ensure everything got set up correctly.
6967
/opt/pipx/venvs/poetry/bin/python --version

.github/workflows/_compile_integration_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
strategy:
2121
matrix:
2222
python-version:
23-
- "3.8"
24-
- "3.9"
2523
- "3.10"
2624
- "3.11"
25+
- "3.12"
26+
- "3.13"
2727
name: "poetry run pytest -m compile tests/integration_tests #${{ matrix.python-version }}"
2828
steps:
2929
- uses: actions/checkout@v4

.github/workflows/_lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
# Starting new jobs is also relatively slow,
3030
# so linting on fewer versions makes CI faster.
3131
python-version:
32-
- "3.8"
33-
- "3.11"
32+
- "3.10"
33+
- "3.13"
3434
steps:
3535
- uses: actions/checkout@v4
3636

.github/workflows/_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
strategy:
2121
matrix:
2222
python-version:
23-
- "3.8"
24-
- "3.9"
2523
- "3.10"
2624
- "3.11"
25+
- "3.12"
26+
- "3.13"
2727
name: "make test #${{ matrix.python-version }}"
2828
steps:
2929
- uses: actions/checkout@v4

libs/ibm/poetry.lock

Lines changed: 386 additions & 362 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/ibm/pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "langchain-ibm"
3-
version = "0.3.10"
3+
version = "0.3.11"
44
description = "An integration package connecting IBM watsonx.ai and LangChain"
55
authors = ["IBM"]
66
readme = "README.md"
@@ -11,9 +11,9 @@ license = "MIT"
1111
"Source Code" = "https://github.com/langchain-ai/langchain-ibm/tree/main/libs/ibm"
1212

1313
[tool.poetry.dependencies]
14-
python = ">=3.10,<3.13"
14+
python = ">=3.10,<3.14"
1515
langchain-core = "^0.3.39"
16-
ibm-watsonx-ai = "^1.2.10"
16+
ibm-watsonx-ai = "^1.3.18"
1717

1818
[tool.poetry.group.test]
1919
optional = true
@@ -27,7 +27,6 @@ pytest-watcher = "^0.3.4"
2727
pytest-asyncio = "^0.21.1"
2828
pytest-cov = "^4.1.0"
2929
langchain-tests = "0.3.13"
30-
numpy = "^1.26.2"
3130

3231
[tool.poetry.group.codespell]
3332
optional = true

libs/ibm/tests/integration_tests/test_chat_models_standard.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
URL = "https://us-south.ml.cloud.ibm.com"
1515

1616
MODEL_ID = "mistralai/mistral-large"
17+
MODEL_ID_2 = "meta-llama/llama-3-3-70b-instruct"
1718
MODEL_ID_IMAGE = "meta-llama/llama-3-2-11b-vision-instruct"
1819
MODEL_ID_DOUBLE_MSG_CONV = "meta-llama/llama-3-1-8b-instruct"
1920

@@ -70,6 +71,20 @@ def has_structured_output(self) -> bool:
7071
# Required until there is no 'structured_output_format' in the output.
7172
return False
7273

74+
@pytest.mark.xfail(reason="Supported for model 2.")
75+
def test_tool_message_histories_list_content(
76+
self, model: BaseChatModel, my_adder_tool: BaseTool
77+
) -> None:
78+
model.watsonx_model._inference.model_id = MODEL_ID_2 # type: ignore[attr-defined]
79+
super().test_tool_message_histories_list_content(model, my_adder_tool)
80+
model.watsonx_model._inference.model_id = MODEL_ID # type: ignore[attr-defined]
81+
82+
@pytest.mark.xfail(reason="Supported for vision model 2.")
83+
def test_message_with_name(self, model: BaseChatModel) -> None:
84+
model.watsonx_model._inference.model_id = MODEL_ID_2 # type: ignore[attr-defined]
85+
super().test_message_with_name(model)
86+
model.watsonx_model._inference.model_id = MODEL_ID # type: ignore[attr-defined]
87+
7388
@pytest.mark.xfail(reason="Supported for vision model.")
7489
def test_image_inputs(self, model: BaseChatModel) -> None:
7590
model.watsonx_model._inference.model_id = MODEL_ID_IMAGE # type: ignore[attr-defined]

0 commit comments

Comments
 (0)