Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment: Minimum script to reproduce this issue is "bug.py" I've attached. And I think this issue can be fixed with "fix_cross_boundary_on_ElementTree.patch". I'll attach the test case for this issue as "test.py". (I wanted to intergrate test into test_xml_etree_c.py, but it uses doctest which I don't know about)
///////////////////////// // Cause of issue TreeBuilder#start() and TreeBuilder#end() are handlers driven by self._parser.feed(data) in iterparse.next(), and iterparse stores elements returned by these functions. But element is not initialized at the moment. No one can determine element.text when start tag is found, and element.tail when end tag is found vise versa. We can say "the element is initialized" when encountered next element or TreeBuilder is closed. So, iterparse's _events queue may contain uninitialized elements, so my patch waits until the element will be initialized. ---------- components: +XML nosy: +ocean-city versions: +Python 2.6, Python 3.0 Added file: http://bugs.python.org/file11764/bug.py _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4100> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com