The workaround posted in comment #5 looks like it will break if elementtree.ElementTree._escape_attrib() is ever called as cElementTree dosen't provide the private methods that are needed there.
I did notice that the following line was changed sometime between bzr-1.13 and bzr-2.1b1::
The new import makes the code work on python2.4 when cElementTree is installed for me. (For Fedora EPEL packages which are stuck on bzr-1.13 because the API has changed. I'll backport this change to our package.)
I'm not sure which versions of python + bzr are still affected, the combination seems important. For instance, it seems like the following code might be broken if the particular version of cElementTree isn't importing xml.etree.ElementTree internally:
from xml.etree.cElementTree import (ElementTree, SubElement, Element, XMLTreeBuilder, fromstring, tostring)
import xml.etree as elementtree
The workaround posted in comment #5 looks like it will break if elementtree. ElementTree. _escape_ attrib( ) is ever called as cElementTree dosen't provide the private methods that are needed there.
I did notice that the following line was changed sometime between bzr-1.13 and bzr-2.1b1::
except ImportError:
XMLTreeBu ilder, fromstring, tostring) ElementTree
from cElementTree import (ElementTree, SubElement, Element,
- import elementtree
+ import elementtree.
The new import makes the code work on python2.4 when cElementTree is installed for me. (For Fedora EPEL packages which are stuck on bzr-1.13 because the API has changed. I'll backport this change to our package.)
I'm not sure which versions of python + bzr are still affected, the combination seems important. For instance, it seems like the following code might be broken if the particular version of cElementTree isn't importing xml.etree. ElementTree internally:
from xml.etree. cElementTree import (ElementTree, SubElement, Element,
XMLTreeBui lder, fromstring, tostring)
import xml.etree as elementtree