From 3535716d806649d617bb4e7566785437b176ea92 Mon Sep 17 00:00:00 2001 From: sarahec Date: Fri, 6 Dec 2024 19:39:10 +0000 Subject: [PATCH] python3Packages.langgraph-checkpoint-postgres: 2.0.2 -> 2.0.8 Diff: https://github.com/langchain-ai/langgraph/compare/refs/tags/checkpointpostgres==2.0.2...checkpointpostgres==2.0.8 Changelog: https://github.com/langchain-ai/langgraph/releases/tag/checkpointpostgres==2.0.8 --- .../langgraph-checkpoint-postgres/default.nix | 37 +++++++++++++++---- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/langgraph-checkpoint-postgres/default.nix b/pkgs/development/python-modules/langgraph-checkpoint-postgres/default.nix index ce958ca954f2..28a72cc7855f 100644 --- a/pkgs/development/python-modules/langgraph-checkpoint-postgres/default.nix +++ b/pkgs/development/python-modules/langgraph-checkpoint-postgres/default.nix @@ -3,12 +3,13 @@ buildPythonPackage, fetchFromGitHub, langgraph-checkpoint, + langgraph-sdk, orjson, psycopg, psycopg-pool, - langgraph-sdk, poetry-core, pythonOlder, + pgvector, postgresql, postgresqlTestHook, pytestCheckHook, @@ -18,7 +19,7 @@ buildPythonPackage rec { pname = "langgraph-checkpoint-postgres"; - version = "2.0.2"; + version = "2.0.8"; pyproject = true; disabled = pythonOlder "3.10"; @@ -27,12 +28,13 @@ buildPythonPackage rec { owner = "langchain-ai"; repo = "langgraph"; rev = "refs/tags/checkpointpostgres==${version}"; - hash = "sha256-E3gdHWUYelR/xI3Cv3T2uVwsyt+tOkw9MjX7I2RAuiQ="; + hash = "sha256-yHLkFUp+q/XOt9Y9Dog2Tgs/K2CU7Bfkkucdr9vAKSg="; }; postgresqlTestSetupPost = '' substituteInPlace tests/conftest.py \ - --replace-fail "DEFAULT_URI = \"postgres://postgres:postgres@localhost:5441/postgres?sslmode=disable\"" "DEFAULT_URI = \"postgres:///$PGDATABASE\"" + --replace-fail "DEFAULT_URI = \"postgres://postgres:postgres@localhost:5441/postgres?sslmode=disable\"" "DEFAULT_URI = \"postgres:///$PGDATABASE\"" \ + --replace-fail "DEFAULT_POSTGRES_URI = \"postgres://postgres:postgres@localhost:5441/\"" "DEFAULT_POSTGRES_URI = \"postgres:///\"" ''; sourceRoot = "${src.name}/libs/checkpoint-postgres"; @@ -50,15 +52,34 @@ buildPythonPackage rec { doCheck = !(stdenvNoCC.hostPlatform.isDarwin); - pythonImportsCheck = [ "langgraph.checkpoint.postgres" ]; - nativeCheckInputs = [ - postgresql - postgresqlTestHook pytest-asyncio pytestCheckHook + (postgresql.withPackages (p: with p; [ pgvector ])) + postgresqlTestHook ]; + preCheck = '' + export postgresqlTestUserOptions = "LOGIN SUPERUSER" + ''; + + disabledTests = [ + # psycopg.errors.FeatureNotSupported: extension "vector" is not available + # /nix/store/...postgresql-and-plugins-16.4/share/postgresql/extension/vector.control": No such file or directory. + "test_embed_with_path" + "test_embed_with_path_sync" + "test_scores" + "test_search_sorting" + "test_vector_store_initialization" + "test_vector_insert_with_auto_embedding" + "test_vector_update_with_embedding" + "test_vector_search_with_filters" + "test_vector_search_pagination" + "test_vector_search_edge_cases" + ]; + + pythonImportsCheck = [ "langgraph.checkpoint.postgres" ]; + passthru = { updateScript = langgraph-sdk.updateScript; };