diff --git a/libs/checkpoint-postgres/langgraph/checkpoint/postgres/__init__.py b/libs/checkpoint-postgres/langgraph/checkpoint/postgres/__init__.py index 3b33e0a9f..1c3426603 100644 --- a/libs/checkpoint-postgres/langgraph/checkpoint/postgres/__init__.py +++ b/libs/checkpoint-postgres/langgraph/checkpoint/postgres/__init__.py @@ -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 diff --git a/libs/checkpoint-postgres/langgraph/checkpoint/postgres/aio.py b/libs/checkpoint-postgres/langgraph/checkpoint/postgres/aio.py index 596ce1de5..a19b7bfc1 100644 --- a/libs/checkpoint-postgres/langgraph/checkpoint/postgres/aio.py +++ b/libs/checkpoint-postgres/langgraph/checkpoint/postgres/aio.py @@ -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 diff --git a/libs/checkpoint-postgres/langgraph/checkpoint/postgres/shallow.py b/libs/checkpoint-postgres/langgraph/checkpoint/postgres/shallow.py index decf25bfd..90e140b2c 100644 --- a/libs/checkpoint-postgres/langgraph/checkpoint/postgres/shallow.py +++ b/libs/checkpoint-postgres/langgraph/checkpoint/postgres/shallow.py @@ -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 diff --git a/libs/checkpoint-postgres/poetry.lock b/libs/checkpoint-postgres/poetry.lock index c6439bcb2..93cf19f28 100644 --- a/libs/checkpoint-postgres/poetry.lock +++ b/libs/checkpoint-postgres/poetry.lock @@ -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" @@ -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 = "ca18ea480430714e47685ff0f25da9990dbbdecd38e9c1a3ca41d42be7069067" diff --git a/libs/checkpoint-postgres/pyproject.toml b/libs/checkpoint-postgres/pyproject.toml index 32b56f089..869f802f3 100644 --- a/libs/checkpoint-postgres/pyproject.toml +++ b/libs/checkpoint-postgres/pyproject.toml @@ -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" @@ -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"] diff --git a/libs/checkpoint-postgres/tests/test_async.py b/libs/checkpoint-postgres/tests/test_async.py index 8c54e5787..2beffb3a5 100644 --- a/libs/checkpoint-postgres/tests/test_async.py +++ b/libs/checkpoint-postgres/tests/test_async.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], } diff --git a/libs/checkpoint-postgres/tests/test_sync.py b/libs/checkpoint-postgres/tests/test_sync.py index e0e60a938..b78f38e9a 100644 --- a/libs/checkpoint-postgres/tests/test_sync.py +++ b/libs/checkpoint-postgres/tests/test_sync.py @@ -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], } diff --git a/libs/checkpoint-sqlite/langgraph/checkpoint/sqlite/__init__.py b/libs/checkpoint-sqlite/langgraph/checkpoint/sqlite/__init__.py index 2587a70b4..71a098f75 100644 --- a/libs/checkpoint-sqlite/langgraph/checkpoint/sqlite/__init__.py +++ b/libs/checkpoint-sqlite/langgraph/checkpoint/sqlite/__init__.py @@ -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( diff --git a/libs/checkpoint-sqlite/langgraph/checkpoint/sqlite/aio.py b/libs/checkpoint-sqlite/langgraph/checkpoint/sqlite/aio.py index 338ce0e47..befa6cfbe 100644 --- a/libs/checkpoint-sqlite/langgraph/checkpoint/sqlite/aio.py +++ b/libs/checkpoint-sqlite/langgraph/checkpoint/sqlite/aio.py @@ -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, diff --git a/libs/checkpoint-sqlite/pyproject.toml b/libs/checkpoint-sqlite/pyproject.toml index 50150b471..1eeeeed3a 100644 --- a/libs/checkpoint-sqlite/pyproject.toml +++ b/libs/checkpoint-sqlite/pyproject.toml @@ -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" diff --git a/libs/checkpoint-sqlite/tests/test_aiosqlite.py b/libs/checkpoint-sqlite/tests/test_aiosqlite.py index dbb6e327d..4681a0b89 100644 --- a/libs/checkpoint-sqlite/tests/test_aiosqlite.py +++ b/libs/checkpoint-sqlite/tests/test_aiosqlite.py @@ -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, } diff --git a/libs/checkpoint-sqlite/tests/test_sqlite.py b/libs/checkpoint-sqlite/tests/test_sqlite.py index 39371c764..88b7027b4 100644 --- a/libs/checkpoint-sqlite/tests/test_sqlite.py +++ b/libs/checkpoint-sqlite/tests/test_sqlite.py @@ -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, } diff --git a/libs/checkpoint/langgraph/checkpoint/base/__init__.py b/libs/checkpoint/langgraph/checkpoint/base/__init__.py index 96b1d3cf7..ba9a69eed 100644 --- a/libs/checkpoint/langgraph/checkpoint/base/__init__.py +++ b/libs/checkpoint/langgraph/checkpoint/base/__init__.py @@ -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", +} diff --git a/libs/checkpoint/langgraph/checkpoint/memory/__init__.py b/libs/checkpoint/langgraph/checkpoint/memory/__init__.py index 855ced952..6eeb8867b 100644 --- a/libs/checkpoint/langgraph/checkpoint/memory/__init__.py +++ b/libs/checkpoint/langgraph/checkpoint/memory/__init__.py @@ -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 ) } diff --git a/libs/checkpoint/langgraph/store/base/batch.py b/libs/checkpoint/langgraph/store/base/batch.py index 1bf2ac79e..debf187b3 100644 --- a/libs/checkpoint/langgraph/store/base/batch.py +++ b/libs/checkpoint/langgraph/store/base/batch.py @@ -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, diff --git a/libs/checkpoint/pyproject.toml b/libs/checkpoint/pyproject.toml index 10ebf1a24..2f137faad 100644 --- a/libs/checkpoint/pyproject.toml +++ b/libs/checkpoint/pyproject.toml @@ -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" diff --git a/libs/checkpoint/tests/test_memory.py b/libs/checkpoint/tests/test_memory.py index c69872389..3c49219f9 100644 --- a/libs/checkpoint/tests/test_memory.py +++ b/libs/checkpoint/tests/test_memory.py @@ -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, } diff --git a/libs/langgraph/tests/test_large_cases.py b/libs/langgraph/tests/test_large_cases.py index d0fda301d..f562720b8 100644 --- a/libs/langgraph/tests/test_large_cases.py +++ b/libs/langgraph/tests/test_large_cases.py @@ -135,8 +135,6 @@ def test_invoke_two_processes_in_out_interrupt( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 6, @@ -158,8 +156,6 @@ def test_invoke_two_processes_in_out_interrupt( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 5, @@ -181,8 +177,6 @@ def test_invoke_two_processes_in_out_interrupt( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "input", "step": 4, @@ -204,8 +198,6 @@ def test_invoke_two_processes_in_out_interrupt( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 3, @@ -227,8 +219,6 @@ def test_invoke_two_processes_in_out_interrupt( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "input", "step": 2, @@ -250,8 +240,6 @@ def test_invoke_two_processes_in_out_interrupt( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 1, @@ -273,8 +261,6 @@ def test_invoke_two_processes_in_out_interrupt( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 0, @@ -296,7 +282,6 @@ def test_invoke_two_processes_in_out_interrupt( } }, metadata={ - "checkpoint_ns": "", "parents": {}, "source": "input", "step": -1, @@ -364,8 +349,6 @@ def test_fork_always_re_runs_nodes( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 5, @@ -387,8 +370,6 @@ def test_fork_always_re_runs_nodes( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 4, @@ -410,8 +391,6 @@ def test_fork_always_re_runs_nodes( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 3, @@ -433,8 +412,6 @@ def test_fork_always_re_runs_nodes( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 2, @@ -456,8 +433,6 @@ def test_fork_always_re_runs_nodes( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 1, @@ -479,8 +454,6 @@ def test_fork_always_re_runs_nodes( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 0, @@ -502,7 +475,6 @@ def test_fork_always_re_runs_nodes( } }, metadata={ - "checkpoint_ns": "", "parents": {}, "source": "input", "step": -1, @@ -787,8 +759,6 @@ def test_conditional_graph( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 0, @@ -853,8 +823,6 @@ def test_conditional_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 1, @@ -977,8 +945,6 @@ def test_conditional_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 4, @@ -1052,8 +1018,6 @@ def test_conditional_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 0, @@ -1112,8 +1076,6 @@ def test_conditional_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 1, @@ -1236,8 +1198,6 @@ def test_conditional_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 4, @@ -1311,8 +1271,6 @@ def test_conditional_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 0, @@ -1712,8 +1670,6 @@ def test_conditional_state_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 1, @@ -1767,8 +1723,6 @@ def test_conditional_state_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 2, @@ -1857,8 +1811,6 @@ def test_conditional_state_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 5, @@ -1920,8 +1872,6 @@ def test_conditional_state_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 1, @@ -1974,8 +1924,6 @@ def test_conditional_state_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 2, @@ -2062,8 +2010,6 @@ def test_conditional_state_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 5, @@ -2114,8 +2060,6 @@ def test_conditional_state_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 0, @@ -2158,8 +2102,6 @@ def test_conditional_state_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 1, @@ -2226,8 +2168,6 @@ def test_conditional_state_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 2, @@ -2306,8 +2246,6 @@ def test_conditional_state_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 1, @@ -2374,8 +2312,6 @@ def test_conditional_state_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 2, @@ -3114,8 +3050,6 @@ def test_state_graph_packets( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 1, @@ -3180,8 +3114,6 @@ def test_state_graph_packets( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 2, @@ -3295,8 +3227,6 @@ def test_state_graph_packets( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 4, @@ -3374,8 +3304,6 @@ def test_state_graph_packets( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 5, @@ -3455,8 +3383,6 @@ def test_state_graph_packets( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 1, @@ -3515,8 +3441,6 @@ def test_state_graph_packets( config=app_w_interrupt.checkpointer.get_tuple(config).config, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 2, @@ -3630,8 +3554,6 @@ def test_state_graph_packets( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 4, @@ -3707,8 +3629,6 @@ def test_state_graph_packets( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 5, @@ -3998,8 +3918,6 @@ def test_message_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 1, @@ -4051,8 +3969,6 @@ def test_message_graph( config=next_config, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 2, @@ -4146,8 +4062,6 @@ def test_message_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 4, @@ -4211,8 +4125,6 @@ def test_message_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 5, @@ -4276,8 +4188,6 @@ def test_message_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 1, @@ -4335,8 +4245,6 @@ def test_message_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 2, @@ -4430,8 +4338,6 @@ def test_message_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 4, @@ -4496,8 +4402,6 @@ def test_message_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 5, @@ -4550,8 +4454,6 @@ def test_message_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 6, @@ -4839,8 +4741,6 @@ def test_root_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 1, @@ -4892,8 +4792,6 @@ def test_root_graph( config=next_config, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 2, @@ -4988,8 +4886,6 @@ def test_root_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 4, @@ -5054,8 +4950,6 @@ def test_root_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 5, @@ -5119,8 +5013,6 @@ def test_root_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 1, @@ -5178,8 +5070,6 @@ def test_root_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 2, @@ -5274,8 +5164,6 @@ def test_root_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 4, @@ -5339,8 +5227,6 @@ def test_root_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 5, @@ -5393,8 +5279,6 @@ def test_root_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 6, @@ -5478,8 +5362,6 @@ def test_root_graph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 6, @@ -5840,8 +5722,6 @@ def test_dynamic_interrupt( if "shallow" not in checkpointer_name: assert [c.metadata for c in tool_two.checkpointer.list(thread1)] == [ { - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 0, @@ -5849,7 +5729,6 @@ def test_dynamic_interrupt( "thread_id": "1", }, { - "checkpoint_ns": "", "parents": {}, "source": "input", "step": -1, @@ -5884,8 +5763,6 @@ def test_dynamic_interrupt( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 0, @@ -5914,8 +5791,6 @@ def test_dynamic_interrupt( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 1, @@ -6024,8 +5899,6 @@ def test_copy_checkpoint( if "shallow" not in checkpointer_name: assert [c.metadata for c in tool_two.checkpointer.list(thread1)] == [ { - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 0, @@ -6033,7 +5906,6 @@ def test_copy_checkpoint( "thread_id": "1", }, { - "checkpoint_ns": "", "parents": {}, "source": "input", "step": -1, @@ -6074,8 +5946,6 @@ def test_copy_checkpoint( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 0, @@ -6123,8 +5993,6 @@ def test_copy_checkpoint( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "fork", "step": 1, @@ -6233,8 +6101,6 @@ def test_dynamic_interrupt_subgraph( ) ] == [ { - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 0, @@ -6242,7 +6108,6 @@ def test_dynamic_interrupt_subgraph( "thread_id": "1", }, { - "checkpoint_ns": "", "parents": {}, "source": "input", "step": -1, @@ -6283,8 +6148,6 @@ def test_dynamic_interrupt_subgraph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 0, @@ -6317,8 +6180,6 @@ def test_dynamic_interrupt_subgraph( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 1, @@ -6407,8 +6268,6 @@ def test_start_branch_then( if "shallow" not in checkpointer_name: assert [c.metadata for c in tool_two.checkpointer.list(thread1)] == [ { - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 0, @@ -6417,7 +6276,6 @@ def test_start_branch_then( "thread_id": "1", }, { - "checkpoint_ns": "", "parents": {}, "source": "input", "step": -1, @@ -6440,8 +6298,6 @@ def test_start_branch_then( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 0, @@ -6473,8 +6329,6 @@ def test_start_branch_then( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 1, @@ -6508,8 +6362,6 @@ def test_start_branch_then( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 0, @@ -6541,8 +6393,6 @@ def test_start_branch_then( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 1, @@ -6576,8 +6426,6 @@ def test_start_branch_then( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 0, @@ -6606,8 +6454,6 @@ def test_start_branch_then( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 1, @@ -6639,8 +6485,6 @@ def test_start_branch_then( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 2, @@ -7015,8 +6859,6 @@ def test_branch_then( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 1, @@ -7047,8 +6889,6 @@ def test_branch_then( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 3, @@ -7081,8 +6921,6 @@ def test_branch_then( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 1, @@ -7113,8 +6951,6 @@ def test_branch_then( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 3, @@ -7155,8 +6991,6 @@ def test_branch_then( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 2, @@ -7188,8 +7022,6 @@ def test_branch_then( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 3, @@ -7230,8 +7062,6 @@ def test_branch_then( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 1, @@ -7262,8 +7092,6 @@ def test_branch_then( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 3, @@ -7296,8 +7124,6 @@ def test_branch_then( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 1, @@ -7328,8 +7154,6 @@ def test_branch_then( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 3, @@ -7360,7 +7184,6 @@ def test_branch_then( }, created_at=AnyStr(), metadata={ - "checkpoint_ns": "", "parents": {}, "source": "update", "step": 0, @@ -7388,8 +7211,6 @@ def test_branch_then( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 1, @@ -7420,8 +7241,6 @@ def test_branch_then( }, created_at=AnyStr(), metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "step": 3, @@ -7558,8 +7377,6 @@ def test_send_dedupe_on_resume( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "source": "loop", "writes": {"3": ["3"]}, "thread_id": "1", @@ -7596,8 +7413,6 @@ def test_send_dedupe_on_resume( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "source": "loop", "writes": {"2": ["2|3"], "3": ["3"], "flaky": ["flaky|4"]}, "thread_id": "1", @@ -7641,8 +7456,6 @@ def test_send_dedupe_on_resume( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "source": "loop", "writes": { "2": [ @@ -7708,8 +7521,6 @@ def test_send_dedupe_on_resume( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "source": "loop", "writes": {"1": ["1"]}, "thread_id": "1", @@ -7765,8 +7576,6 @@ def test_send_dedupe_on_resume( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "source": "loop", "writes": None, "thread_id": "1", @@ -7804,7 +7613,6 @@ def test_send_dedupe_on_resume( } }, metadata={ - "checkpoint_ns": "", "source": "input", "writes": {"__start__": ["0"]}, "thread_id": "1", @@ -7908,8 +7716,6 @@ def test_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "writes": {"outer_1": {"my_key": "hi my value"}}, @@ -7961,8 +7767,6 @@ def test_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_map": AnyDict({"": AnyStr()}), "parents": { "": AnyStr(), }, @@ -8009,8 +7813,6 @@ def test_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "writes": {"outer_1": {"my_key": "hi my value"}}, @@ -8057,8 +7859,6 @@ def test_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "writes": {"outer_1": {"my_key": "hi my value"}}, @@ -8097,8 +7897,6 @@ def test_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "writes": None, @@ -8133,7 +7931,6 @@ def test_nested_graph_state( } }, metadata={ - "checkpoint_ns": "", "parents": {}, "source": "input", "writes": {"__start__": {"my_key": "my value"}}, @@ -8167,8 +7964,6 @@ def test_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_map": AnyDict({"": AnyStr()}), "source": "loop", "writes": { "inner_1": { @@ -8217,8 +8012,6 @@ def test_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_map": AnyDict({"": AnyStr()}), "source": "loop", "writes": None, "step": 0, @@ -8268,8 +8061,6 @@ def test_nested_graph_state( } }, metadata={ - "checkpoint_id": None, - "checkpoint_map": AnyDict({"": AnyStr()}), "source": "input", "writes": {"__start__": {"my_key": "hi my value"}}, "step": -1, @@ -8315,8 +8106,6 @@ def test_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "writes": { @@ -8353,8 +8142,6 @@ def test_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "writes": { @@ -8395,8 +8182,6 @@ def test_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "writes": {"inner": {"my_key": "hi my value here and there"}}, @@ -8434,8 +8219,6 @@ def test_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "writes": {"outer_1": {"my_key": "hi my value"}}, @@ -8470,8 +8253,6 @@ def test_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "writes": None, @@ -8506,7 +8287,6 @@ def test_nested_graph_state( } }, metadata={ - "checkpoint_ns": "", "parents": {}, "source": "input", "writes": {"__start__": {"my_key": "my value"}}, @@ -8617,8 +8397,6 @@ def test_doubly_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "writes": {"parent_1": {"my_key": "hi my value"}}, @@ -8665,8 +8443,6 @@ def test_doubly_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {"": AnyStr()}, "source": "loop", "writes": None, @@ -8713,8 +8489,6 @@ def test_doubly_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_map": AnyDict({"": AnyStr(), AnyStr("child:"): AnyStr()}), "parents": AnyDict( { "": AnyStr(), @@ -8794,10 +8568,6 @@ def test_doubly_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_map": AnyDict( - {"": AnyStr(), AnyStr("child:"): AnyStr()} - ), "parents": AnyDict( { "": AnyStr(), @@ -8856,8 +8626,6 @@ def test_doubly_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_map": AnyDict({"": AnyStr()}), "parents": {"": AnyStr()}, "source": "loop", "writes": None, @@ -8897,8 +8665,6 @@ def test_doubly_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "writes": {"parent_1": {"my_key": "hi my value"}}, @@ -8944,8 +8710,6 @@ def test_doubly_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "writes": { @@ -8987,8 +8751,6 @@ def test_doubly_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "writes": { @@ -9017,8 +8779,6 @@ def test_doubly_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "source": "loop", "writes": {"child": {"my_key": "hi my value here and there"}}, "step": 2, @@ -9067,8 +8827,6 @@ def test_doubly_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "parents": {}, "source": "loop", "writes": {"parent_1": {"my_key": "hi my value"}}, @@ -9095,8 +8853,6 @@ def test_doubly_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "source": "loop", "writes": None, "step": 0, @@ -9131,7 +8887,6 @@ def test_doubly_nested_graph_state( } }, metadata={ - "checkpoint_ns": "", "source": "input", "writes": {"__start__": {"my_key": "my value"}}, "step": -1, @@ -9167,8 +8922,6 @@ def test_doubly_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_map": AnyDict({"": AnyStr()}), "source": "loop", "writes": {"child_1": {"my_key": "hi my value here and there"}}, "step": 1, @@ -9208,8 +8961,6 @@ def test_doubly_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_map": AnyDict({"": AnyStr()}), "source": "loop", "writes": None, "step": 0, @@ -9262,8 +9013,6 @@ def test_doubly_nested_graph_state( } }, metadata={ - "checkpoint_id": None, - "checkpoint_map": AnyDict({"": AnyStr()}), "source": "input", "writes": {"__start__": {"my_key": "hi my value"}}, "step": -1, @@ -9309,8 +9058,6 @@ def test_doubly_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_map": AnyDict({"": AnyStr(), AnyStr("child1:"): AnyStr()}), "source": "loop", "writes": {"grandchild_2": {"my_key": "hi my value here and there"}}, "step": 2, @@ -9366,8 +9113,6 @@ def test_doubly_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_map": AnyDict({"": AnyStr(), AnyStr("child1:"): AnyStr()}), "source": "loop", "writes": {"grandchild_1": {"my_key": "hi my value here"}}, "step": 1, @@ -9430,8 +9175,6 @@ def test_doubly_nested_graph_state( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_map": AnyDict({"": AnyStr(), AnyStr("child1:"): AnyStr()}), "source": "loop", "writes": None, "step": 0, @@ -9494,8 +9237,6 @@ def test_doubly_nested_graph_state( } }, metadata={ - "checkpoint_id": None, - "checkpoint_map": AnyDict({"": AnyStr(), AnyStr("child1:"): AnyStr()}), "source": "input", "writes": {"__start__": {"my_key": "hi my value"}}, "step": -1, @@ -9761,8 +9502,6 @@ def test_send_react_interrupt( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "step": 1, "source": "loop", "writes": { @@ -9834,8 +9573,6 @@ def test_send_react_interrupt( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "step": 2, "source": "update", "writes": { @@ -9923,8 +9660,6 @@ def test_send_react_interrupt( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "step": 1, "source": "loop", "writes": { @@ -10019,8 +9754,6 @@ def test_send_react_interrupt( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "step": 2, "source": "update", "writes": { @@ -10237,8 +9970,6 @@ def test_send_react_interrupt_control( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "step": 1, "source": "loop", "writes": { @@ -10310,8 +10041,6 @@ def test_send_react_interrupt_control( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "step": 2, "source": "update", "writes": { @@ -10503,8 +10232,6 @@ def test_weather_subgraph( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "source": "loop", "writes": {"router_node": {"route": "weather"}}, "step": 1, @@ -10597,8 +10324,6 @@ def test_weather_subgraph( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "source": "loop", "writes": {"router_node": {"route": "weather"}}, "step": 1, @@ -10644,8 +10369,6 @@ def test_weather_subgraph( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_map": AnyDict({"": AnyStr()}), "source": "loop", "writes": {"model_node": {"city": "San Francisco"}}, "step": 1, @@ -10709,8 +10432,6 @@ def test_weather_subgraph( } }, metadata={ - "checkpoint_id": AnyStr(), - "checkpoint_ns": "", "source": "loop", "writes": {"router_node": {"route": "weather"}}, "step": 1, @@ -10757,7 +10478,6 @@ def test_weather_subgraph( } }, metadata={ - "checkpoint_map": AnyDict({"": AnyStr()}), "step": 2, "source": "update", "writes": { diff --git a/libs/langgraph/tests/test_large_cases_async.py b/libs/langgraph/tests/test_large_cases_async.py index 28e76832c..250cbfe72 100644 --- a/libs/langgraph/tests/test_large_cases_async.py +++ b/libs/langgraph/tests/test_large_cases_async.py @@ -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": { diff --git a/libs/langgraph/tests/test_prebuilt.py b/libs/langgraph/tests/test_prebuilt.py index 9d662ce14..b0a19d530 100644 --- a/libs/langgraph/tests/test_prebuilt.py +++ b/libs/langgraph/tests/test_prebuilt.py @@ -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")]}}, diff --git a/libs/langgraph/tests/test_pregel.py b/libs/langgraph/tests/test_pregel.py index d8a3b088a..7e15db62f 100644 --- a/libs/langgraph/tests/test_pregel.py +++ b/libs/langgraph/tests/test_pregel.py @@ -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": { diff --git a/libs/langgraph/tests/test_pregel_async.py b/libs/langgraph/tests/test_pregel_async.py index dc91fc2e9..f369a7aa7 100644 --- a/libs/langgraph/tests/test_pregel_async.py +++ b/libs/langgraph/tests/test_pregel_async.py @@ -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": {