From a96737979665006db94812e653d63b13598b5844 Mon Sep 17 00:00:00 2001 From: Petya Slavova Date: Fri, 7 Feb 2025 11:55:53 +0200 Subject: [PATCH] Adding deprecation messages for the exposed in search module commands: FT.INFO, just for async client: FT.CONFIG GET and FT.CONFIG SET --- redis/commands/search/commands.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/redis/commands/search/commands.py b/redis/commands/search/commands.py index 9d9ef42415..2158c01ba9 100644 --- a/redis/commands/search/commands.py +++ b/redis/commands/search/commands.py @@ -442,6 +442,10 @@ def get(self, *ids): return self.execute_command(MGET_CMD, self.index_name, *ids) + @deprecated_function( + version="8.0.0", + reason="deprecated since Redis 8.0, call info from core module instead", + ) def info(self): """ Get info an stats about the the current index, including the number of @@ -912,6 +916,10 @@ def syndump(self): class AsyncSearchCommands(SearchCommands): + @deprecated_function( + version="8.0.0", + reason="deprecated since Redis 8.0, call info from core module instead", + ) async def info(self): """ Get info an stats about the the current index, including the number of @@ -1015,6 +1023,10 @@ async def spellcheck(self, query, distance=None, include=None, exclude=None): return self._parse_results(SPELLCHECK_CMD, res) + @deprecated_function( + version="8.0.0", + reason="deprecated since Redis 8.0, call config_set from core module instead", + ) async def config_set(self, option: str, value: str) -> bool: """Set runtime configuration option. @@ -1029,6 +1041,10 @@ async def config_set(self, option: str, value: str) -> bool: raw = await self.execute_command(*cmd) return raw == "OK" + @deprecated_function( + version="8.0.0", + reason="deprecated since Redis 8.0, call config_get from core module instead", + ) async def config_get(self, option: str) -> str: """Get runtime configuration option value.