Skip to content

Commit 88bfd60

Browse files
authored
infra: specify python max version of 3.12 for some integration packages (#27740)
1 parent 3b956b3 commit 88bfd60

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

.github/scripts/check_diff.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,21 @@
3232
"huggingface",
3333
]
3434

35+
# Cap python version at 3.12 for some packages with dependencies that are not yet
36+
# compatible with python 3.13 (mostly hf tokenizers).
37+
PY_312_MAX_PACKAGES = [
38+
f"libs/partners/{integration}"
39+
for integration in [
40+
"anthropic",
41+
"chroma",
42+
"couchbase",
43+
"huggingface",
44+
"mistralai",
45+
"nomic",
46+
"qdrant",
47+
]
48+
]
49+
3550

3651
def all_package_dirs() -> Set[str]:
3752
return {
@@ -117,9 +132,7 @@ def _get_configs_for_single_dir(job: str, dir_: str) -> List[Dict[str, str]]:
117132
# declare deps in funny way
118133
py_versions = ["3.9", "3.11"]
119134

120-
elif dir_ == "libs/partners/huggingface":
121-
# huggingface tokenizers doesn't support 3.13 yet
122-
# because of pep517 builds
135+
elif dir_ in PY_312_MAX_PACKAGES:
123136
py_versions = ["3.9", "3.12"]
124137

125138
elif dir_ in ["libs/community", "libs/langchain"] and job == "extended-tests":

libs/partners/mistralai/tests/unit_tests/test_chat_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def test__convert_dict_to_message_tool_call() -> None:
212212
InvalidToolCall(
213213
name="GenerateUsername",
214214
args="oops",
215-
error="Function GenerateUsername arguments:\n\noops\n\nare not valid JSON. Received JSONDecodeError Expecting value: line 1 column 1 (char 0)", # noqa: E501
215+
error="Function GenerateUsername arguments:\n\noops\n\nare not valid JSON. Received JSONDecodeError Expecting value: line 1 column 1 (char 0)\nFor troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/OUTPUT_PARSING_FAILURE", # noqa: E501
216216
id="ssAbar4Dr",
217217
type="invalid_tool_call",
218218
),

0 commit comments

Comments
 (0)