[issue10131] deepcopying an xml.dom.minidom.Document generates an invalid XML document

2015-11-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: test needed -> resolved status: open -> closed ___ Python tracker ___ __

[issue10131] deepcopying an xml.dom.minidom.Document generates an invalid XML document

2015-11-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Marian for your patch. Committed modified patch with tests. For compatibility with data pickled by unpatched Python we have to keep __setstate__. The discrepancy between pickle and copy module is different not easy issue. -- _

[issue10131] deepcopying an xml.dom.minidom.Document generates an invalid XML document

2015-11-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0eea57ddb75f by Serhiy Storchaka in branch '2.7': Issue #10131: Fixed deep copying of minidom documents. Based on patch https://hg.python.org/cpython/rev/0eea57ddb75f New changeset aa304ad32292 by Serhiy Storchaka in branch '3.4': Issue #10131: Fix

[issue10131] deepcopying an xml.dom.minidom.Document generates an invalid XML document

2015-11-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka nosy: +alexandre.vassalotti, pitrou, serhiy.storchaka versions: +Python 3.4, Python 3.5, Python 3.6 -Python 3.2, Python 3.3 Added file: http://bugs.python.org/file41170/copying_NodeList.patch ___

[issue10131] deepcopying an xml.dom.minidom.Document generates an invalid XML document

2013-07-24 Thread Bohuslav "Slavek" Kabrda
Changes by Bohuslav "Slavek" Kabrda : -- nosy: +bkabrda ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue10131] deepcopying an xml.dom.minidom.Document generates an invalid XML document

2012-03-23 Thread Eli Bendersky
Changes by Eli Bendersky : -- nosy: -eli.bendersky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue10131] deepcopying an xml.dom.minidom.Document generates an invalid XML document

2012-02-24 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +eli.bendersky stage: needs patch -> test needed versions: +Python 3.3 -Python 3.1 ___ Python tracker ___ _

[issue10131] deepcopying an xml.dom.minidom.Document generates an invalid XML document

2011-11-28 Thread Yevgen Yampolskiy
Yevgen Yampolskiy added the comment: Marian, I have no doubts that the patch cures THIS issue. The problem is that it cures the wrong thing. It is _reconstruct function that needs to be fixed (somebody changed order of 'if' statements between 2.6 and 2.7 releases) --

[issue10131] deepcopying an xml.dom.minidom.Document generates an invalid XML document

2011-11-24 Thread Marian Ganisin
Marian Ganisin added the comment: Code from msg146175 with attached patch applied: >>> import sys >>> print(sys.version_info) sys.version_info(major=2, minor=7, micro=2, releaselevel='final', serial=0) >>> import copy, pickle >>> from xml.dom.minidom import NodeList >>> >>> obj = NodeList() >>

[issue10131] deepcopying an xml.dom.minidom.Document generates an invalid XML document

2011-10-22 Thread Yevgen Yampolskiy
Yevgen Yampolskiy added the comment: You can create object copy using both copy and pickle modules. I assume that identical results should be produced. pickle handles minidom.Document correctly, however copy does not. Even if patch to NodeList will be applied, copy or pickle modules need to b

[issue10131] deepcopying an xml.dom.minidom.Document generates an invalid XML document

2011-07-29 Thread Marian Ganisin
Marian Ganisin added the comment: xml.dom.minicompat.NodeList provides __reduce__/__reduce_ex__ methods, they return "state" as well as "list iterator". However one of those seems to be absolutely enough for reconstruction of instance (__reduce__/__reduce_ex__ are inherited, methods __setstat

[issue10131] deepcopying an xml.dom.minidom.Document generates an invalid XML document

2010-10-17 Thread Florent Xicluna
Florent Xicluna added the comment: It works fine with 2.5 and 2.6. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue10131] deepcopying an xml.dom.minidom.Document generates an invalid XML document

2010-10-17 Thread Florent Xicluna
New submission from Florent Xicluna : >>> import copy >>> from xml.dom import minidom >>> doc = minidom.parseString('') >>> doc2 = copy.deepcopy(doc) >>> doc.toxml() u'' >>> doc2.toxml() u'' >>> minidom.parseString(doc2.toxml()) Traceback (most recent call last): ... ExpatError: junk after docu