mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-29 11:19:54 +02:00
Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9786be1ff7 | ||
|
|
c2a129c882 | ||
|
|
62f004fd28 | ||
|
|
d4b22ac1d4 | ||
|
|
0415c02b40 | ||
|
|
e8665f84e7 | ||
|
|
8ff5e79e70 | ||
|
|
7f4822931e | ||
|
|
9706211aca | ||
|
|
405da6d507 |
+15
-3
@@ -468,6 +468,16 @@ markdown_extensions:
|
||||
hooks:
|
||||
- _scripts/notebook_hooks.py
|
||||
extra:
|
||||
consent:
|
||||
title: Cookie consent
|
||||
actions:
|
||||
- accept
|
||||
- reject
|
||||
description: >-
|
||||
We use cookies to recognize your repeated visits and preferences, as well
|
||||
as to measure the effectiveness of our documentation and whether users
|
||||
find what they're searching for. <strong>Clicking "Accept" makes our
|
||||
documentation better. Thank you!</strong> ❤️
|
||||
social:
|
||||
- icon: fontawesome/brands/js
|
||||
link: https://langchain-ai.github.io/langgraphjs/
|
||||
@@ -476,9 +486,9 @@ extra:
|
||||
- icon: fontawesome/brands/twitter
|
||||
link: https://twitter.com/LangChainAI
|
||||
analytics:
|
||||
- provider: google
|
||||
- property: G-G8X6ELZYE0
|
||||
- feedback:
|
||||
provider: google
|
||||
property: G-WR87FQLG9F
|
||||
feedback:
|
||||
title: Was this page helpful?
|
||||
ratings:
|
||||
- icon: material/emoticon-happy-outline
|
||||
@@ -509,3 +519,5 @@ validation:
|
||||
anchors: info
|
||||
# this is needed to handle headers with anchors for nav
|
||||
not_found: info
|
||||
copyright: >
|
||||
Copyright © 2025 LangChain, Inc | <a href="#__consent">Consent Preferences</a>
|
||||
|
||||
@@ -16,6 +16,7 @@ from langgraph.checkpoint.base import (
|
||||
CheckpointMetadata,
|
||||
CheckpointTuple,
|
||||
get_checkpoint_id,
|
||||
get_checkpoint_metadata,
|
||||
)
|
||||
from langgraph.checkpoint.postgres import _internal
|
||||
from langgraph.checkpoint.postgres.base import BasePostgresSaver
|
||||
@@ -317,17 +318,7 @@ class PostgresSaver(BasePostgresSaver):
|
||||
checkpoint["id"],
|
||||
checkpoint_id,
|
||||
Jsonb(self._dump_checkpoint(copy)),
|
||||
self._dump_metadata(
|
||||
{
|
||||
**{
|
||||
k: v
|
||||
for k, v in config["configurable"].items()
|
||||
if not k.startswith("__")
|
||||
},
|
||||
**config.get("metadata", {}),
|
||||
**metadata,
|
||||
}
|
||||
),
|
||||
self._dump_metadata(get_checkpoint_metadata(config, metadata)),
|
||||
),
|
||||
)
|
||||
return next_config
|
||||
|
||||
@@ -16,6 +16,7 @@ from langgraph.checkpoint.base import (
|
||||
CheckpointMetadata,
|
||||
CheckpointTuple,
|
||||
get_checkpoint_id,
|
||||
get_checkpoint_metadata,
|
||||
)
|
||||
from langgraph.checkpoint.postgres import _ainternal
|
||||
from langgraph.checkpoint.postgres.base import BasePostgresSaver
|
||||
@@ -275,17 +276,7 @@ class AsyncPostgresSaver(BasePostgresSaver):
|
||||
checkpoint["id"],
|
||||
checkpoint_id,
|
||||
Jsonb(self._dump_checkpoint(copy)),
|
||||
self._dump_metadata(
|
||||
{
|
||||
**{
|
||||
k: v
|
||||
for k, v in config["configurable"].items()
|
||||
if not k.startswith("__")
|
||||
},
|
||||
**config.get("metadata", {}),
|
||||
**metadata,
|
||||
}
|
||||
),
|
||||
self._dump_metadata(get_checkpoint_metadata(config, metadata)),
|
||||
),
|
||||
)
|
||||
return next_config
|
||||
|
||||
@@ -24,6 +24,7 @@ from langgraph.checkpoint.base import (
|
||||
Checkpoint,
|
||||
CheckpointMetadata,
|
||||
CheckpointTuple,
|
||||
get_checkpoint_metadata,
|
||||
)
|
||||
from langgraph.checkpoint.postgres import _ainternal, _internal
|
||||
from langgraph.checkpoint.postgres.base import BasePostgresSaver
|
||||
@@ -423,17 +424,7 @@ class ShallowPostgresSaver(BasePostgresSaver):
|
||||
thread_id,
|
||||
checkpoint_ns,
|
||||
Jsonb(self._dump_checkpoint(copy)),
|
||||
self._dump_metadata(
|
||||
{
|
||||
**{
|
||||
k: v
|
||||
for k, v in config["configurable"].items()
|
||||
if not k.startswith("__")
|
||||
},
|
||||
**config.get("metadata", {}),
|
||||
**metadata,
|
||||
}
|
||||
),
|
||||
self._dump_metadata(get_checkpoint_metadata(config, metadata)),
|
||||
),
|
||||
)
|
||||
return next_config
|
||||
@@ -752,17 +743,7 @@ class AsyncShallowPostgresSaver(BasePostgresSaver):
|
||||
thread_id,
|
||||
checkpoint_ns,
|
||||
Jsonb(self._dump_checkpoint(copy)),
|
||||
self._dump_metadata(
|
||||
{
|
||||
**{
|
||||
k: v
|
||||
for k, v in config["configurable"].items()
|
||||
if not k.startswith("__")
|
||||
},
|
||||
**config.get("metadata", {}),
|
||||
**metadata,
|
||||
}
|
||||
),
|
||||
self._dump_metadata(get_checkpoint_metadata(config, metadata)),
|
||||
),
|
||||
)
|
||||
return next_config
|
||||
|
||||
Generated
+11
-22
@@ -187,22 +187,12 @@ description = "Cross-platform colored terminal text."
|
||||
optional = false
|
||||
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
|
||||
groups = ["dev"]
|
||||
markers = "sys_platform == \"win32\""
|
||||
files = [
|
||||
{file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
|
||||
{file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "docopt"
|
||||
version = "0.6.2"
|
||||
description = "Pythonic argument parser, that will make you smile"
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
groups = ["dev"]
|
||||
files = [
|
||||
{file = "docopt-0.6.2.tar.gz", hash = "sha256:49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "exceptiongroup"
|
||||
version = "1.2.2"
|
||||
@@ -358,7 +348,7 @@ typing-extensions = ">=4.7"
|
||||
|
||||
[[package]]
|
||||
name = "langgraph-checkpoint"
|
||||
version = "2.0.10"
|
||||
version = "2.0.15"
|
||||
description = "Library with base interfaces for LangGraph checkpoint savers."
|
||||
optional = false
|
||||
python-versions = "^3.9.0,<4.0"
|
||||
@@ -962,21 +952,20 @@ pytest = ">=6.2.5"
|
||||
dev = ["pre-commit", "pytest-asyncio", "tox"]
|
||||
|
||||
[[package]]
|
||||
name = "pytest-watch"
|
||||
version = "4.2.0"
|
||||
description = "Local continuous test runner with pytest and watchdog."
|
||||
name = "pytest-watcher"
|
||||
version = "0.4.3"
|
||||
description = "Automatically rerun your tests on file modifications"
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
python-versions = "<4.0.0,>=3.7.0"
|
||||
groups = ["dev"]
|
||||
files = [
|
||||
{file = "pytest-watch-4.2.0.tar.gz", hash = "sha256:06136f03d5b361718b8d0d234042f7b2f203910d8568f63df2f866b547b3d4b9"},
|
||||
{file = "pytest_watcher-0.4.3-py3-none-any.whl", hash = "sha256:d59b1e1396f33a65ea4949b713d6884637755d641646960056a90b267c3460f9"},
|
||||
{file = "pytest_watcher-0.4.3.tar.gz", hash = "sha256:0cb0e4661648c8c0ff2b2d25efa5a8e421784b9e4c60fcecbf9b7c30b2d731b3"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
colorama = ">=0.3.3"
|
||||
docopt = ">=0.4.0"
|
||||
pytest = ">=2.6.4"
|
||||
watchdog = ">=0.6.0"
|
||||
tomli = {version = ">=2.0.1,<3.0.0", markers = "python_version < \"3.11\""}
|
||||
watchdog = ">=2.0.0"
|
||||
|
||||
[[package]]
|
||||
name = "pyyaml"
|
||||
@@ -1266,4 +1255,4 @@ watchmedo = ["PyYAML (>=3.10)"]
|
||||
[metadata]
|
||||
lock-version = "2.1"
|
||||
python-versions = "^3.9.0,<4.0"
|
||||
content-hash = "61326e4e81a4e8854763a119f39d4f5d0a54cee868b4dbc91b95ce7d2cebba5b"
|
||||
content-hash = "369bfffecb9489835b43b8255932e043176a11d2f639aad2d055ffd89263ca1e"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "langgraph-checkpoint-postgres"
|
||||
version = "2.0.14"
|
||||
version = "2.0.15"
|
||||
description = "Library with a Postgres implementation of LangGraph checkpoint saver."
|
||||
authors = []
|
||||
license = "MIT"
|
||||
@@ -10,7 +10,7 @@ packages = [{ include = "langgraph" }]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.9.0,<4.0"
|
||||
langgraph-checkpoint = "^2.0.10"
|
||||
langgraph-checkpoint = "^2.0.15"
|
||||
orjson = ">=3.10.1"
|
||||
psycopg = "^3.2.0"
|
||||
psycopg-pool = "^3.2.0"
|
||||
@@ -22,10 +22,10 @@ pytest = "^7.2.1"
|
||||
anyio = "^4.4.0"
|
||||
pytest-asyncio = "^0.21.1"
|
||||
pytest-mock = "^3.11.1"
|
||||
pytest-watch = "^4.2.0"
|
||||
mypy = "^1.10.0"
|
||||
psycopg = {extras = ["binary"], version = ">=3.0.0"}
|
||||
langgraph-checkpoint = {path = "../checkpoint", develop = true}
|
||||
pytest-watcher = "^0.4.3"
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
# --strict-markers will raise errors on unknown marks.
|
||||
@@ -61,3 +61,9 @@ warn_unused_ignores = "True"
|
||||
warn_redundant_casts = "True"
|
||||
allow_redefinition = "True"
|
||||
disable_error_code = "typeddict-item, return-value"
|
||||
|
||||
[tool.pytest-watcher]
|
||||
now = true
|
||||
delay = 0.1
|
||||
runner_args = ["--ff", "-x", "-v", "--tb", "short"]
|
||||
patterns = ["*.py"]
|
||||
|
||||
@@ -11,6 +11,7 @@ from psycopg.rows import dict_row
|
||||
from psycopg_pool import AsyncConnectionPool
|
||||
|
||||
from langgraph.checkpoint.base import (
|
||||
EXCLUDED_METADATA_KEYS,
|
||||
Checkpoint,
|
||||
CheckpointMetadata,
|
||||
create_checkpoint,
|
||||
@@ -23,6 +24,10 @@ from langgraph.checkpoint.postgres.aio import (
|
||||
from tests.conftest import DEFAULT_POSTGRES_URI
|
||||
|
||||
|
||||
def _exclude_keys(config: dict[str, Any]) -> dict[str, Any]:
|
||||
return {k: v for k, v in config.items() if k not in EXCLUDED_METADATA_KEYS}
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
async def _pool_saver():
|
||||
"""Fixture for pool mode testing."""
|
||||
@@ -223,7 +228,6 @@ async def test_combined_metadata(saver_name: str, test_data) -> None:
|
||||
assert checkpoint.metadata == {
|
||||
**metadata,
|
||||
"thread_id": "thread-2",
|
||||
"checkpoint_ns": "",
|
||||
"run_id": "my_run_id",
|
||||
}
|
||||
|
||||
@@ -251,14 +255,14 @@ async def test_asearch(saver_name: str, test_data) -> None:
|
||||
search_results_1 = [c async for c in saver.alist(None, filter=query_1)]
|
||||
assert len(search_results_1) == 1
|
||||
assert search_results_1[0].metadata == {
|
||||
**configs[0]["configurable"],
|
||||
**_exclude_keys(configs[0]["configurable"]),
|
||||
**metadata[0],
|
||||
}
|
||||
|
||||
search_results_2 = [c async for c in saver.alist(None, filter=query_2)]
|
||||
assert len(search_results_2) == 1
|
||||
assert search_results_2[0].metadata == {
|
||||
**configs[1]["configurable"],
|
||||
**_exclude_keys(configs[1]["configurable"]),
|
||||
**metadata[1],
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ from psycopg.rows import dict_row
|
||||
from psycopg_pool import ConnectionPool
|
||||
|
||||
from langgraph.checkpoint.base import (
|
||||
EXCLUDED_METADATA_KEYS,
|
||||
Checkpoint,
|
||||
CheckpointMetadata,
|
||||
create_checkpoint,
|
||||
@@ -21,6 +22,10 @@ from langgraph.checkpoint.postgres import PostgresSaver, ShallowPostgresSaver
|
||||
from tests.conftest import DEFAULT_POSTGRES_URI
|
||||
|
||||
|
||||
def _exclude_keys(config: dict[str, Any]) -> dict[str, Any]:
|
||||
return {k: v for k, v in config.items() if k not in EXCLUDED_METADATA_KEYS}
|
||||
|
||||
|
||||
@contextmanager
|
||||
def _pool_saver():
|
||||
"""Fixture for pool mode testing."""
|
||||
@@ -205,7 +210,6 @@ def test_combined_metadata(saver_name: str, test_data) -> None:
|
||||
assert checkpoint.metadata == {
|
||||
**metadata,
|
||||
"thread_id": "thread-2",
|
||||
"checkpoint_ns": "",
|
||||
"run_id": "my_run_id",
|
||||
}
|
||||
|
||||
@@ -233,14 +237,14 @@ def test_search(saver_name: str, test_data) -> None:
|
||||
search_results_1 = list(saver.list(None, filter=query_1))
|
||||
assert len(search_results_1) == 1
|
||||
assert search_results_1[0].metadata == {
|
||||
**configs[0]["configurable"],
|
||||
**_exclude_keys(configs[0]["configurable"]),
|
||||
**metadata[0],
|
||||
}
|
||||
|
||||
search_results_2 = list(saver.list(None, filter=query_2))
|
||||
assert len(search_results_2) == 1
|
||||
assert search_results_2[0].metadata == {
|
||||
**configs[1]["configurable"],
|
||||
**_exclude_keys(configs[1]["configurable"]),
|
||||
**metadata[1],
|
||||
}
|
||||
|
||||
|
||||
@@ -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,15 +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("__")
|
||||
},
|
||||
**config.get("metadata", {}),
|
||||
**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,15 +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("__")
|
||||
},
|
||||
**config.get("metadata", {}),
|
||||
**metadata,
|
||||
}
|
||||
get_checkpoint_metadata(config, metadata)
|
||||
)
|
||||
async with (
|
||||
self.lock,
|
||||
|
||||
Generated
+2
-2
@@ -350,7 +350,7 @@ typing-extensions = ">=4.7"
|
||||
|
||||
[[package]]
|
||||
name = "langgraph-checkpoint"
|
||||
version = "2.0.10"
|
||||
version = "2.0.15"
|
||||
description = "Library with base interfaces for LangGraph checkpoint savers."
|
||||
optional = false
|
||||
python-versions = "^3.9.0,<4.0"
|
||||
@@ -1043,4 +1043,4 @@ watchmedo = ["PyYAML (>=3.10)"]
|
||||
[metadata]
|
||||
lock-version = "2.1"
|
||||
python-versions = "^3.9.0"
|
||||
content-hash = "03c697eae6f550f3c7e29f1d61f4c409dabe04ae8d43281728e549174d2fc670"
|
||||
content-hash = "e6d3ca9bce723c05f4c5ae9dc4bee872f7581b7763680b34112f1d280f5a9b0a"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "langgraph-checkpoint-sqlite"
|
||||
version = "2.0.4"
|
||||
version = "2.0.5"
|
||||
description = "Library with a SQLite implementation of LangGraph checkpoint saver."
|
||||
authors = []
|
||||
license = "MIT"
|
||||
@@ -10,7 +10,7 @@ packages = [{ include = "langgraph" }]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.9.0"
|
||||
langgraph-checkpoint = "^2.0.10"
|
||||
langgraph-checkpoint = "^2.0.15"
|
||||
aiosqlite = "^0.20.0"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
|
||||
@@ -72,7 +72,6 @@ class TestAsyncSqliteSaver:
|
||||
assert checkpoint.metadata == {
|
||||
**self.metadata_2,
|
||||
"thread_id": "thread-2",
|
||||
"checkpoint_ns": "",
|
||||
"run_id": "my_run_id",
|
||||
}
|
||||
|
||||
@@ -94,14 +93,15 @@ class TestAsyncSqliteSaver:
|
||||
search_results_1 = [c async for c in saver.alist(None, filter=query_1)]
|
||||
assert len(search_results_1) == 1
|
||||
assert search_results_1[0].metadata == {
|
||||
**self.config_1["configurable"],
|
||||
"thread_id": "thread-1",
|
||||
"thread_ts": "1",
|
||||
**self.metadata_1,
|
||||
}
|
||||
|
||||
search_results_2 = [c async for c in saver.alist(None, filter=query_2)]
|
||||
assert len(search_results_2) == 1
|
||||
assert search_results_2[0].metadata == {
|
||||
**self.config_2["configurable"],
|
||||
"thread_id": "thread-2",
|
||||
**self.metadata_2,
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,6 @@ class TestSqliteSaver:
|
||||
assert checkpoint.metadata == {
|
||||
**self.metadata_2,
|
||||
"thread_id": "thread-2",
|
||||
"checkpoint_ns": "",
|
||||
"run_id": "my_run_id",
|
||||
}
|
||||
|
||||
@@ -97,14 +96,15 @@ class TestSqliteSaver:
|
||||
search_results_1 = list(saver.list(None, filter=query_1))
|
||||
assert len(search_results_1) == 1
|
||||
assert search_results_1[0].metadata == {
|
||||
**self.config_1["configurable"],
|
||||
"thread_id": "thread-1",
|
||||
"thread_ts": "1",
|
||||
**self.metadata_1,
|
||||
}
|
||||
|
||||
search_results_2 = list(saver.list(None, filter=query_2))
|
||||
assert len(search_results_2) == 1
|
||||
assert search_results_2[0].metadata == {
|
||||
**self.config_2["configurable"],
|
||||
"thread_id": "thread-2",
|
||||
**self.metadata_2,
|
||||
}
|
||||
|
||||
|
||||
@@ -446,6 +446,23 @@ def get_checkpoint_id(config: RunnableConfig) -> Optional[str]:
|
||||
)
|
||||
|
||||
|
||||
def get_checkpoint_metadata(
|
||||
config: RunnableConfig, metadata: CheckpointMetadata
|
||||
) -> CheckpointMetadata:
|
||||
"""Get checkpoint metadata in a backwards-compatible manner."""
|
||||
metadata = metadata.copy()
|
||||
for obj in (config.get("metadata"), config.get("configurable")):
|
||||
if not obj:
|
||||
continue
|
||||
for key in obj:
|
||||
if key in metadata or key in EXCLUDED_METADATA_KEYS or key.startswith("__"):
|
||||
continue
|
||||
v = obj[key]
|
||||
if isinstance(v, (str, int, bool, float)):
|
||||
metadata[key] = v # type: ignore[literal-required]
|
||||
return metadata
|
||||
|
||||
|
||||
"""
|
||||
Mapping from error type to error index.
|
||||
Regular writes just map to their index in the list of writes being saved.
|
||||
@@ -454,3 +471,9 @@ conflicting with regular writes.
|
||||
Each Checkpointer implementation should use this mapping in put_writes.
|
||||
"""
|
||||
WRITES_IDX_MAP = {ERROR: -1, SCHEDULED: -2, INTERRUPT: -3, RESUME: -4}
|
||||
|
||||
EXCLUDED_METADATA_KEYS = {
|
||||
"checkpoint_id",
|
||||
"checkpoint_ns",
|
||||
"checkpoint_map",
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ from langgraph.checkpoint.base import (
|
||||
CheckpointTuple,
|
||||
SerializerProtocol,
|
||||
get_checkpoint_id,
|
||||
get_checkpoint_metadata,
|
||||
)
|
||||
from langgraph.checkpoint.serde.types import TASKS, ChannelProtocol
|
||||
|
||||
@@ -356,17 +357,7 @@ class InMemorySaver(
|
||||
{
|
||||
checkpoint["id"]: (
|
||||
self.serde.dumps_typed(c),
|
||||
self.serde.dumps_typed(
|
||||
{
|
||||
**{
|
||||
k: v
|
||||
for k, v in config["configurable"].items()
|
||||
if not k.startswith("__")
|
||||
},
|
||||
**config.get("metadata", {}),
|
||||
**metadata,
|
||||
}
|
||||
),
|
||||
self.serde.dumps_typed(get_checkpoint_metadata(config, metadata)),
|
||||
config["configurable"].get("checkpoint_id"), # parent
|
||||
)
|
||||
}
|
||||
|
||||
@@ -59,7 +59,10 @@ class AsyncBatchedBaseStore(BaseStore):
|
||||
self._task = self._loop.create_task(_run(self._aqueue, weakref.ref(self)))
|
||||
|
||||
def __del__(self) -> None:
|
||||
self._task.cancel()
|
||||
try:
|
||||
self._task.cancel()
|
||||
except RuntimeError:
|
||||
pass
|
||||
|
||||
async def aget(
|
||||
self,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "langgraph-checkpoint"
|
||||
version = "2.0.14"
|
||||
version = "2.0.15"
|
||||
description = "Library with base interfaces for LangGraph checkpoint savers."
|
||||
authors = []
|
||||
license = "MIT"
|
||||
|
||||
@@ -60,7 +60,7 @@ class TestMemorySaver:
|
||||
self.metadata_3: CheckpointMetadata = {}
|
||||
|
||||
def test_combined_metadata(self) -> None:
|
||||
config = {
|
||||
config: RunnableConfig = {
|
||||
"configurable": {
|
||||
"thread_id": "thread-2",
|
||||
"checkpoint_ns": "",
|
||||
@@ -70,10 +70,10 @@ class TestMemorySaver:
|
||||
}
|
||||
self.memory_saver.put(config, self.chkpnt_2, self.metadata_2, {})
|
||||
checkpoint = self.memory_saver.get_tuple(config)
|
||||
assert checkpoint is not None
|
||||
assert checkpoint.metadata == {
|
||||
**self.metadata_2,
|
||||
"thread_id": "thread-2",
|
||||
"checkpoint_ns": "",
|
||||
"run_id": "my_run_id",
|
||||
}
|
||||
|
||||
@@ -96,14 +96,15 @@ class TestMemorySaver:
|
||||
search_results_1 = list(self.memory_saver.list(None, filter=query_1))
|
||||
assert len(search_results_1) == 1
|
||||
assert search_results_1[0].metadata == {
|
||||
**self.config_1["configurable"],
|
||||
"thread_id": "thread-1",
|
||||
"thread_ts": "1",
|
||||
**self.metadata_1,
|
||||
}
|
||||
|
||||
search_results_2 = list(self.memory_saver.list(None, filter=query_2))
|
||||
assert len(search_results_2) == 1
|
||||
assert search_results_2[0].metadata == {
|
||||
**self.config_2["configurable"],
|
||||
"thread_id": "thread-2",
|
||||
**self.metadata_2,
|
||||
}
|
||||
|
||||
@@ -146,7 +147,8 @@ class TestMemorySaver:
|
||||
]
|
||||
assert len(search_results_1) == 1
|
||||
assert search_results_1[0].metadata == {
|
||||
**self.config_1["configurable"],
|
||||
"thread_id": "thread-1",
|
||||
"thread_ts": "1",
|
||||
**self.metadata_1,
|
||||
}
|
||||
|
||||
@@ -155,7 +157,7 @@ class TestMemorySaver:
|
||||
]
|
||||
assert len(search_results_2) == 1
|
||||
assert search_results_2[0].metadata == {
|
||||
**self.config_2["configurable"],
|
||||
"thread_id": "thread-2",
|
||||
**self.metadata_2,
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -133,8 +133,6 @@ async def test_invoke_two_processes_in_out_interrupt(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 6,
|
||||
@@ -158,8 +156,6 @@ async def test_invoke_two_processes_in_out_interrupt(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 5,
|
||||
@@ -183,8 +179,6 @@ async def test_invoke_two_processes_in_out_interrupt(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "input",
|
||||
"step": 4,
|
||||
@@ -206,8 +200,6 @@ async def test_invoke_two_processes_in_out_interrupt(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 3,
|
||||
@@ -231,8 +223,6 @@ async def test_invoke_two_processes_in_out_interrupt(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "input",
|
||||
"step": 2,
|
||||
@@ -254,8 +244,6 @@ async def test_invoke_two_processes_in_out_interrupt(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 1,
|
||||
@@ -279,8 +267,6 @@ async def test_invoke_two_processes_in_out_interrupt(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 0,
|
||||
@@ -304,7 +290,6 @@ async def test_invoke_two_processes_in_out_interrupt(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "input",
|
||||
"step": -1,
|
||||
@@ -381,8 +366,6 @@ async def test_fork_always_re_runs_nodes(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 5,
|
||||
@@ -404,8 +387,6 @@ async def test_fork_always_re_runs_nodes(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 4,
|
||||
@@ -427,8 +408,6 @@ async def test_fork_always_re_runs_nodes(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 3,
|
||||
@@ -450,8 +429,6 @@ async def test_fork_always_re_runs_nodes(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 2,
|
||||
@@ -473,8 +450,6 @@ async def test_fork_always_re_runs_nodes(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 1,
|
||||
@@ -496,8 +471,6 @@ async def test_fork_always_re_runs_nodes(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 0,
|
||||
@@ -521,7 +494,6 @@ async def test_fork_always_re_runs_nodes(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "input",
|
||||
"step": -1,
|
||||
@@ -862,8 +834,6 @@ async def test_conditional_graph(checkpointer_name: str) -> None:
|
||||
await app_w_interrupt.checkpointer.aget_tuple(config)
|
||||
).checkpoint["ts"],
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 0,
|
||||
@@ -924,8 +894,6 @@ async def test_conditional_graph(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "update",
|
||||
"step": 1,
|
||||
@@ -1050,8 +1018,6 @@ async def test_conditional_graph(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "update",
|
||||
"step": 4,
|
||||
@@ -1134,8 +1100,6 @@ async def test_conditional_graph(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 0,
|
||||
@@ -1196,8 +1160,6 @@ async def test_conditional_graph(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "update",
|
||||
"step": 1,
|
||||
@@ -1322,8 +1284,6 @@ async def test_conditional_graph(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "update",
|
||||
"step": 4,
|
||||
@@ -1406,8 +1366,6 @@ async def test_conditional_graph(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 0,
|
||||
@@ -1840,8 +1798,6 @@ async def test_conditional_graph_state(
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 1,
|
||||
@@ -1897,8 +1853,6 @@ async def test_conditional_graph_state(
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "update",
|
||||
"step": 2,
|
||||
@@ -1989,8 +1943,6 @@ async def test_conditional_graph_state(
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "update",
|
||||
"step": 5,
|
||||
@@ -2058,8 +2010,6 @@ async def test_conditional_graph_state(
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 1,
|
||||
@@ -2114,8 +2064,6 @@ async def test_conditional_graph_state(
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "update",
|
||||
"step": 2,
|
||||
@@ -2204,8 +2152,6 @@ async def test_conditional_graph_state(
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "update",
|
||||
"step": 5,
|
||||
@@ -2822,8 +2768,6 @@ async def test_state_graph_packets(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 1,
|
||||
@@ -2883,8 +2827,6 @@ async def test_state_graph_packets(checkpointer_name: str) -> None:
|
||||
config=tup.config,
|
||||
created_at=tup.checkpoint["ts"],
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "update",
|
||||
"step": 2,
|
||||
@@ -2994,8 +2936,6 @@ async def test_state_graph_packets(checkpointer_name: str) -> None:
|
||||
config=tup.config,
|
||||
created_at=tup.checkpoint["ts"],
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 4,
|
||||
@@ -3065,8 +3005,6 @@ async def test_state_graph_packets(checkpointer_name: str) -> None:
|
||||
config=tup.config,
|
||||
created_at=tup.checkpoint["ts"],
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "update",
|
||||
"step": 5,
|
||||
@@ -3141,8 +3079,6 @@ async def test_state_graph_packets(checkpointer_name: str) -> None:
|
||||
config=tup.config,
|
||||
created_at=tup.checkpoint["ts"],
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 1,
|
||||
@@ -3204,8 +3140,6 @@ async def test_state_graph_packets(checkpointer_name: str) -> None:
|
||||
config=tup.config,
|
||||
created_at=tup.checkpoint["ts"],
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "update",
|
||||
"step": 2,
|
||||
@@ -3315,8 +3249,6 @@ async def test_state_graph_packets(checkpointer_name: str) -> None:
|
||||
config=tup.config,
|
||||
created_at=tup.checkpoint["ts"],
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 4,
|
||||
@@ -3386,8 +3318,6 @@ async def test_state_graph_packets(checkpointer_name: str) -> None:
|
||||
config=tup.config,
|
||||
created_at=tup.checkpoint["ts"],
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "update",
|
||||
"step": 5,
|
||||
@@ -3645,8 +3575,6 @@ async def test_message_graph(checkpointer_name: str) -> None:
|
||||
config=tup.config,
|
||||
created_at=tup.checkpoint["ts"],
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 1,
|
||||
@@ -3701,8 +3629,6 @@ async def test_message_graph(checkpointer_name: str) -> None:
|
||||
config=tup.config,
|
||||
created_at=tup.checkpoint["ts"],
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "update",
|
||||
"step": 2,
|
||||
@@ -3793,8 +3719,6 @@ async def test_message_graph(checkpointer_name: str) -> None:
|
||||
config=tup.config,
|
||||
created_at=tup.checkpoint["ts"],
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 4,
|
||||
@@ -3855,8 +3779,6 @@ async def test_message_graph(checkpointer_name: str) -> None:
|
||||
config=tup.config,
|
||||
created_at=tup.checkpoint["ts"],
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "update",
|
||||
"step": 5,
|
||||
@@ -4165,8 +4087,6 @@ async def test_start_branch_then(checkpointer_name: str) -> None:
|
||||
if "shallow" not in checkpointer_name:
|
||||
assert [c.metadata async for c in tool_two.checkpointer.alist(thread1)] == [
|
||||
{
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 0,
|
||||
@@ -4175,7 +4095,6 @@ async def test_start_branch_then(checkpointer_name: str) -> None:
|
||||
"thread_id": "1",
|
||||
},
|
||||
{
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "input",
|
||||
"step": -1,
|
||||
@@ -4198,8 +4117,6 @@ async def test_start_branch_then(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 0,
|
||||
@@ -4233,8 +4150,6 @@ async def test_start_branch_then(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 1,
|
||||
@@ -4270,8 +4185,6 @@ async def test_start_branch_then(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 0,
|
||||
@@ -4305,8 +4218,6 @@ async def test_start_branch_then(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 1,
|
||||
@@ -4342,8 +4253,6 @@ async def test_start_branch_then(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 0,
|
||||
@@ -4374,8 +4283,6 @@ async def test_start_branch_then(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "update",
|
||||
"step": 1,
|
||||
@@ -4409,8 +4316,6 @@ async def test_start_branch_then(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 2,
|
||||
@@ -4951,8 +4856,6 @@ async def test_branch_then(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 1,
|
||||
@@ -4985,8 +4888,6 @@ async def test_branch_then(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 3,
|
||||
@@ -5021,8 +4922,6 @@ async def test_branch_then(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 1,
|
||||
@@ -5055,8 +4954,6 @@ async def test_branch_then(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 3,
|
||||
@@ -5099,8 +4996,6 @@ async def test_branch_then(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 1,
|
||||
@@ -5133,8 +5028,6 @@ async def test_branch_then(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 3,
|
||||
@@ -5169,8 +5062,6 @@ async def test_branch_then(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 1,
|
||||
@@ -5203,8 +5094,6 @@ async def test_branch_then(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 3,
|
||||
@@ -5233,7 +5122,6 @@ async def test_branch_then(checkpointer_name: str) -> None:
|
||||
config=uconfig,
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "update",
|
||||
"step": 0,
|
||||
@@ -5261,8 +5149,6 @@ async def test_branch_then(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 1,
|
||||
@@ -5289,8 +5175,6 @@ async def test_branch_then(checkpointer_name: str) -> None:
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 3,
|
||||
@@ -5382,8 +5266,6 @@ async def test_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"writes": {"outer_1": {"my_key": "hi my value"}},
|
||||
@@ -5435,8 +5317,6 @@ async def test_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_map": AnyDict({"": AnyStr()}),
|
||||
"parents": {
|
||||
"": AnyStr(),
|
||||
},
|
||||
@@ -5483,8 +5363,6 @@ async def test_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"writes": {"outer_1": {"my_key": "hi my value"}},
|
||||
@@ -5531,8 +5409,6 @@ async def test_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"writes": {"outer_1": {"my_key": "hi my value"}},
|
||||
@@ -5571,8 +5447,6 @@ async def test_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"writes": None,
|
||||
@@ -5607,7 +5481,6 @@ async def test_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "input",
|
||||
"writes": {"__start__": {"my_key": "my value"}},
|
||||
@@ -5643,8 +5516,6 @@ async def test_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_map": AnyDict({"": AnyStr()}),
|
||||
"source": "loop",
|
||||
"writes": {
|
||||
"inner_1": {
|
||||
@@ -5693,8 +5564,6 @@ async def test_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_map": AnyDict({"": AnyStr()}),
|
||||
"source": "loop",
|
||||
"writes": None,
|
||||
"step": 0,
|
||||
@@ -5744,8 +5613,6 @@ async def test_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": None,
|
||||
"checkpoint_map": AnyDict({"": AnyStr()}),
|
||||
"source": "input",
|
||||
"writes": {"__start__": {"my_key": "hi my value"}},
|
||||
"step": -1,
|
||||
@@ -5791,8 +5658,6 @@ async def test_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"writes": {
|
||||
@@ -5829,8 +5694,6 @@ async def test_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"writes": {
|
||||
@@ -5873,8 +5736,6 @@ async def test_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"writes": {"inner": {"my_key": "hi my value here and there"}},
|
||||
@@ -5915,8 +5776,6 @@ async def test_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"writes": {"outer_1": {"my_key": "hi my value"}},
|
||||
@@ -5951,8 +5810,6 @@ async def test_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"writes": None,
|
||||
@@ -5987,7 +5844,6 @@ async def test_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "input",
|
||||
"writes": {"__start__": {"my_key": "my value"}},
|
||||
@@ -6097,8 +5953,6 @@ async def test_doubly_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"writes": {"parent_1": {"my_key": "hi my value"}},
|
||||
@@ -6145,8 +5999,6 @@ async def test_doubly_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {"": AnyStr()},
|
||||
"source": "loop",
|
||||
"writes": None,
|
||||
@@ -6193,8 +6045,6 @@ async def test_doubly_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_map": AnyDict({"": AnyStr(), AnyStr("child:"): AnyStr()}),
|
||||
"parents": AnyDict(
|
||||
{
|
||||
"": AnyStr(),
|
||||
@@ -6274,10 +6124,6 @@ async def test_doubly_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_map": AnyDict(
|
||||
{"": AnyStr(), AnyStr("child:"): AnyStr()}
|
||||
),
|
||||
"parents": AnyDict(
|
||||
{
|
||||
"": AnyStr(),
|
||||
@@ -6340,8 +6186,6 @@ async def test_doubly_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_map": AnyDict({"": AnyStr()}),
|
||||
"parents": {"": AnyStr()},
|
||||
"source": "loop",
|
||||
"writes": None,
|
||||
@@ -6381,8 +6225,6 @@ async def test_doubly_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"writes": {"parent_1": {"my_key": "hi my value"}},
|
||||
@@ -6431,8 +6273,6 @@ async def test_doubly_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"writes": {
|
||||
@@ -6478,8 +6318,6 @@ async def test_doubly_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"writes": {
|
||||
@@ -6510,8 +6348,6 @@ async def test_doubly_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"writes": {"child": {"my_key": "hi my value here and there"}},
|
||||
@@ -6556,8 +6392,6 @@ async def test_doubly_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"writes": {"parent_1": {"my_key": "hi my value"}},
|
||||
@@ -6615,7 +6449,6 @@ async def test_doubly_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "input",
|
||||
"writes": {"my_key": "my value"},
|
||||
@@ -6651,8 +6484,6 @@ async def test_doubly_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_map": AnyDict({"": AnyStr()}),
|
||||
"source": "loop",
|
||||
"writes": {"child_1": {"my_key": "hi my value here and there"}},
|
||||
"step": 1,
|
||||
@@ -6692,8 +6523,6 @@ async def test_doubly_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_map": AnyDict({"": AnyStr()}),
|
||||
"source": "loop",
|
||||
"writes": None,
|
||||
"step": 0,
|
||||
@@ -6746,8 +6575,6 @@ async def test_doubly_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": None,
|
||||
"checkpoint_map": AnyDict({"": AnyStr()}),
|
||||
"source": "input",
|
||||
"writes": {"__start__": {"my_key": "hi my value"}},
|
||||
"step": -1,
|
||||
@@ -6795,10 +6622,6 @@ async def test_doubly_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_map": AnyDict(
|
||||
{"": AnyStr(), AnyStr("child:"): AnyStr()}
|
||||
),
|
||||
"source": "loop",
|
||||
"writes": {
|
||||
"grandchild_2": {"my_key": "hi my value here and there"}
|
||||
@@ -6856,10 +6679,6 @@ async def test_doubly_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_map": AnyDict(
|
||||
{"": AnyStr(), AnyStr("child:"): AnyStr()}
|
||||
),
|
||||
"source": "loop",
|
||||
"writes": {"grandchild_1": {"my_key": "hi my value here"}},
|
||||
"step": 1,
|
||||
@@ -6922,10 +6741,6 @@ async def test_doubly_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_map": AnyDict(
|
||||
{"": AnyStr(), AnyStr("child:"): AnyStr()}
|
||||
),
|
||||
"source": "loop",
|
||||
"writes": None,
|
||||
"step": 0,
|
||||
@@ -6988,10 +6803,6 @@ async def test_doubly_nested_graph_state(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": None,
|
||||
"checkpoint_map": AnyDict(
|
||||
{"": AnyStr(), AnyStr("child:"): AnyStr()}
|
||||
),
|
||||
"source": "input",
|
||||
"writes": {"__start__": {"my_key": "hi my value"}},
|
||||
"step": -1,
|
||||
@@ -7270,8 +7081,6 @@ async def test_weather_subgraph(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"source": "loop",
|
||||
"writes": {"router_node": {"route": "weather"}},
|
||||
"step": 1,
|
||||
@@ -7368,8 +7177,6 @@ async def test_weather_subgraph(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"source": "loop",
|
||||
"writes": {"router_node": {"route": "weather"}},
|
||||
"step": 1,
|
||||
@@ -7415,8 +7222,6 @@ async def test_weather_subgraph(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_map": AnyDict({"": AnyStr()}),
|
||||
"source": "loop",
|
||||
"writes": {"model_node": {"city": "San Francisco"}},
|
||||
"step": 1,
|
||||
@@ -7480,8 +7285,6 @@ async def test_weather_subgraph(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"source": "loop",
|
||||
"writes": {"router_node": {"route": "weather"}},
|
||||
"step": 1,
|
||||
@@ -7528,7 +7331,6 @@ async def test_weather_subgraph(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_map": AnyDict({"": AnyStr()}),
|
||||
"step": 2,
|
||||
"source": "update",
|
||||
"writes": {
|
||||
|
||||
@@ -63,7 +63,6 @@ from langgraph.store.base import BaseStore
|
||||
from langgraph.store.memory import InMemoryStore
|
||||
from langgraph.types import Command, Interrupt, interrupt
|
||||
from langgraph.utils.config import get_stream_writer
|
||||
from tests.any_str import AnyStr
|
||||
from tests.conftest import (
|
||||
ALL_CHECKPOINTERS_ASYNC,
|
||||
ALL_CHECKPOINTERS_SYNC,
|
||||
@@ -183,8 +182,6 @@ def test_no_prompt(
|
||||
"agent": "agent",
|
||||
}
|
||||
assert saved.metadata == {
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"writes": {"agent": {"messages": [AIMessage(content="hi?", id="0")]}},
|
||||
@@ -217,8 +214,6 @@ async def test_no_prompt_async(checkpointer_name: str) -> None:
|
||||
"agent": "agent",
|
||||
}
|
||||
assert saved.metadata == {
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"writes": {"agent": {"messages": [AIMessage(content="hi?", id="0")]}},
|
||||
|
||||
@@ -1112,8 +1112,6 @@ def test_pending_writes_resume(
|
||||
PregelTask(AnyStr(), "two", (PULL, "two"), 'ConnectionError("I\'m not good")'),
|
||||
)
|
||||
assert state.metadata == {
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 0,
|
||||
@@ -1212,8 +1210,6 @@ def test_pending_writes_resume(
|
||||
"channel_values": {"one": "one", "two": "two", "value": 6},
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"step": 1,
|
||||
"source": "loop",
|
||||
@@ -1264,8 +1260,6 @@ def test_pending_writes_resume(
|
||||
},
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"step": 0,
|
||||
"source": "loop",
|
||||
@@ -1307,7 +1301,6 @@ def test_pending_writes_resume(
|
||||
"channel_values": {"__start__": {"value": 1}},
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"step": -1,
|
||||
"source": "input",
|
||||
@@ -2398,8 +2391,6 @@ def test_in_one_fan_out_state_graph_waiting_edge(
|
||||
},
|
||||
created_at=AnyStr(),
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "update",
|
||||
"step": 4,
|
||||
@@ -4835,8 +4826,6 @@ def test_parent_command(request: pytest.FixtureRequest, checkpointer_name: str)
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"source": "loop",
|
||||
"writes": {
|
||||
"alice": {
|
||||
|
||||
@@ -606,8 +606,6 @@ async def test_dynamic_interrupt(checkpointer_name: str) -> None:
|
||||
if "shallow" not in checkpointer_name:
|
||||
assert [c.metadata async for c in tool_two.checkpointer.alist(thread1)] == [
|
||||
{
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 0,
|
||||
@@ -615,7 +613,6 @@ async def test_dynamic_interrupt(checkpointer_name: str) -> None:
|
||||
"thread_id": "1",
|
||||
},
|
||||
{
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "input",
|
||||
"step": -1,
|
||||
@@ -644,8 +641,6 @@ async def test_dynamic_interrupt(checkpointer_name: str) -> None:
|
||||
config=tup.config,
|
||||
created_at=tup.checkpoint["ts"],
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 0,
|
||||
@@ -672,8 +667,6 @@ async def test_dynamic_interrupt(checkpointer_name: str) -> None:
|
||||
config=tup.config,
|
||||
created_at=tup.checkpoint["ts"],
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "update",
|
||||
"step": 1,
|
||||
@@ -798,8 +791,6 @@ async def test_dynamic_interrupt_subgraph(checkpointer_name: str) -> None:
|
||||
c.metadata async for c in tool_two.checkpointer.alist(thread1root)
|
||||
] == [
|
||||
{
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 0,
|
||||
@@ -807,7 +798,6 @@ async def test_dynamic_interrupt_subgraph(checkpointer_name: str) -> None:
|
||||
"thread_id": "1",
|
||||
},
|
||||
{
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "input",
|
||||
"step": -1,
|
||||
@@ -842,8 +832,6 @@ async def test_dynamic_interrupt_subgraph(checkpointer_name: str) -> None:
|
||||
config=tup.config,
|
||||
created_at=tup.checkpoint["ts"],
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 0,
|
||||
@@ -870,8 +858,6 @@ async def test_dynamic_interrupt_subgraph(checkpointer_name: str) -> None:
|
||||
config=tup.config,
|
||||
created_at=tup.checkpoint["ts"],
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "update",
|
||||
"step": 1,
|
||||
@@ -990,8 +976,6 @@ async def test_copy_checkpoint(checkpointer_name: str) -> None:
|
||||
if "shallow" not in checkpointer_name:
|
||||
assert [c.metadata async for c in tool_two.checkpointer.alist(thread1)] == [
|
||||
{
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 0,
|
||||
@@ -999,7 +983,6 @@ async def test_copy_checkpoint(checkpointer_name: str) -> None:
|
||||
"thread_id": "1",
|
||||
},
|
||||
{
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "input",
|
||||
"step": -1,
|
||||
@@ -1038,8 +1021,6 @@ async def test_copy_checkpoint(checkpointer_name: str) -> None:
|
||||
config=tup.config,
|
||||
created_at=tup.checkpoint["ts"],
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 0,
|
||||
@@ -1083,8 +1064,6 @@ async def test_copy_checkpoint(checkpointer_name: str) -> None:
|
||||
config=tup.config,
|
||||
created_at=tup.checkpoint["ts"],
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "fork",
|
||||
"step": 1,
|
||||
@@ -1251,8 +1230,6 @@ async def test_cancel_graph_astream(checkpointer_name: str) -> None:
|
||||
assert state.values == {"value": 3} # 1 + 2
|
||||
assert state.next == ("aparallelwhile",)
|
||||
assert state.metadata == {
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 0,
|
||||
@@ -1330,8 +1307,6 @@ async def test_cancel_graph_astream_events_v2(checkpointer_name: Optional[str])
|
||||
assert state.values == {"value": 2}
|
||||
assert state.next == ("awhile",)
|
||||
assert state.metadata == {
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 1,
|
||||
@@ -2032,8 +2007,6 @@ async def test_pending_writes_resume(
|
||||
),
|
||||
)
|
||||
assert state.metadata == {
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"step": 0,
|
||||
@@ -2132,8 +2105,6 @@ async def test_pending_writes_resume(
|
||||
"channel_values": {"one": "one", "two": "two", "value": 6},
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"step": 1,
|
||||
"source": "loop",
|
||||
@@ -2186,8 +2157,6 @@ async def test_pending_writes_resume(
|
||||
},
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"step": 0,
|
||||
"source": "loop",
|
||||
@@ -2231,7 +2200,6 @@ async def test_pending_writes_resume(
|
||||
"channel_values": {"__start__": {"value": 1}},
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"step": -1,
|
||||
"source": "input",
|
||||
@@ -2810,8 +2778,6 @@ async def test_send_dedupe_on_resume(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"source": "loop",
|
||||
"writes": {"3": ["3"]},
|
||||
"thread_id": "1",
|
||||
@@ -2848,8 +2814,6 @@ async def test_send_dedupe_on_resume(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"source": "loop",
|
||||
"writes": {"2": ["2|3"], "3": ["3"], "flaky": ["flaky|4"]},
|
||||
"thread_id": "1",
|
||||
@@ -2893,8 +2857,6 @@ async def test_send_dedupe_on_resume(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"source": "loop",
|
||||
"writes": {
|
||||
"2": [
|
||||
@@ -2960,8 +2922,6 @@ async def test_send_dedupe_on_resume(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"source": "loop",
|
||||
"writes": {"1": ["1"]},
|
||||
"thread_id": "1",
|
||||
@@ -3017,8 +2977,6 @@ async def test_send_dedupe_on_resume(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"source": "loop",
|
||||
"writes": None,
|
||||
"thread_id": "1",
|
||||
@@ -3056,7 +3014,6 @@ async def test_send_dedupe_on_resume(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_ns": "",
|
||||
"source": "input",
|
||||
"writes": {"__start__": ["0"]},
|
||||
"thread_id": "1",
|
||||
@@ -3229,8 +3186,6 @@ async def test_send_react_interrupt(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"step": 1,
|
||||
"source": "loop",
|
||||
"writes": {
|
||||
@@ -3302,8 +3257,6 @@ async def test_send_react_interrupt(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"step": 2,
|
||||
"source": "update",
|
||||
"writes": {
|
||||
@@ -3391,8 +3344,6 @@ async def test_send_react_interrupt(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"step": 1,
|
||||
"source": "loop",
|
||||
"writes": {
|
||||
@@ -3485,8 +3436,6 @@ async def test_send_react_interrupt(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"step": 2,
|
||||
"source": "update",
|
||||
"writes": {
|
||||
@@ -3702,8 +3651,6 @@ async def test_send_react_interrupt_control(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"step": 1,
|
||||
"source": "loop",
|
||||
"writes": {
|
||||
@@ -3775,8 +3722,6 @@ async def test_send_react_interrupt_control(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"step": 2,
|
||||
"source": "update",
|
||||
"writes": {
|
||||
@@ -4726,8 +4671,6 @@ async def test_in_one_fan_out_state_graph_waiting_edge_custom_state_class(
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"parents": {},
|
||||
"source": "loop",
|
||||
"writes": {"qa": {"answer": "doc1,doc2,doc3,doc4"}},
|
||||
@@ -6202,8 +6145,6 @@ async def test_parent_command(checkpointer_name: str) -> None:
|
||||
}
|
||||
},
|
||||
metadata={
|
||||
"checkpoint_id": AnyStr(),
|
||||
"checkpoint_ns": "",
|
||||
"source": "loop",
|
||||
"writes": {
|
||||
"alice": {
|
||||
|
||||
Reference in New Issue
Block a user