<div dir="ltr"><br><br><div class="gmail_quote">2008/8/14 Sebastian Ware <span dir="ltr">&lt;<a href="mailto:sebastian@urbantalk.se">sebastian@urbantalk.se</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am trying to export and import objects from the Zodb using<br>
cPickle.dumps().<br>
<br>
My problem is that the pickler traverses the __parent__ attribute thus<br>
returning a much larger object graph than I wish to serialize.<br>
<br>
Do I have to subclass the pickler or is there som other smart way of<br>
making it skip the __parent__ attribute?<br>
</blockquote><div><br><br>You could&nbsp; write an adapter&nbsp; (or modify the class of the content objects itself) to use __setstate__ and __getstate__ , etc:<br><br><a href="http://www.python.org/doc/2.5/lib/node321.html">http://www.python.org/doc/2.5/lib/node321.html</a><br>
<br></div></div>-- <br>Best regards,<br>&nbsp;&nbsp; Miklós <br><br>
</div>