[issue15290] setAttribute() can fail

2017-03-15 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: not a bug -> duplicate stage: patch review -> resolved superseder: -> xml.dom.minidom.Element.cloneNode fails with AttributeError ___ Python tracker __

[issue15290] setAttribute() can fail

2017-03-05 Thread Craig Rodrigues
Craig Rodrigues added the comment: Same issue was brought up in http://bugs.python.org/issue4851 -- nosy: +Craig Rodrigues ___ Python tracker ___

[issue15290] setAttribute() can fail

2012-07-08 Thread Martin v . Löwis
Martin v. Löwis added the comment: Then Twisted will have to change. From http://docs.python.org/library/xml.dom.minidom.html "Applications should not instantiate the classes themselves; they should use the creator functions available on the Document object." If they insist on not using crea

[issue15290] setAttribute() can fail

2012-07-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > That's invalid usage. You are supposed to create new element nodes > through the document's createElement method. "unattached" nodes are > not supported. Well, I don't know how many third-party application rely on this, but Twisted does it. -- _

[issue15290] setAttribute() can fail

2012-07-08 Thread Martin v . Löwis
Martin v. Löwis added the comment: That's invalid usage. You are supposed to create new element nodes through the document's createElement method. "unattached" nodes are not supported. -- ___ Python tracker _

[issue15290] setAttribute() can fail

2012-07-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file26317/minidom_setattribute.patch ___ Python tracker ___

[issue15290] setAttribute() can fail

2012-07-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Trivial reproducer: >>> e = minidom.Element("span") >>> e.setAttribute("class", "version") Traceback (most recent call last): File "", line 1, in File "/home/antoine/cpython/default/Lib/xml/dom/minidom.py", line 743, in setAttribute attr.ownerDocument

[issue15290] setAttribute() can fail

2012-07-07 Thread Antoine Pitrou
New submission from Antoine Pitrou : This is a regression from 3.2: Traceback (most recent call last): File "/home/antoine/3sted/twisted/lore/test/test_lore.py", line 542, in test_setTitle secondTitle.setAttribute('class', 'title') File "/home/antoine/opt/lib/python3.3/xml/dom/minidom.p