python3Packages.{langchain,langgraph}: 250730 update (#427212)

This commit is contained in:
Pol Dellaiera 2025-07-31 15:20:51 +02:00 committed by GitHub
commit c0453c2c58
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 78 additions and 44 deletions

View File

@ -22,14 +22,14 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "langchain-anthropic"; pname = "langchain-anthropic";
version = "0.3.15"; version = "0.3.17";
pyproject = true; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "langchain-ai"; owner = "langchain-ai";
repo = "langchain"; repo = "langchain";
tag = "langchain-anthropic==${version}"; tag = "langchain-anthropic==${version}";
hash = "sha256-GOD6pMuUDCfrQ6MP+/HXZIg5wHUDRysosEjXjewY/9M="; hash = "sha256-oUT4Mu/vG+bVF6zLQX2RbVUglJ6VMyBt8XtCBSlBlpU=";
}; };
sourceRoot = "${src.name}/libs/partners/anthropic"; sourceRoot = "${src.name}/libs/partners/anthropic";

View File

@ -36,14 +36,14 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "langchain-core"; pname = "langchain-core";
version = "0.3.66"; version = "0.3.72";
pyproject = true; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "langchain-ai"; owner = "langchain-ai";
repo = "langchain"; repo = "langchain";
tag = "langchain-core==${version}"; tag = "langchain-core==${version}";
hash = "sha256-k9B2ApNyX3w6RTt/XdOl2FvU87NuZSi96vvfJOnBltM="; hash = "sha256-Q2uGMiODUtwkPdOyuSqp8vqjlLjiXk75QjXp7rr20tc=";
}; };
sourceRoot = "${src.name}/libs/core"; sourceRoot = "${src.name}/libs/core";

View File

@ -22,14 +22,14 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "langchain-ollama"; pname = "langchain-ollama";
version = "0.3.5"; version = "0.3.6";
pyproject = true; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "langchain-ai"; owner = "langchain-ai";
repo = "langchain"; repo = "langchain";
tag = "langchain-ollama==${version}"; tag = "langchain-ollama==${version}";
hash = "sha256-UmfbCctAb0D8mETICl5OJ58vghwhQKWkM1drkPt1aAg="; hash = "sha256-GQkyJaYvwRbjDR0Rfen7/X5hFhY2+WU74B6/9Ufhpo4=";
}; };
sourceRoot = "${src.name}/libs/partners/ollama"; sourceRoot = "${src.name}/libs/partners/ollama";

View File

@ -44,14 +44,14 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "langchain"; pname = "langchain";
version = "0.3.26"; version = "0.3.27";
pyproject = true; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "langchain-ai"; owner = "langchain-ai";
repo = "langchain"; repo = "langchain";
tag = "langchain==${version}"; tag = "langchain==${version}";
hash = "sha256-xxkayOtC2GtgtF3tPkTGKOS9VQ/y2gRPopvKq48/Kq0="; hash = "sha256-bqzJ0017Td65rhDCr2wfx+SCaJzPZTFzQpzy3RlaRj4=";
}; };
sourceRoot = "${src.name}/libs/langchain"; sourceRoot = "${src.name}/libs/langchain";
@ -128,6 +128,9 @@ buildPythonPackage rec {
"test_serializable_mapping" "test_serializable_mapping"
"test_person" "test_person"
"test_aliases_hidden" "test_aliases_hidden"
# AssertionError: (failed string match due to terminal control chars in output)
# https://github.com/langchain-ai/langchain/issues/32150
"test_filecallback"
]; ];
disabledTestPaths = [ disabledTestPaths = [
@ -151,6 +154,8 @@ buildPythonPackage rec {
rev-prefix = "langchain=="; rev-prefix = "langchain==";
}; };
__darwinAllowLocalNetworking = true;
meta = { meta = {
description = "Building applications with LLMs through composability"; description = "Building applications with LLMs through composability";
homepage = "https://github.com/langchain-ai/langchain"; homepage = "https://github.com/langchain-ai/langchain";

View File

@ -5,7 +5,7 @@
stdenvNoCC, stdenvNoCC,
# build system # build system
poetry-core, hatchling,
# dependencies # dependencies
langgraph-checkpoint, langgraph-checkpoint,
@ -26,14 +26,14 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "langgraph-checkpoint-postgres"; pname = "langgraph-checkpoint-postgres";
version = "2.0.21"; version = "2.0.23";
pyproject = true; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "langchain-ai"; owner = "langchain-ai";
repo = "langgraph"; repo = "langgraph";
tag = "checkpointpostgres==${version}"; tag = "checkpointpostgres==${version}";
hash = "sha256-hl1EBOtUkSfHGxsM+LOZPLSvkW7hdHS08klpvA7/Bd0="; hash = "sha256-QAzT8T3bf3R3gwI/iWDYYDz0SxgLZsP61oMk72dYz4s=";
}; };
postgresqlTestSetupPost = '' postgresqlTestSetupPost = ''
@ -44,7 +44,7 @@ buildPythonPackage rec {
sourceRoot = "${src.name}/libs/checkpoint-postgres"; sourceRoot = "${src.name}/libs/checkpoint-postgres";
build-system = [ poetry-core ]; build-system = [ hatchling ];
dependencies = [ dependencies = [
langgraph-checkpoint langgraph-checkpoint

View File

@ -4,15 +4,17 @@
fetchFromGitHub, fetchFromGitHub,
# build system # build system
poetry-core, hatchling,
# dependencies # dependencies
aiosqlite, aiosqlite,
langgraph-checkpoint, langgraph-checkpoint,
sqlite-vec,
# testing # testing
pytest-asyncio, pytest-asyncio,
pytestCheckHook, pytestCheckHook,
sqlite,
# passthru # passthru
gitUpdater, gitUpdater,
@ -20,28 +22,33 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "langgraph-checkpoint-sqlite"; pname = "langgraph-checkpoint-sqlite";
version = "2.0.6"; version = "2.0.10";
pyproject = true; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "langchain-ai"; owner = "langchain-ai";
repo = "langgraph"; repo = "langgraph";
tag = "checkpointsqlite==${version}"; tag = "checkpointsqlite==${version}";
hash = "sha256-UUlrhQS0C2rPp//+LwU2rgR4R3AM5fM9X3CYvi/DAy8="; hash = "sha256-570rXAxS4p2b7fc1aqSNArXHTz7G2GjZQDqMlqK7Jso=";
}; };
sourceRoot = "${src.name}/libs/checkpoint-sqlite"; sourceRoot = "${src.name}/libs/checkpoint-sqlite";
build-system = [ poetry-core ]; build-system = [ hatchling ];
dependencies = [ dependencies = [
aiosqlite aiosqlite
langgraph-checkpoint langgraph-checkpoint
sqlite-vec
]; ];
pythonRelaxDeps = [ pythonRelaxDeps = [
"aiosqlite" "aiosqlite"
# Bug: version is showing up as 0.0.0
# https://github.com/NixOS/nixpkgs/issues/427197
"sqlite-vec"
# Checkpoint clients are lagging behind langgraph-checkpoint # Checkpoint clients are lagging behind langgraph-checkpoint
"langgraph-checkpoint" "langgraph-checkpoint"
]; ];
@ -51,6 +58,20 @@ buildPythonPackage rec {
nativeCheckInputs = [ nativeCheckInputs = [
pytest-asyncio pytest-asyncio
pytestCheckHook pytestCheckHook
sqlite
];
disabledTestPaths = [
# Failed: 'flaky' not found in `markers` configuration option
"tests/test_ttl.py"
];
disabledTests = [
# AssertionError: (fails object comparison due to extra runtime fields)
# https://github.com/langchain-ai/langgraph/issues/5604
"test_combined_metadata"
"test_asearch"
"test_search"
]; ];
passthru.updateScript = gitUpdater { passthru.updateScript = gitUpdater {

View File

@ -4,7 +4,7 @@
fetchFromGitHub, fetchFromGitHub,
# build system # build system
poetry-core, hatchling,
# dependencies # dependencies
langchain-core, langchain-core,
@ -13,6 +13,8 @@
# testing # testing
dataclasses-json, dataclasses-json,
numpy,
pandas,
pytest-asyncio, pytest-asyncio,
pytest-mock, pytest-mock,
pytestCheckHook, pytestCheckHook,
@ -23,19 +25,19 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "langgraph-checkpoint"; pname = "langgraph-checkpoint";
version = "2.0.26"; version = "2.1.1";
pyproject = true; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "langchain-ai"; owner = "langchain-ai";
repo = "langgraph"; repo = "langgraph";
tag = "checkpoint==${version}"; tag = "checkpoint==${version}";
hash = "sha256-DSkjaxUfpsOg2ex0dgfO/UJ7WiQb5wQsAGgHPTckF6o="; hash = "sha256-UY3AChShKfOrtOQzOm5vi3Yy3rlBc+TAje9L2L6My/U=";
}; };
sourceRoot = "${src.name}/libs/checkpoint"; sourceRoot = "${src.name}/libs/checkpoint";
build-system = [ poetry-core ]; build-system = [ hatchling ];
dependencies = [ dependencies = [
langchain-core langchain-core
@ -48,6 +50,8 @@ buildPythonPackage rec {
nativeCheckInputs = [ nativeCheckInputs = [
dataclasses-json dataclasses-json
numpy
pandas
pytest-asyncio pytest-asyncio
pytest-mock pytest-mock
pytestCheckHook pytestCheckHook

View File

@ -5,7 +5,7 @@
fetchFromGitHub, fetchFromGitHub,
# build-system # build-system
poetry-core, hatchling,
# dependencies # dependencies
langchain-core, langchain-core,
@ -21,6 +21,7 @@
pytest-asyncio, pytest-asyncio,
pytest-mock, pytest-mock,
pytestCheckHook, pytestCheckHook,
syrupy,
xxhash, xxhash,
# passthru # passthru
@ -30,19 +31,19 @@
# It exists so the langgraph team can iterate on it without having to rebuild langgraph. # It exists so the langgraph team can iterate on it without having to rebuild langgraph.
buildPythonPackage rec { buildPythonPackage rec {
pname = "langgraph-prebuilt"; pname = "langgraph-prebuilt";
version = "0.1.8"; version = "0.6.1";
pyproject = true; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "langchain-ai"; owner = "langchain-ai";
repo = "langgraph"; repo = "langgraph";
tag = "prebuilt==${version}"; tag = "prebuilt==${version}";
hash = "sha256-mYcj7HRbB5H6G0CVLOICKgdtR5Wlv9WeTIBjQJqlhOE="; hash = "sha256-8mubZSV1CDgYzykKaaWqn04yJldAgdGmgZDm54towWc=";
}; };
sourceRoot = "${src.name}/libs/prebuilt"; sourceRoot = "${src.name}/libs/prebuilt";
build-system = [ poetry-core ]; build-system = [ hatchling ];
dependencies = [ dependencies = [
langchain-core langchain-core
@ -66,6 +67,7 @@ buildPythonPackage rec {
pytest-asyncio pytest-asyncio
pytest-mock pytest-mock
pytestCheckHook pytestCheckHook
syrupy
xxhash xxhash
]; ];
@ -82,6 +84,9 @@ buildPythonPackage rec {
# psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5442 failed: Connection refused # psycopg.OperationalError: connection failed: connection to server at "127.0.0.1", port 5442 failed: Connection refused
# Is the server running on that host and accepting TCP/IP connections? # Is the server running on that host and accepting TCP/IP connections?
"tests/test_react_agent.py" "tests/test_react_agent.py"
# Utilities to import
"tests/conftest.py"
]; ];
passthru.updateScript = gitUpdater { passthru.updateScript = gitUpdater {

View File

@ -4,7 +4,7 @@
fetchFromGitHub, fetchFromGitHub,
# build-system # build-system
poetry-core, hatchling,
# dependencies # dependencies
httpx, httpx,
@ -18,19 +18,19 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "langgraph-sdk"; pname = "langgraph-sdk";
version = "0.1.69"; version = "0.2.0";
pyproject = true; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "langchain-ai"; owner = "langchain-ai";
repo = "langgraph"; repo = "langgraph";
tag = "sdk==${version}"; tag = "sdk==${version}";
hash = "sha256-MRs5crbUEak/fr17+lerGFY+xTm7sanUW1lZXbPBAeg="; hash = "sha256-uhVdtB/fLy0hfZKfzNV2eoO83bvKppGVl4Lm8IEscL0=";
}; };
sourceRoot = "${src.name}/libs/sdk-py"; sourceRoot = "${src.name}/libs/sdk-py";
build-system = [ poetry-core ]; build-system = [ hatchling ];
dependencies = [ dependencies = [
httpx httpx

View File

@ -5,13 +5,14 @@
fetchFromGitHub, fetchFromGitHub,
# build-system # build-system
poetry-core, hatchling,
# dependencies # dependencies
langchain-core, langchain-core,
langgraph-checkpoint, langgraph-checkpoint,
langgraph-prebuilt, langgraph-prebuilt,
langgraph-sdk, langgraph-sdk,
pydantic,
xxhash, xxhash,
# tests # tests
@ -23,7 +24,6 @@
langgraph-checkpoint-sqlite, langgraph-checkpoint-sqlite,
langsmith, langsmith,
psycopg, psycopg,
pydantic,
pytest-asyncio, pytest-asyncio,
pytest-mock, pytest-mock,
pytest-repeat, pytest-repeat,
@ -38,30 +38,33 @@
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "langgraph"; pname = "langgraph";
version = "0.4.1"; version = "0.6.1";
pyproject = true; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "langchain-ai"; owner = "langchain-ai";
repo = "langgraph"; repo = "langgraph";
tag = version; tag = version;
hash = "sha256-bTxtfduuuyRITZqhk15aWwxNwiZ7TMTgBOEPat6zVIc="; hash = "sha256-8mubZSV1CDgYzykKaaWqn04yJldAgdGmgZDm54towWc=";
}; };
postgresqlTestSetupPost = '' postgresqlTestSetupPost = ''
substituteInPlace tests/conftest.py \ substituteInPlace tests/conftest_store.py \
--replace-fail "DEFAULT_POSTGRES_URI = \"postgres://postgres:postgres@localhost:5442/\"" "DEFAULT_POSTGRES_URI = \"postgres:///$PGDATABASE\""
substituteInPlace tests/conftest_checkpointer.py \
--replace-fail "DEFAULT_POSTGRES_URI = \"postgres://postgres:postgres@localhost:5442/\"" "DEFAULT_POSTGRES_URI = \"postgres:///$PGDATABASE\"" --replace-fail "DEFAULT_POSTGRES_URI = \"postgres://postgres:postgres@localhost:5442/\"" "DEFAULT_POSTGRES_URI = \"postgres:///$PGDATABASE\""
''; '';
sourceRoot = "${src.name}/libs/langgraph"; sourceRoot = "${src.name}/libs/langgraph";
build-system = [ poetry-core ]; build-system = [ hatchling ];
dependencies = [ dependencies = [
langchain-core langchain-core
langgraph-checkpoint langgraph-checkpoint
langgraph-prebuilt langgraph-prebuilt
langgraph-sdk langgraph-sdk
pydantic
xxhash xxhash
]; ];
@ -96,10 +99,6 @@ buildPythonPackage rec {
]; ];
disabledTests = [ disabledTests = [
# test is flaky due to pydantic error on the exception
"test_doesnt_warn_valid_schema"
"test_tool_node_inject_store"
# Disabling tests that requires to create new random databases # Disabling tests that requires to create new random databases
"test_cancel_graph_astream" "test_cancel_graph_astream"
"test_cancel_graph_astream_events_v2" "test_cancel_graph_astream_events_v2"
@ -114,9 +113,9 @@ buildPythonPackage rec {
"test_pending_writes_resume" "test_pending_writes_resume"
"test_remove_message_via_state_update" "test_remove_message_via_state_update"
# pydantic.errors.PydanticForbiddenQualifier, # Requires `langgraph dev` to be running
# see https://github.com/langchain-ai/langgraph/issues/4360 "test_remote_graph_basic_invoke"
"test_state_schema_optional_values" "test_remote_graph_stream_messages_tuple"
]; ];
disabledTestPaths = [ disabledTestPaths = [

View File

@ -19,19 +19,19 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "ormsgpack"; pname = "ormsgpack";
version = "1.9.1"; version = "1.10.0";
pyproject = true; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "aviramha"; owner = "aviramha";
repo = "ormsgpack"; repo = "ormsgpack";
tag = version; tag = version;
hash = "sha256-lFKHXTYtYEjtu+nXemQnB0yjkFD69gr0n7XfJ1Hy3J0="; hash = "sha256-7VESiHAkDynf31xrQQh0Vv5vSfMOjnVXRFackUQdB68=";
}; };
cargoDeps = rustPlatform.fetchCargoVendor { cargoDeps = rustPlatform.fetchCargoVendor {
inherit src; inherit src;
hash = "sha256-jOEryJcE5+b0Y588fbDSyPcz5h4zYz2+40+lIfRDV1M="; hash = "sha256-um6PzwL0M5lz4gDkTO/lvWJ0wwuCneNKRW8qysKMmM0=";
}; };
build-system = [ build-system = [