From 4f2c53b8d4a619cbeb1ea09f756573a75db22755 Mon Sep 17 00:00:00 2001 From: Disha Prakash Date: Thu, 14 Aug 2025 12:09:00 +0000 Subject: [PATCH] chore: Add deprecation warning for PGVector --- langchain_postgres/vectorstores.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/langchain_postgres/vectorstores.py b/langchain_postgres/vectorstores.py index a3743e4b..3ca99500 100644 --- a/langchain_postgres/vectorstores.py +++ b/langchain_postgres/vectorstores.py @@ -429,6 +429,13 @@ def __init__( self._async_engine: Optional[AsyncEngine] = None self._async_init = False + warnings.warn( + "PGVector is being deprecated and will be removed in the future. " + "Please migrate to PGVectorStore. " + "Refer to the migration guide at [https://github.com/langchain-ai/langchain-postgres/blob/main/examples/migrate_pgvector_to_pgvectorstore.md] for details.", + PendingDeprecationWarning, + ) + if isinstance(connection, str): if async_mode: self._async_engine = create_async_engine(