RFC: centralise registries

Robert Collins robertc at robertcollins.net
Tue Apr 14 06:17:46 BST 2009


On Tue, 2009-04-14 at 15:02 +1000, Ian Clatworthy wrote:
> Robert Collins wrote:
> 
> > We could make all the modules that have registries cheap to load, or we
> > could move all the registries to bzrlib.registry, which is easier to do
> > as we don't need to deal with subclasses or other such things happening
> > there.
> 
> The Registry class is a great support class and arguably useful one day
> outside of bzrlib so I'd prefer registry.py didn't know more about the
> rest of application than it needs to.
> 
> Moving all registries to bzrlib.registry is the wrong thing to do IMHO.

I've argued that in the past, but as we use them more the import time
issue is exacerbated. It would be nice if python were faster at loading
code.

I don't think potential extraction of code is a good reason to keep our
instances and our support classes separate; putting a bunch of instances
in registry.py doesn't make it harder to pull out the class definition
to a new project.

-Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090414/dfce964d/attachment.pgp 


More information about the bazaar mailing list