PluginManifest.__init__ initializes self._data = {}. Since _update_from_json only handles ModelObject, ModelCollection, ModelDictionary, and list for protected attributes, _data is silently skipped during deserialization.
# plugin_manifest.py
self._data = {} # ← plain dict, invisible to _update_from_json
As a result, Plugin.data always returns {} after get_object_model(), even when the JSON payload contains plugin data.
Suggested fix:
Change the initialization to ModelDictionary(False):
self._data = ModelDictionary(False)
This makes is_model_object(_data) return True, so _update_from_json will call update_from_json() on it and populate the data correctly.
https://github.com/Duet3D/dsf-python/blob/a9e0de43ed93cafa3610f06091e0bf0bbf8eb925/src/dsf/object_model/plugins/plugin_manifest.py#L14C9-L14C24
import re
from typing import List
from .sbc_permissions import SbcPermissions
from ..model_object import ModelObject
from ..model_dictionary import ModelDictionary
class PluginManifest(ModelObject):
"""Information about a third-party plugin"""
def __init__(self):
super(PluginManifest, self).__init__()
self._author = None
self._data = ModelDictionary(False)
self._dwc_dependencies = []
self._dwc_version = None
self._homepage = None
self._id = None
self._license = "LGPL-3.0-or-later"
self._name = None
self._rrf_version = None
self._sbc_auto_restart = False
self._sbc_config_files = []
self._sbc_dsf_version = None
self._sbc_executable = None
self._sbc_executable_arguments = []
self._sbc_extra_executables = []
self._sbc_output_redirected = None
self._sbc_package_dependencies = []
self._sbc_permissions = [] # Use a list instead of a set to keep insertion order (useful for json serialising)
self._sbc_plugin_dependencies = []
self._sbc_python_dependencies = []
self._sbc_required = None
self._tags = []
self._version = "1.0.0"
PluginManifest.__init__initializesself._data = {}. Since_update_from_jsononly handlesModelObject,ModelCollection,ModelDictionary, andlistfor protected attributes,_datais silently skipped during deserialization.As a result,
Plugin.dataalways returns{}afterget_object_model(), even when the JSON payload contains plugin data.Suggested fix:
Change the initialization to
ModelDictionary(False):This makes
is_model_object(_data)returnTrue, so_update_from_jsonwill callupdate_from_json()on it and populate the data correctly.https://github.com/Duet3D/dsf-python/blob/a9e0de43ed93cafa3610f06091e0bf0bbf8eb925/src/dsf/object_model/plugins/plugin_manifest.py#L14C9-L14C24