Skip to content

Commit e5ced9b

Browse files
committed
Added DeprecationWarning to AsyncMongoDBSaver
1 parent e33c8e8 commit e5ced9b

File tree

1 file changed

+7
-0
lines changed
  • libs/langgraph-checkpoint-mongodb/langgraph/checkpoint/mongodb

1 file changed

+7
-0
lines changed

libs/langgraph-checkpoint-mongodb/langgraph/checkpoint/mongodb/aio.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import asyncio
44
import builtins
55
import sys
6+
import warnings
67
from collections.abc import AsyncIterator, Iterator, Sequence
78
from contextlib import asynccontextmanager
89
from datetime import datetime
@@ -84,6 +85,12 @@ def __init__(
8485
ttl: Optional[int] = None,
8586
**kwargs: Any,
8687
) -> None:
88+
warnings.warn(
89+
f"{self.__class__.__name__} is deprecated and will be removed in a future release. "
90+
"Please use the async methods of MongoDBSaver instead.",
91+
DeprecationWarning,
92+
stacklevel=2,
93+
)
8794
super().__init__()
8895
self.client = client
8996
self.db = self.client[db_name]

0 commit comments

Comments
 (0)