From 2e004c1a1eb30a71293ccc916c6e3fd5c82c1a05 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 17 Sep 2023 02:11:52 +0200 Subject: [PATCH] `get_all_plugins` should use `Message.Encoder` for encoding the response. Some plugin information may include enums, tuples and other types that aren't serializable by the default JSON serializer. --- platypush/plugins/inspect/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platypush/plugins/inspect/__init__.py b/platypush/plugins/inspect/__init__.py index ad0f1492a..b8732ea77 100644 --- a/platypush/plugins/inspect/__init__.py +++ b/platypush/plugins/inspect/__init__.py @@ -12,6 +12,7 @@ from typing import Callable, Dict, Generator, Optional, Type, Union from platypush.backend import Backend from platypush.config import Config from platypush.plugins import Plugin, action +from platypush.message import Message from platypush.message.event import Event from platypush.message.response import Response from platypush.utils import ( @@ -314,7 +315,8 @@ class InspectPlugin(Plugin): { get_plugin_name_by_class(cls): dict(plugin) for cls, plugin in self._components_cache.get(Plugin, {}).items() - } + }, + cls=Message.Encoder, ) @action