Commit Graph
90 Commits
Author SHA1 Message Date
Nuno Campos c406aede96 Fix deadlock in SqliteStore
- If setup wasnt called separately _cursor() and setup() would deadlock
- The call to setup() in _cursor() should be outside the lock block, as setup() also acquires the lock and re-checks the setup flag
2025-06-27 08:57:35 -07:00
Nuno Campos a1c856c088 Reduce extraneous keys in checkpoint.metadata
- Leave it up to each checkpointer implementation to decide whether to merge in configurable/metadata (previously PregelLoop would do some of this always)
- Never copy over internal langgraph keys into checkpoint.metadata (these are redundant/misleading to include)
2025-06-17 17:40:18 -07:00
Nuno Campos 6dcff8a839 If FuturesDict callback has been GCed, don't call it 2025-06-17 13:47:47 -07:00
Nuno CamposandGitHub 1134017d07 Preparation for 0.5 release: langgraph-checkpoint (#5124)
Prepare langgraph-checkpoint for 0.5

- Given we have no upper bound on langgraph-checkpoint dep need to undo all changes in langgraph-checkpoint that might break previous versions of langgraph
2025-06-16 21:57:11 +00:00
Nuno Campos 5498893780 Restore compatibility with custom checkpointer classes created in prior versions
- Ensure existing custom checkpointer classes are compatible with new langgraph-checkpoint release
2025-06-13 16:29:55 -07:00
Sydney RunkleandGitHub 3ad061f0d7 serialize/deserialize pandas with pickle fallback (#5057) 2025-06-12 15:14:00 -04:00
Nuno CamposandGitHub 2e33c520a5 Support numpy array serialization in JsonPlusSerializer (#5035)
* Handle numpy Fortran arrays

* Lint

* Lint

* Lint
2025-06-10 01:17:28 +00:00
Nuno CamposandGitHub 67b1dc602e Update ormsgpack (#5034)
* Update ormsgpack

- Now supports bytearray/memoryview passthrough

* Lint
2025-06-10 00:30:58 +00:00
Sydney RunkleandGitHub 5e7566f4a3 lint: use pep 604 union syntax and pep 585 generic syntax (#4963)
* new union syntax

* fix test

* second round of conversions by injecting future annotations

* format + add top level makefile
2025-06-04 21:50:16 -04:00
Nuno Campos 4e8fbe4525 Remove Checkpoint.pending_sends
- Instead store sends in a Topic channel, removing the need to fetch sends as writes against the parent checkpoint
- Remove deprecated/unused functions in langgraph-checkpoint (will require bumping min range for langgraph-checkpoint in langgraph lib)
- Implement migration of old pending sends in langgraph-checkpoint-postgres
- Ensure parent config of `checkpoint_during=False` checkpoints always points to checkpoints that were also saved
2025-05-25 19:06:02 -07:00
William FHandGitHub 95f92069a7 sqlite: Add test for search with list filters (#4747) 2025-05-18 23:50:27 -07:00
William FHandGitHub 6b28319796 sqlite: update list_namespaces with max_depth (#4746)
sqlite: update on conflict
2025-05-18 23:27:06 -07:00
William FHandGitHub 725dd40fa7 Release sqlite store (#4737) 2025-05-17 21:49:03 -07:00
William FHandGitHub 025b634d98 SqliteStore (#3608) 2025-05-17 21:40:19 -07:00
Sydney RunkleandGitHub 228a08b966 ci: migrate to uv! (#4698)
* Migrate to `uv`
* Format `pyproject.toml` files properly
* Remove upper bounds on dependencies, and bounds on dev dependencies
(we should be using latest)
* Move to hatch for packaing

In the future we should:
* Set up dependabot / automate lockfile updates and tests
* Add tests for min compatible versions (I'll do this right after merge)
* Use dynamic versioning
* Bump `pydantic` to v2.11.4 in the lockfile, we have some tests failing
2025-05-15 17:39:14 -07:00
Nuno Campos 562d64bbb7 Lint 2025-05-09 12:07:59 -07:00
Nuno Campos 898f266f72 Overload clear method to delete all when called without args 2025-05-09 12:05:26 -07:00
Nuno Campos 83d2f93566 Lint 2025-05-08 16:57:21 -07:00
Nuno Campos 1a6395fd07 Move FileCache to sqlite package, add InMemoryCache 2025-05-08 16:50:36 -07:00
William FHandGitHub 4e05db8537 Release checkpoint-sqlite (#4509) 2025-05-01 22:42:07 -07:00
Sydney Runkle 6c6bfbc63a docstrings for checkpoint-sqlite 2025-05-01 13:40:21 -04:00
Sydney Runkle 6250b364f7 version bumps and locks 2025-04-28 17:39:20 -04:00
Sydney Runkle 5e9bea5134 no upper bounds for python 2025-04-25 17:45:54 -07:00
dependabot[bot]andGitHub c6971c6a58 build(deps): bump h11 from 0.14.0 to 0.16.0 in /libs/checkpoint-sqlite
Bumps [h11](https://github.com/python-hyper/h11) from 0.14.0 to 0.16.0.
- [Commits](https://github.com/python-hyper/h11/compare/v0.14.0...v0.16.0)

---
updated-dependencies:
- dependency-name: h11
  dependency-version: 0.16.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-24 17:46:01 +00:00
18a9ae45f3 Add delete_thread method to Checkpointer class (#4328)
- Deletes all data associated with a thread_id
- Implemented in InMemory, Sqlite and Postgres checkpointers

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-04-17 16:38:58 +00:00
dependabot[bot]andNuno Campos 8963bb2b68 Bump langchain-core from 0.3.0 to 0.3.15 in /libs/checkpoint-sqlite
Bumps [langchain-core](https://github.com/langchain-ai/langchain) from 0.3.0 to 0.3.15.
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-core==0.3.0...langchain-core==0.3.15)

---
updated-dependencies:
- dependency-name: langchain-core
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-02 15:50:49 -07:00
Nuno Campos aadbcb443a Bump 2025-03-24 09:03:23 -07:00
Nuno Campos a5dd181138 Update 2025-03-24 07:57:02 -07:00
11c71fef89 chore(docs): Improve documentation for AsyncSqliteSaver (#3858)
**Description:**
Make AsyncSqliteSaver examples workable.

**Issue:**
For "Usage within StateGraph" example,
SyntaxError: 'async with' outside async function

For "Raw usage" example
KeyError: 'checkpoint_ns' and KeyError: 'id'

**Dependencies:**
N/A

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-03-21 15:50:51 -04:00
8d33938173 Improve documentation string for SqliteSaver (#3857)
* Document that `check_same_thread` as an option when creating sqlite
connection.
* Document why it's OK to do that.

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-03-18 21:29:05 +00:00
Vadym BardaandGitHub a9800aab87 checkpoint-sqlite: release 2.0.6 (#3763) 2025-03-10 11:25:38 -04:00
Vadym BardaandGitHub 9bf3fc2d0f checkpoint-sqlite: commit transactions in AsyncSqliteSaver.aput_writes (#3762) 2025-03-10 15:14:20 +00:00
Theodore Ni a9cdb9c948 checkpoint-sqlite: update aiosqlite bounds 2025-02-20 14:51:51 -08:00
Nuno Campos 9786be1ff7 Update requirement 2025-02-14 19:01:50 -08:00
Nuno Campos 0415c02b40 Fix sqlite tests 2025-02-14 18:34:06 -08:00
Nuno Campos 7f4822931e Update tests 2025-02-14 18:24:48 -08:00
Nuno Campos 9706211aca Exclude complex values from checkpoint metadata 2025-02-14 17:35:14 -08:00
Vadym BardaandGitHub d45253cee8 checkpoint: release libraries (#3412) 2025-02-12 22:44:44 -05:00
Vadym BardaandGitHub 1377e3b6ba checkpoint: combine metadata when writing checkpoints (#3404) 2025-02-13 03:24:41 +00:00
Nuno Campos fc887f7a5d checkpoint-postgres/sqlite 2.0.12/2.0.3 2025-01-15 11:26:51 -08:00
Nuno Campos 31734fb792 Lint 2025-01-15 11:02:10 -08:00
Nuno Campos eed577ee2a Update sqlite signature 2025-01-15 10:58:46 -08:00
Vadym BardaandGitHub 74adbb744b bump checkpoint sqlite, postgres (#3021) 2025-01-14 14:41:22 -05:00
Vadym BardaandGitHub b989502c24 checkpoint-sqlite/postgres: handle calling .list on async checkpointer (#3019) 2025-01-14 19:06:11 +00:00
Phoenix LoganandGitHub aca67107c1 fix: make database saver classes inheritance-friendly (#2615)
Replace hardcoded database saver class names with `cls` in
`from_conn_string` factory methods to improve subclassing support

## Changes
* Replaced direct class instantiations with `cls(conn)` in
`from_conn_string` classmethods across all database implementations
* Updated both synchronous and asynchronous variants for DuckDB,
PostgreSQL, and SQLite savers

## Why
This refactor makes the database saver classes more extensible by
following Python's convention of using `cls` in class methods. This
enables proper inheritance patterns where subclasses can reuse the
factory methods without needing to override them. Previously, the
hardcoded class names would always instantiate the parent class, even
when called from a subclass.

## Testing
The change is backward compatible and doesn't alter existing
functionality. All existing tests should continue to pass as this is
purely a structural refactoring that preserves the current behavior
while improving extensibility.

## Notes
This PR addresses follow up on comments from #2518 - AsyncPostgresSaver
didn't need to be fixed but many of the other DB saver classes did.
2024-12-03 20:26:06 -08:00
Vadym BardaandGitHub 582fb11dd4 checkpoint-sqlite: release 2.0.1 (#2184) 2024-10-24 17:08:25 -04:00
Vadym BardaandGitHub def3e06b4a move py.typed to submodules for namespace packages (#2177) 2024-10-24 13:43:43 -04:00
Vadym BardaandGitHub d32386f849 checkpoint: add DuckDB checkpointer (#2145) 2024-10-23 21:11:03 +00:00
Vadym BardaandGitHub 4a45f6c99a langgraph, sqlite, postgres: update to use langgraph-checkpoint==2.0.0 (#1946) 2024-10-01 15:28:06 -04:00
Vadym BardaandGitHub 03be3b6567 docs: reorganize API refs (#1884) 2024-09-27 18:12:12 -04:00