#16 Cannot inherit from another plugin

Next Major Release
accepted
nobody
None
1
2014-07-18
2014-01-05
No

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.)

Related

Patches: #3

Discussion

  • Thibauld Nion
    Thibauld Nion
    2014-01-05

    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.

     
  • Thibauld Nion
    Thibauld Nion
    2014-03-22

    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.

     


Anonymous


Cancel   Add attachments