From 87d828a1b0e988303b911a3a4800a0c7cddcd46f Mon Sep 17 00:00:00 2001 From: Neuro Assassin <42872277+NeuroAssassin@users.noreply.github.com> Date: Mon, 25 May 2020 15:26:46 -0400 Subject: [PATCH] [Docs] Add information about provisional status of RPC (#3862) --- docs/framework_rpc.rst | 4 ++++ docs/version_guarantees.rst | 2 ++ redbot/core/rpc.py | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/docs/framework_rpc.rst b/docs/framework_rpc.rst index 5d69fadbc..ba3043d37 100644 --- a/docs/framework_rpc.rst +++ b/docs/framework_rpc.rst @@ -4,6 +4,10 @@ RPC === +.. important:: + + RPC support is included in Red on a provisional basis. Backwards incompatible changes (up to and including removal of the RPC) may occur if deemed necessary. + V3 comes default with an internal RPC server that may be used to remotely control the bot in various ways. Cogs must register functions to be exposed to RPC clients. Each of those functions must only take JSON serializable parameters and must return JSON serializable objects. diff --git a/docs/version_guarantees.rst b/docs/version_guarantees.rst index 247fe6a83..5d5258e50 100644 --- a/docs/version_guarantees.rst +++ b/docs/version_guarantees.rst @@ -20,6 +20,8 @@ which is not private (even if not documented) should not break without notice. Anything in the ``redbot.cogs`` module or any of it's submodules is specifically excluded from being guaranteed. +Any RPC method exposed by Red may break without notice. + If you would like something in here to be guaranteed, open an issue making a case for it to be moved. diff --git a/redbot/core/rpc.py b/redbot/core/rpc.py index 658412876..bb81e98af 100644 --- a/redbot/core/rpc.py +++ b/redbot/core/rpc.py @@ -127,6 +127,9 @@ class RPCMixin: All parameters to RPC handler methods must be JSON serializable objects. The return value of handler methods must also be JSON serializable. + .. important:: + RPC support is included in Red on a provisional basis. Backwards incompatible changes (up to and including removal of the RPC) may occur if deemed necessary. + Parameters ---------- method : coroutine @@ -148,6 +151,9 @@ class RPCMixin: This will be called automatically for you on cog unload and will pass silently if the method is not previously registered. + .. important:: + RPC support is included in Red on a provisional basis. Backwards incompatible changes (up to and including removal of the RPC) may occur if deemed necessary. + Parameters ---------- method : coroutine