[XML-SIG] [ pyxml-Bugs-609641 ] minidom nodes not pickleable

noreply@sourceforge.net noreply@sourceforge.net
Sun, 15 Sep 2002 12:01:48 -0700


Bugs item #609641, was opened at 2002-09-15 19:01
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=106473&aid=609641&group_id=6473

Category: DOM
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: James Kew (jkew)
Assigned to: Nobody/Anonymous (nobody)
Summary: minidom nodes not pickleable

Initial Comment:
>>> import xml.dom.minidom
>>> dom = xml.dom.minidom.parseString("<root/>")
>>> import cPickle
>>> f = open("tmp.pkl", "wb")
>>> cPickle.dump(dom, f, 1)
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
  File "C:\PYTHON22\lib\copy_reg.py", line 68, in 
_reduce
    dict = getstate()
TypeError: a class that defines __slots__ without 
defining __getstate__ cannot be pickled

Similar (longer, but ends the same) traceback from 
pickle.dump.

I suspect this is arising from the 
NodeList/EmptyNodeList class definitions in 
minicompat.py, but don't know enough about the 
pickling process to diagnose further.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=106473&aid=609641&group_id=6473