From a13e657208bf2825498c839f079149ad8f9760b2 Mon Sep 17 00:00:00 2001 From: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:06:48 -0800 Subject: [PATCH] Backwards compat exports --- .../langgraph/checkpoint/postgres/__init__.py | 2 ++ .../checkpoint-postgres/langgraph/checkpoint/postgres/aio.py | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/libs/checkpoint-postgres/langgraph/checkpoint/postgres/__init__.py b/libs/checkpoint-postgres/langgraph/checkpoint/postgres/__init__.py index 542de4e72..b7a878baa 100644 --- a/libs/checkpoint-postgres/langgraph/checkpoint/postgres/__init__.py +++ b/libs/checkpoint-postgres/langgraph/checkpoint/postgres/__init__.py @@ -21,6 +21,8 @@ from langgraph.checkpoint.postgres.base import BasePostgresSaver from langgraph.checkpoint.serde.base import SerializerProtocol +Conn = _internal.Conn # For backward compatibility + class PostgresSaver(BasePostgresSaver): lock: threading.Lock diff --git a/libs/checkpoint-postgres/langgraph/checkpoint/postgres/aio.py b/libs/checkpoint-postgres/langgraph/checkpoint/postgres/aio.py index be052ec86..589520efc 100644 --- a/libs/checkpoint-postgres/langgraph/checkpoint/postgres/aio.py +++ b/libs/checkpoint-postgres/langgraph/checkpoint/postgres/aio.py @@ -21,6 +21,8 @@ from langgraph.checkpoint.postgres.base import BasePostgresSaver from langgraph.checkpoint.serde.base import SerializerProtocol +Conn = _ainternal.Conn # For backward compatibility + class AsyncPostgresSaver(BasePostgresSaver): lock: asyncio.Lock @@ -457,3 +459,6 @@ def put_writes( return asyncio.run_coroutine_threadsafe( self.aput_writes(config, writes, task_id), self.loop ).result() + + +__all__ = ["AsyncPostgresSaver", "Conn"]