langgraph-checkpoint-sqlite 3.0.1__tar.gz → 3.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. langgraph_checkpoint_sqlite-3.0.3/.gitignore +102 -0
  2. {langgraph_checkpoint_sqlite-3.0.1 → langgraph_checkpoint_sqlite-3.0.3}/PKG-INFO +3 -3
  3. {langgraph_checkpoint_sqlite-3.0.1 → langgraph_checkpoint_sqlite-3.0.3}/langgraph/checkpoint/sqlite/aio.py +22 -2
  4. {langgraph_checkpoint_sqlite-3.0.1 → langgraph_checkpoint_sqlite-3.0.3}/langgraph/store/sqlite/base.py +2 -1
  5. {langgraph_checkpoint_sqlite-3.0.1 → langgraph_checkpoint_sqlite-3.0.3}/pyproject.toml +3 -3
  6. langgraph_checkpoint_sqlite-3.0.3/uv.lock +1278 -0
  7. langgraph_checkpoint_sqlite-3.0.1/.gitignore +0 -184
  8. langgraph_checkpoint_sqlite-3.0.1/uv.lock +0 -1137
  9. {langgraph_checkpoint_sqlite-3.0.1 → langgraph_checkpoint_sqlite-3.0.3}/LICENSE +0 -0
  10. {langgraph_checkpoint_sqlite-3.0.1 → langgraph_checkpoint_sqlite-3.0.3}/Makefile +0 -0
  11. {langgraph_checkpoint_sqlite-3.0.1 → langgraph_checkpoint_sqlite-3.0.3}/README.md +0 -0
  12. {langgraph_checkpoint_sqlite-3.0.1 → langgraph_checkpoint_sqlite-3.0.3}/langgraph/cache/sqlite/__init__.py +0 -0
  13. {langgraph_checkpoint_sqlite-3.0.1 → langgraph_checkpoint_sqlite-3.0.3}/langgraph/checkpoint/sqlite/__init__.py +0 -0
  14. {langgraph_checkpoint_sqlite-3.0.1 → langgraph_checkpoint_sqlite-3.0.3}/langgraph/checkpoint/sqlite/py.typed +0 -0
  15. {langgraph_checkpoint_sqlite-3.0.1 → langgraph_checkpoint_sqlite-3.0.3}/langgraph/checkpoint/sqlite/utils.py +0 -0
  16. {langgraph_checkpoint_sqlite-3.0.1 → langgraph_checkpoint_sqlite-3.0.3}/langgraph/store/sqlite/__init__.py +0 -0
  17. {langgraph_checkpoint_sqlite-3.0.1 → langgraph_checkpoint_sqlite-3.0.3}/langgraph/store/sqlite/aio.py +0 -0
  18. {langgraph_checkpoint_sqlite-3.0.1 → langgraph_checkpoint_sqlite-3.0.3}/tests/__init__.py +0 -0
  19. {langgraph_checkpoint_sqlite-3.0.1 → langgraph_checkpoint_sqlite-3.0.3}/tests/test_aiosqlite.py +0 -0
  20. {langgraph_checkpoint_sqlite-3.0.1 → langgraph_checkpoint_sqlite-3.0.3}/tests/test_async_store.py +0 -0
  21. {langgraph_checkpoint_sqlite-3.0.1 → langgraph_checkpoint_sqlite-3.0.3}/tests/test_sqlite.py +0 -0
  22. {langgraph_checkpoint_sqlite-3.0.1 → langgraph_checkpoint_sqlite-3.0.3}/tests/test_store.py +0 -0
  23. {langgraph_checkpoint_sqlite-3.0.1 → langgraph_checkpoint_sqlite-3.0.3}/tests/test_ttl.py +0 -0
@@ -0,0 +1,102 @@
1
+ .vs/
2
+ .vscode/
3
+ .idea/
4
+ # Byte-compiled / optimized / DLL files
5
+ __pycache__/
6
+ *.py[cod]
7
+ *$py.class
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Django stuff:
55
+ *.log
56
+ local_settings.py
57
+ db.sqlite3
58
+ db.sqlite3-journal
59
+
60
+ # PyBuilder
61
+ target/
62
+
63
+ # Jupyter Notebook
64
+ .ipynb_checkpoints
65
+ notebooks/
66
+
67
+ # IPython
68
+ profile_default/
69
+ ipython_config.py
70
+
71
+ # pyenv
72
+ .python-version
73
+
74
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
75
+ __pypackages__/
76
+
77
+ # Environments
78
+ .env
79
+ .envrc
80
+ .venv
81
+ .venvs
82
+ env/
83
+ venv/
84
+ ENV/
85
+ env.bak/
86
+ venv.bak/
87
+
88
+ # mypy
89
+ .mypy_cache/
90
+ .dmypy.json
91
+ dmypy.json
92
+
93
+ # Pyre type checker
94
+ .pyre/
95
+
96
+ # macOS display setting files
97
+ .DS_Store
98
+
99
+ .vercel
100
+ .turbo
101
+ .editorconfig
102
+ .scratch
@@ -1,16 +1,16 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langgraph-checkpoint-sqlite
3
- Version: 3.0.1
3
+ Version: 3.0.3
4
4
  Summary: Library with a SQLite implementation of LangGraph checkpoint saver.
5
5
  Project-URL: Source, https://github.com/langchain-ai/langgraph/tree/main/libs/checkpoint-sqlite
6
- Project-URL: Twitter, https://x.com/LangChainAI
6
+ Project-URL: Twitter, https://x.com/LangChain
7
7
  Project-URL: Slack, https://www.langchain.com/join-community
8
8
  Project-URL: Reddit, https://www.reddit.com/r/LangChain/
9
9
  License-Expression: MIT
10
10
  License-File: LICENSE
11
11
  Requires-Python: >=3.10
12
12
  Requires-Dist: aiosqlite>=0.20
13
- Requires-Dist: langgraph-checkpoint<4.0.0,>=3
13
+ Requires-Dist: langgraph-checkpoint<5.0.0,>=3
14
14
  Requires-Dist: sqlite-vec>=0.1.6
15
15
  Description-Content-Type: text/markdown
16
16
 
@@ -3,6 +3,7 @@ from __future__ import annotations
3
3
  import asyncio
4
4
  import json
5
5
  import random
6
+ import threading
6
7
  from collections.abc import AsyncIterator, Callable, Iterator, Sequence
7
8
  from contextlib import asynccontextmanager
8
9
  from typing import Any, TypeVar, cast
@@ -281,8 +282,7 @@ class AsyncSqliteSaver(BaseCheckpointSaver[str]):
281
282
  async with self.lock:
282
283
  if self.is_setup:
283
284
  return
284
- if not self.conn.is_alive():
285
- await self.conn
285
+ await _ensure_connected(self.conn)
286
286
  async with self.conn.executescript(
287
287
  """
288
288
  PRAGMA journal_mode=WAL;
@@ -609,3 +609,23 @@ class AsyncSqliteSaver(BaseCheckpointSaver[str]):
609
609
  next_v = current_v + 1
610
610
  next_h = random.random()
611
611
  return f"{next_v:032}.{next_h:016}"
612
+
613
+
614
+ async def _ensure_connected(conn: aiosqlite.Connection) -> None:
615
+ if not _CONN_STARTED_CHECK(conn):
616
+ await conn
617
+
618
+
619
+ def _build_conn_started_check() -> Callable[[aiosqlite.Connection], bool]:
620
+ is_alive = getattr(aiosqlite.Connection, "is_alive", None)
621
+ if callable(is_alive):
622
+ return lambda conn: conn.is_alive() # type: ignore[attr-defined]
623
+
624
+ def _started(conn: aiosqlite.Connection) -> bool:
625
+ thread: threading.Thread | None = getattr(conn, "_thread", None)
626
+ return False if thread is None else thread.is_alive()
627
+
628
+ return _started
629
+
630
+
631
+ _CONN_STARTED_CHECK = _build_conn_started_check()
@@ -722,7 +722,8 @@ class SqliteStore(BaseSqliteStore, BaseStore):
722
722
  item = store.get(("users", "123"), "prefs")
723
723
  ```
724
724
 
725
- Or using the convenient from_conn_string helper:
725
+ Or using the convenient `from_conn_string` helper:
726
+
726
727
  ```python
727
728
  from langgraph.store.sqlite import SqliteStore
728
729
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "langgraph-checkpoint-sqlite"
7
- version = "3.0.1"
7
+ version = "3.0.3"
8
8
  description = "Library with a SQLite implementation of LangGraph checkpoint saver."
9
9
  authors = []
10
10
  requires-python = ">=3.10"
@@ -12,14 +12,14 @@ readme = "README.md"
12
12
  license = "MIT"
13
13
  license-files = ['LICENSE']
14
14
  dependencies = [
15
- "langgraph-checkpoint>=3,<4.0.0",
15
+ "langgraph-checkpoint>=3,<5.0.0",
16
16
  "aiosqlite>=0.20",
17
17
  "sqlite-vec>=0.1.6",
18
18
  ]
19
19
 
20
20
  [project.urls]
21
21
  Source = "https://github.com/langchain-ai/langgraph/tree/main/libs/checkpoint-sqlite"
22
- Twitter = "https://x.com/LangChainAI"
22
+ Twitter = "https://x.com/LangChain"
23
23
  Slack = "https://www.langchain.com/join-community"
24
24
  Reddit = "https://www.reddit.com/r/LangChain/"
25
25