diff --git a/coredis/modules/base.py b/coredis/modules/base.py index 84c4ce6d..2e33218d 100644 --- a/coredis/modules/base.py +++ b/coredis/modules/base.py @@ -95,7 +95,7 @@ def module_command( command_name, group, version.Version(version_introduced) if version_introduced else None, - None, + version.Version(version_deprecated) if version_deprecated else None, arguments, cluster or ClusterCommandConfig(), cache_config, @@ -135,8 +135,10 @@ async def wrapped(*args: P.args, **kwargs: P.kwargs) -> R: {module.FULL_NAME} command documentation: {redis_command_link(command_name)} """ if ( - version_introduced and version_introduced != "1.0.0" - ) or command_details.arguments: + (version_introduced and version_introduced != "1.0.0") + or version_deprecated + or command_details.arguments + ): wrapped.__doc__ += """ Compatibility: """ @@ -145,6 +147,10 @@ async def wrapped(*args: P.args, **kwargs: P.kwargs) -> R: wrapped.__doc__ += f""" - New in {module.FULL_NAME} version: `{version_introduced}` """ + if version_deprecated: + wrapped.__doc__ += f""" +- Deprecated in {module.FULL_NAME} version: `{version_deprecated}` + """ if command_details.arguments: for argument, min_version in command_details.arguments.items(): wrapped.__doc__ += f""" diff --git a/coredis/modules/json.py b/coredis/modules/json.py index 6ea5672b..6affade8 100644 --- a/coredis/modules/json.py +++ b/coredis/modules/json.py @@ -633,6 +633,7 @@ async def type( CommandName.JSON_RESP, group=COMMAND_GROUP, version_introduced="1.0.0", + version_deprecated="2.6.0", module=MODULE, flags={CommandFlag.READONLY}, )