#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 hereSlimishTemplates.foo = JinjaTemplates.fooetc

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.

     
  • Chris Warrick

    Chris Warrick - 2014-01-05

    I’m not sure. Although I fixed the problem by doing class SlimishTemplates(JinjaTemplates, TemplateSystem).

     
  • Thibauld Nion

    Thibauld Nion - 2014-03-22
    • Group: Next Minor Release --> Next Major Release
     
  • 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.

     
  • Thibauld Nion

    Thibauld Nion - 2014-05-31

    See also a related patch: [patches:#3]

     

    Related

    Patches: #3

  • Thibauld Nion

    Thibauld Nion - 2014-07-11
    • status: open --> accepted
     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks