[BUG] circular import problems

John Arbash Meinel john at arbash-meinel.com
Mon Sep 11 01:51:45 BST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Right now we have a bug in our import dependencies.

Specifically, 'bzrlib/tree.py' imports RevisionTree from
bzrlib/revisiontree.py

But bzrlib/revisiontree must import bzrlib.tree to get the base-level
Tree implementation.

Which means that this fails:

python -c 'import bzrlib.revisiontree'

fails because revision tree imports tree, which tries to import
revisiontree but RevisionTree is not defined yet.

I'm not sure how exactly we can get around this, and maintain
compatibility. (I think if revisiontree.py did:
from bzrlib.tree import Tree, it would work).

It might be worthwhile to break compatibility, though. I'm not sure how
to deprecate something like this.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFBLMhJdeBCYSNAAMRAvcPAKCFdAKjjdOy1ivfCd1j1rWfAZ8c+wCeO/KB
i+rn72J4wAxNAepb/Heh75E=
=VSOc
-----END PGP SIGNATURE-----




More information about the bazaar mailing list