[MERGE] Lazy Importer

Robert Collins robertc at robertcollins.net
Wed Sep 13 00:15:28 BST 2006

On Tue, 2006-09-12 at 14:25 -0500, John Arbash Meinel wrote:

I'd like to see this in 0.11 too. For the larger conversion, rather than
a huge branch, I'd suggest just spam of many small patches. 

> I'd really like to at least get this into 0.11. I'll be starting another
> branch which starts using it, to cut down on the bzr load time. But
> probably we need a big change like that to sit in bzr.dev for longer
> than 1 week before we freeze and then release it.

+1 with:

a NEWS entry
a HACKING entry
some more docstring in the lazy module's docstring.


+    # Intentially a long semi-unique name that won't likely exist
+    # elsewhere. (We can't use isinstance because that accesses
+    # which causes the __getattribute__ to trigger)
+    __slots__ = ('_import_replacer_children', '_member',

what is intentionally ... ?

+    def test_object(self):
+        actions = []

that whitespace looks really weird - either add a docstring/comment, or
close it up please.

In the tests I note that you check the variables are replaced, but you
dont seem to check for other side effects.

It might be an idea to be saying 'assertEqual(expectedGlobals,
globals())' -> taking a copy of globals before the demand load and
manually performing the single change that you expect to occur.


GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060913/b86f5f2d/attachment.pgp 

More information about the bazaar mailing list