bzr-0.7 and cElementTree

Adis Nezirovic adis at linux.org.ba
Wed Jan 25 16:23:21 GMT 2006


bzr 0.7
cElementTree c1.0.5-20051216


I noticed this log message in my ~/.bzr.log:
---8<---
WARNING: using slower ElementTree; consider installing cElementTree and
make sure it's on your PYTHONPATH
--->8---

I think that cElementTree is installed properly at
/usr/lib/python2.4/site-packages/cElementTree.so

i.e.

python -c 'import cElementTree;print cElementTree'
returns
<module 'cElementTree' from 'cElementTree.so'>

And after:
>>> from cElementTree import *
I can issue
>>> help ("cElementTree")
etc.


It seems to me that there is a problem in bzrlib/xml.py
Please note that documentation at
http://effbot.org/zone/celementtree.htm explicitly states that we need
*both* cElementTree and standard ElementTree. (e.g. 'fromstring' is not
defined in cElementTree, I double checked 'cElementTree.so' with nm)

Attached patch resolves issue for me. Did I get it right, or I am
horribly wrong :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xml.py.diff
Type: text/x-patch
Size: 622 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060125/10568a90/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060125/10568a90/attachment.pgp 


More information about the bazaar mailing list