Cannot inherit from another plugin
A fat-free DIY Python plugin management toolkit.
Brought to you by:
tibonihoo
Yapsy seems to ignore plugins that inherit from other plugins. For example, this:
class SlimishTemplates(JinjaTemplates):
name = "slimish"
…further changes here…
basically gets getPluginByName('slimish', 'TemplateSystem') to return JinjaTemplates instead. As a workaround, I used:
class SlimishTemplates(TemplateSystem):
name = "slimish"
…further changes here…
SlimishTemplates.foo = JinjaTemplates.foo
…etc…
but that’s hacky. (this is an unofficial plugin for Nikola.)
Anonymous
If I understand your problem correctly you hit a known limitation of yapsy described there along with possible solutions/workarounds:
http://yapsy.sourceforge.net/Advices.html#id3
As far as I can tell correcting this would mean changing significantly the way plugins are defined for yapsy and possibly breaking current uses of it, so it's not planned for any upcoming release (it may be only for a backward incompatibile rework of yapsy).
Please tell me if you think your problem is different, as I may have misunderstood.
I’m not sure. Although I fixed the problem by doing
class SlimishTemplates(JinjaTemplates, TemplateSystem).The underlying problem (plugin category definition by inheritance) may be solved in a major release with the appropriate refactoring, but nor in a minor release.
See also a related patch: [patches:#3]
Related
Patches: #3