[ZODB-Dev] Fixing Broken Objects?
Jim Fulton
jim at zope.com
Sun Oct 16 10:48:43 EDT 2005
Tino Wildenhain wrote:
> Am Donnerstag, den 13.10.2005, 18:09 -0400 schrieb Jim Fulton:
>
>>Tino Wildenhain wrote:
>>
>>>Am Donnerstag, den 13.10.2005, 08:03 +0200 schrieb Andreas Jung:
>>>
>>>
>>>>--On 13. Oktober 2005 01:45:30 -0400 Chris Spencer
>>>><gmane.20.evilspam at spamgourmet.com> wrote:
>>>>
>>>>
>>>>
>>>>>I noticed that if a ZEOServer client doesn't have the definition for an
>>>>>object's class, it loads it as a broken object. Is there any way to fix
>>>>>the broken object by obtaining the class source from the server?
>>>>>
>>>>
>>>>Your sources on the client side must be complete. Otherwise the object is
>>>>broken. The server has nothing to do with problem. Fix your client.
>>>
>>>
>>>While it would certainly be nice if the ZEO server could deliver
>>>codeobjects too.
>>
>>
>>I don't think it would be useful to deliver ordinary Python modules
>>via the DB.
>
>
> Why not? This way one could keep all code changes in a central
> repository, w/o the need of either manually syncing or some
> special (flaky) network filesystem.
Because normal Python modules have reload non-sematics that are
incompatible with databases. Would it be useful to load the
code only at startup? Or would you expect to get updates
when new code are loaded into the database. If you only want code
to be loaded from a remote source on startup, there are other
solutions than that.
> Btw, (hijacking the thread because a bit related)
> how can I serialize the state of a generator
> object? (e.g. for caching it between requests)
> Pickle does not work for it (whyever)
You can't save the state of a generator because pickle doesn't
work for it. :)
I suggest taking this question to the Python list.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the ZODB-Dev
mailing list