Skip to content

Commit

Permalink
Adding deprecation messages for the exposed in search module commands…
Browse files Browse the repository at this point in the history
…: FT.INFO, just for async client: FT.CONFIG GET and FT.CONFIG SET (#3499)
  • Loading branch information
petyaslavova authored Feb 7, 2025
1 parent 4d5e417 commit f76afb2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions redis/commands/search/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit f76afb2

Please sign in to comment.