[Zope-dev] Different code layout for Persistence between various Zope versions was: RE: [Zope] Can not import PersistentMapping)

2004-01-25 Thread Dieter Maurer
Sean wrote at 2004-1-24 11:12 -0500:
 ...
Looking at the ZOPE 2.6.2 Source on the Windows machine, I see code for
modules: Persistence.PersistentMapping, and Persistence.PersistentList

On Linux, the Zope 2.6.1 Source has a Persistence Directory with nothing in
it. The __init__.py file says:

 ...While obviously there is nothing in this module,
 the correct names are inserted by the __init__.py
 in ZODB, jumpstarting the process.

Actually, the __init__.py file on the windows machine says the same thing,
but there ARE in fact source files in the directory for both the
PersistentMapping and PersistentList modules - as well as some .c and .h
files - as follows:

cPickleCache.c
cPersistence.c
cPersistence.h
PersistentList.py
PersistentMapping.py

Would these be differences between the two versions of Zope, or are the
classes not properly setup on the Linux box, and once they are, I could
expect to see the source files that I see on the Windows box?

Or, perhaps the way these classes were being implemented was changing
between the two releases, and I should just upgrade both machines to 2.6.4
which is listed as the current stable release, or 2.7.0rc1.

Recommendations?

I know nothing about Windows :-)

I think, I read somewhere that PersistentMapping and PersistentList
should be moved out from ZODB to Persistence -- but only for Zope 2.8.
I would be surprised when the Windows installation were the place
where such things start...

I moved your question to mailto:[EMAIL PROTECTED] where
there are probably more people which can answer it.

-- 
Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] cPickleCache endless loop...

2004-01-25 Thread Dieter Maurer
Jeremy Hylton wrote at 2004-1-23 12:12 -0500:
 ...
The only useful answer is to avoid using __del__ on
persistent objects.  If there are resources that really
need  to be finalized whenever the object is ghosted, you
can put them in a non-persistent sub-object that does have
an __del__.

A minor note (not essential for the current discussion):

  __del__ is not called when the object is ghostified
  but when the last (non cache) reference to it is deleted (i.e.
  when the object is flushed from memory).


By the way, there seem to be some objects around which trigger this
infinite loop behaviour.

  I noticed that a minimize in our production environment
  often leads to a no longer responding Zope instance. 
  I think now that this may be caused by the above problem.
  We use mainly stock Zope and CMF objects, Postgres and
  MySQL database adapters and LocalFS.

-- 
Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )