[Zope-dev] Zope Head (2.8) breaks refresh

2003-12-07 Thread Dieter Maurer
Playing with Zope Head (as of 2003-12-04) revealed problems with
refresh.

I see varying behaviour refreshing CMFCore:

  *  Refresh is not effective (objects continue the have the old
 behavior)

  *  After a while, commit reports an exception
 ValueError: Cache values may only be in one cache.

http://localhost:10080/Portal/portal_types/Document/manage_editProperties
Traceback (innermost last):
  Module ZPublisher.Publish, line 104, in publish
  Module Zope.App.startup, line 223, in commit
  Module ZODB.Transaction, line 254, in commit
  Module ZODB.Transaction, line 233, in commit
  Module ZODB.Transaction, line 352, in _commit_objects
  Module ZODB.Connection, line 286, in commit
ValueError: Cache values may only be in one cache.



The following transscript shows strange reproducible behaviour 
which is almost surely related to the above:

linux: bin/zopectl debug
Starting debugger (the name app is bound to the top-level Zope object)
 pt=getattr(app,'standard_template.pt')
 pr=app.unrestrictedTraverse('Control_Panel/Products/PageTemplates/manage_performRefresh')
 pt.getId()
'standard_template.pt'
 pr()## refresh
 pt.getId()  ## apparently not deactivated
'standard_template.pt'
 pt._p_deactivate()
 pt.getId()  ## obviously a wrong result
'Zope'
 pt.aq_base.getId()  ## may be explainable as pt is not refetched
Traceback (most recent call last):
  File stdin, line 1, in ?
  File /home/dieter/ZH/ZopeHead/lib/python/ZODB/Connection.py, line 424, in setstate
self._reader.setGhostState(obj, p)
  File /home/dieter/ZH/ZopeHead/lib/python/ZODB/serialize.py, line 203, in 
setGhostState
obj.__setstate__(state)
  File 
/home/dieter/ZH/ZopeHead/lib/python/Products/PageTemplates/ZopePageTemplate.py, line 
301, in __setstate__
ZopePageTemplate.inheritedAttribute('__setstate__')(self, state)
AttributeError: 'NoneType' object has no attribute 'inheritedAttribute'
 pt=getattr(app,'standard_template.pt') ## refetch
 pt.getId() ## still wrong
'Zope'


Looks as if refresh did not flush the ZODB cache, which still
delivers objects referencing the old classes.

I now know why the above code does not work as I expected:

  The new refresh no longer uses minimize to flush the ZODB
  caches but updates the code_timestamp.
  This causes the cache to be replaced by a new one when
  the connection is opened for the next time.
  ATT: replacing the cache without clearing it can lead to huge
  memory leaks (everything in the old cache is leaked!).


I can not yet explain the original observations...


-- 
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 )


[Zope-dev] 2.7 on Windows

2003-12-07 Thread Lennart Regebro
I'm having serious trouble in getting HEAD running in Windows. Obviously,
configure doesn't work. :-)
I found something on zope.org telling me to run python  inst\configure.py
and in in turn tells me to run nmake build. This builds Zope, but creates no
z2.py or runzope.py or anything like that. What next? Any ideas?



___
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] Zope Head (2.8) breaks refresh

2003-12-07 Thread Jeremy Hylton
On Sun, 2003-12-07 at 08:15, Dieter Maurer wrote:
   ATT: replacing the cache without clearing it can lead to huge
   memory leaks (everything in the old cache is leaked!).

Without commenting on the rest of the bug report, I should mention that
caches and persistent objects all participate in cyclic GC.  They will
not leak the way pre-2.8 caches did.

Jeremy



___
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 )


[Zope-dev] Re: Zope 2.7.0 b3 regressions

2003-12-07 Thread Evan Simpson
Yuppie wrote:
Yes. getIcon() is the cause of the problem I see:

To access the ZMI I use this Apache rule:
ProxyPass /zope27 
http://localhost:8080/VirtualHostBase/http/example.org:80/VirtualHostRoot/_vh_zope27 

getIcon() for a folder in myCMFSite returns 
'zope27/myCMFSite/folder_icon.gif'
(was 'myCMFSite/folder_icon.gif' in Zope 2.6)

OFS/dtml/main.dtml adds BASEPATH1, so the URL is 
'/zope27/zope27/myCMFSite/folder_icon.gif'
(would be '/zope27/myCMFSite/folder_icon.gif' in Zope 2.6)
Based on this, and on a lot of back-burner pondering, I'm now thinking 
that the proper fix for this is the one you suggest.  It makes sense for 
the relative version of the absolute path to omit BASE1, the URL of the 
virtual root, returning the semantics of absolute_path(1) to path 
relative to the virtual root.  Use cases that need a hostname-relative 
URL can use BASEPATH1 + absolute_url(1).

Cheers,

Evan @ 4-am



___
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 )