John Arbash Meinel
john at arbash-meinel.com
Thu Feb 23 20:36:52 GMT 2006
Robert Collins wrote:
> On Wed, 2006-02-22 at 08:05 -0600, John Arbash Meinel wrote:
>> Martin Pool wrote:
>>> On 22 Feb 2006, Robert Collins <robertc at robertcollins.net> wrote:
>>>> python limits module names to something approximately like
>>>> Perhaps we should not load plugins that dont meet the python module name
>>>> criteria, so that bzrlib.plugins.* only contains valid python module
>>> That would be OK, though might break some people who have checkouts in
>>> their plugin directory called say 'gannotate.mbp'.
>> I don't really see why. It is actually possible to use any name using
>> 'getattr' and 'setattr'.
>> You can do:
> Because if I in another plugin want to access an illegally named plugin
> its unpleasant to have to use gettattr.
Well, I think we have a deeper issue here. That I can name a plugin
whatever I want in the local directory. For example, I have a
"bzrtools-baz2bzr" in ~/.bazaar/plugins.
So while technically the plugin is called 'bzrtools', the path to it is
I think a better way to 'fix' this, is that plugins can declare their
official name. And when loading, they will be loaded into that
namespace, so that other plugins can access it.
As it stands now, it is fairly fragile to have one plugin expect to be
able to find another one.
I also don't think we should disable loading because of a non-accessible
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060223/ed7f42b6/attachment.pgp
More information about the bazaar