[ckan-dev] plugins: inherit=???

Toby Dacre toby.okfn at gmail.com
Wed May 15 16:09:30 UTC 2013


On 15 May 2013 15:07, David Raznick <david.raznick at okfn.org> wrote:
> Hi
>
> Sounds inherently good to me.

Reading the pyutillib changelog it seems that the decision to have
inherit=False by default is to prevent hard to find errors where
functions are mis-spelt and so the default method is used in error -
these being really hard to track down.

This does sound like a sensible thing.  I think it would be good to
report what methods are not being overriden by extensions somewhere
but not quite sure the best place.  We could at startup but then it
becomes noisy.  Maybe as part of the plugin info paster command.

The final option would be to have as a config option but I'm not happy
with that idea either.

Maybe a fuzzy test of missing function names might be the best idea?

Toby

>
> David
>
>
> On Wed, May 15, 2013 at 2:21 PM, Toby Dacre <toby.okfn at gmail.com> wrote:
>>
>> when creating plugins
>>
>> class MyPlugin(p.SingletonPlugin):
>>
>>     p.implements(p.ISomeInterface)
>>
>>
>> generally people don't add inherit=True which causes problems when
>> expanding interfaces.  Currently I'm looking at expanding IActions but
>> doing this then breaks lots of extensions.
>>
>> I'm thinking of patching ckan so that unless we specify inherit=False
>> we will inherit.  I can't see where we would not want to inherit but
>> it would allow the option if explicitly requested.  Otherwise we just
>> keep breaking extensions for no good reason.
>>
>> Is this a bad plan?  Am I inherently evil?
>>
>>
>> --
>> Toby Dacre
>>
>> The Open Knowledge Foundation
>>
>> Empowering through Open Knowledge
>> http://okfn.org/  |  @okfn
>>
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> http://lists.okfn.org/mailman/listinfo/ckan-dev
>> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>



-- 
Toby Dacre

The Open Knowledge Foundation

Empowering through Open Knowledge
http://okfn.org/  |  @okfn




More information about the ckan-dev mailing list