langgraph-checkpoint-postgres 2.0.10__tar.gz → 2.0.11__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 (14) hide show
  1. {langgraph_checkpoint_postgres-2.0.10 → langgraph_checkpoint_postgres-2.0.11}/PKG-INFO +1 -1
  2. {langgraph_checkpoint_postgres-2.0.10 → langgraph_checkpoint_postgres-2.0.11}/langgraph/checkpoint/postgres/aio.py +13 -1
  3. {langgraph_checkpoint_postgres-2.0.10 → langgraph_checkpoint_postgres-2.0.11}/pyproject.toml +1 -1
  4. {langgraph_checkpoint_postgres-2.0.10 → langgraph_checkpoint_postgres-2.0.11}/README.md +0 -0
  5. {langgraph_checkpoint_postgres-2.0.10 → langgraph_checkpoint_postgres-2.0.11}/langgraph/checkpoint/postgres/__init__.py +0 -0
  6. {langgraph_checkpoint_postgres-2.0.10 → langgraph_checkpoint_postgres-2.0.11}/langgraph/checkpoint/postgres/_ainternal.py +0 -0
  7. {langgraph_checkpoint_postgres-2.0.10 → langgraph_checkpoint_postgres-2.0.11}/langgraph/checkpoint/postgres/_internal.py +0 -0
  8. {langgraph_checkpoint_postgres-2.0.10 → langgraph_checkpoint_postgres-2.0.11}/langgraph/checkpoint/postgres/base.py +0 -0
  9. {langgraph_checkpoint_postgres-2.0.10 → langgraph_checkpoint_postgres-2.0.11}/langgraph/checkpoint/postgres/py.typed +0 -0
  10. {langgraph_checkpoint_postgres-2.0.10 → langgraph_checkpoint_postgres-2.0.11}/langgraph/checkpoint/postgres/shallow.py +0 -0
  11. {langgraph_checkpoint_postgres-2.0.10 → langgraph_checkpoint_postgres-2.0.11}/langgraph/store/postgres/__init__.py +0 -0
  12. {langgraph_checkpoint_postgres-2.0.10 → langgraph_checkpoint_postgres-2.0.11}/langgraph/store/postgres/aio.py +0 -0
  13. {langgraph_checkpoint_postgres-2.0.10 → langgraph_checkpoint_postgres-2.0.11}/langgraph/store/postgres/base.py +0 -0
  14. {langgraph_checkpoint_postgres-2.0.10 → langgraph_checkpoint_postgres-2.0.11}/langgraph/store/postgres/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: langgraph-checkpoint-postgres
3
- Version: 2.0.10
3
+ Version: 2.0.11
4
4
  Summary: Library with a Postgres implementation of LangGraph checkpoint saver.
5
5
  Home-page: https://www.github.com/langchain-ai/langgraph
6
6
  License: MIT
@@ -380,6 +380,18 @@ class AsyncPostgresSaver(BasePostgresSaver):
380
380
  Yields:
381
381
  Iterator[CheckpointTuple]: An iterator of matching checkpoint tuples.
382
382
  """
383
+ try:
384
+ # check if we are in the main thread, only bg threads can block
385
+ # we don't check in other methods to avoid the overhead
386
+ if asyncio.get_running_loop() is self.loop:
387
+ raise asyncio.InvalidStateError(
388
+ "Synchronous calls to AsyncSqliteSaver are only allowed from a "
389
+ "different thread. From the main thread, use the async interface. "
390
+ "For example, use `checkpointer.alist(...)` or `await "
391
+ "graph.ainvoke(...)`."
392
+ )
393
+ except RuntimeError:
394
+ pass
383
395
  aiter_ = self.alist(config, filter=filter, before=before, limit=limit)
384
396
  while True:
385
397
  try:
@@ -410,7 +422,7 @@ class AsyncPostgresSaver(BasePostgresSaver):
410
422
  if asyncio.get_running_loop() is self.loop:
411
423
  raise asyncio.InvalidStateError(
412
424
  "Synchronous calls to AsyncPostgresSaver are only allowed from a "
413
- "different thread. From the main thread, use the async interface."
425
+ "different thread. From the main thread, use the async interface. "
414
426
  "For example, use `await checkpointer.aget_tuple(...)` or `await "
415
427
  "graph.ainvoke(...)`."
416
428
  )
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "langgraph-checkpoint-postgres"
3
- version = "2.0.10"
3
+ version = "2.0.11"
4
4
  description = "Library with a Postgres implementation of LangGraph checkpoint saver."
5
5
  authors = []
6
6
  license = "MIT"