[issue14178] Failing tests for ElementTree

2012-03-05 Thread Eli Bendersky
Changes by Eli Bendersky : -- assignee: -> eli.bendersky stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue14178] Failing tests for ElementTree

2012-03-05 Thread Eli Bendersky
Eli Bendersky added the comment: Attaching a patch that fixes the slice deletion problems. The approach I've taken is follow a similar implementation in Objects/listobject.c; when a slice is deleted, it can be done efficiently by using memmove to shift whole blocks of leftover children. Also

[issue14178] Failing tests for ElementTree

2012-03-02 Thread Eli Bendersky
Eli Bendersky added the comment: Correction: extended slices are supported. The problem appears to be just with 'del', because element_ass_subscr doesn't treat it specially and thinks we just want to assign a 0-len value to a non-0-len slice. -- __

[issue14178] Failing tests for ElementTree

2012-03-02 Thread Eli Bendersky
Eli Bendersky added the comment: I can confirm that this indeed fails for the C implementation, while succeeding for the Python implementation. The C implementation doesn't appear to support extended slices for getting and setting items. Looking into it. -- _

[issue14178] Failing tests for ElementTree

2012-03-02 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +eli.bendersky, ezio.melotti, flox stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-li

[issue14178] Failing tests for ElementTree

2012-03-02 Thread Stefan Behnel
New submission from Stefan Behnel : These are tests from lxml's ET compatibility test suite that now fail in ElementTree: def test_delslice_step(self): Element = self.etree.Element SubElement = self.etree.SubElement a = Element('a') b = SubElement(a, 'b')