mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-13 21:27:52 +02:00
Update tests
This commit is contained in:
@@ -15,6 +15,7 @@ from langgraph.checkpoint.base import (
|
||||
CheckpointTuple,
|
||||
SerializerProtocol,
|
||||
get_checkpoint_id,
|
||||
get_checkpoint_metadata,
|
||||
)
|
||||
from langgraph.checkpoint.serde.jsonplus import JsonPlusSerializer
|
||||
from langgraph.checkpoint.serde.types import ChannelProtocol
|
||||
@@ -398,19 +399,7 @@ class SqliteSaver(BaseCheckpointSaver[str]):
|
||||
checkpoint_ns = config["configurable"]["checkpoint_ns"]
|
||||
type_, serialized_checkpoint = self.serde.dumps_typed(checkpoint)
|
||||
serialized_metadata = self.jsonplus_serde.dumps(
|
||||
{
|
||||
**{
|
||||
k: v
|
||||
for k, v in config["configurable"].items()
|
||||
if not k.startswith("__") and isinstance(v, (str, int, bool, float))
|
||||
},
|
||||
**{
|
||||
k: v
|
||||
for k, v in config.get("metadata", {}).items()
|
||||
if not k.startswith("__") and isinstance(v, (str, int, bool, float))
|
||||
},
|
||||
**metadata,
|
||||
}
|
||||
get_checkpoint_metadata(config, metadata)
|
||||
)
|
||||
with self.cursor() as cur:
|
||||
cur.execute(
|
||||
|
||||
@@ -16,6 +16,7 @@ from langgraph.checkpoint.base import (
|
||||
CheckpointTuple,
|
||||
SerializerProtocol,
|
||||
get_checkpoint_id,
|
||||
get_checkpoint_metadata,
|
||||
)
|
||||
from langgraph.checkpoint.serde.jsonplus import JsonPlusSerializer
|
||||
from langgraph.checkpoint.serde.types import ChannelProtocol
|
||||
@@ -464,19 +465,7 @@ class AsyncSqliteSaver(BaseCheckpointSaver[str]):
|
||||
checkpoint_ns = config["configurable"]["checkpoint_ns"]
|
||||
type_, serialized_checkpoint = self.serde.dumps_typed(checkpoint)
|
||||
serialized_metadata = self.jsonplus_serde.dumps(
|
||||
{
|
||||
**{
|
||||
k: v
|
||||
for k, v in config["configurable"].items()
|
||||
if not k.startswith("__") and isinstance(v, (str, int, bool, float))
|
||||
},
|
||||
**{
|
||||
k: v
|
||||
for k, v in config.get("metadata", {}).items()
|
||||
if not k.startswith("__") and isinstance(v, (str, int, bool, float))
|
||||
},
|
||||
**metadata,
|
||||
}
|
||||
get_checkpoint_metadata(config, metadata)
|
||||
)
|
||||
async with (
|
||||
self.lock,
|
||||
|
||||
Reference in New Issue
Block a user