|
2 | 2 | from json import JSONDecodeError, loads
|
3 | 3 | from typing import Dict, List, Optional, Union
|
4 | 4 |
|
5 |
| -from deprecated import deprecated |
6 |
| - |
7 | 5 | from redis.exceptions import DataError
|
| 6 | +from redis.utils import deprecated_function |
8 | 7 |
|
9 | 8 | from ._util import JsonType
|
10 | 9 | from .decoders import decode_dict_keys
|
@@ -137,7 +136,7 @@ def numincrby(self, name: str, path: str, number: int) -> str:
|
137 | 136 | "JSON.NUMINCRBY", name, str(path), self._encode(number)
|
138 | 137 | )
|
139 | 138 |
|
140 |
| - @deprecated(version="4.0.0", reason="deprecated since redisjson 1.0.0") |
| 139 | + @deprecated_function(version="4.0.0", reason="deprecated since redisjson 1.0.0") |
141 | 140 | def nummultby(self, name: str, path: str, number: int) -> str:
|
142 | 141 | """Multiply the numeric (integer or floating point) JSON value under
|
143 | 142 | ``path`` at key ``name`` with the provided ``number``.
|
@@ -368,19 +367,19 @@ def debug(
|
368 | 367 | pieces.append(str(path))
|
369 | 368 | return self.execute_command("JSON.DEBUG", *pieces)
|
370 | 369 |
|
371 |
| - @deprecated( |
| 370 | + @deprecated_function( |
372 | 371 | version="4.0.0", reason="redisjson-py supported this, call get directly."
|
373 | 372 | )
|
374 | 373 | def jsonget(self, *args, **kwargs):
|
375 | 374 | return self.get(*args, **kwargs)
|
376 | 375 |
|
377 |
| - @deprecated( |
| 376 | + @deprecated_function( |
378 | 377 | version="4.0.0", reason="redisjson-py supported this, call get directly."
|
379 | 378 | )
|
380 | 379 | def jsonmget(self, *args, **kwargs):
|
381 | 380 | return self.mget(*args, **kwargs)
|
382 | 381 |
|
383 |
| - @deprecated( |
| 382 | + @deprecated_function( |
384 | 383 | version="4.0.0", reason="redisjson-py supported this, call get directly."
|
385 | 384 | )
|
386 | 385 | def jsonset(self, *args, **kwargs):
|
|
0 commit comments