[Zope-Checkins] CVS: Zope3/lib/python/ZopeLegacy/App - Product.py:1.54.4.1 RefreshFuncs.py:1.2.40.1
Jeremy Hylton
jeremy@zope.com
Sun, 10 Mar 2002 16:26:17 -0500
Update of /cvs-repository/Zope3/lib/python/ZopeLegacy/App
In directory cvs.zope.org:/tmp/cvs-serv24594
Modified Files:
Tag: Zope-3x-branch
Product.py RefreshFuncs.py
Log Message:
Refactor Connection object.
Rename updateCodeTimeStamp() to resetPersistentCaches(). The old name
described an implementation strategy. The new name describes the
interface. Updated two uses in ZopeLegacy.
Remove getDebugInfo() and setDebugInfo(). It was used in ZApplication
and in ZopePublication. I could only find calls to set the debug
info, none to read it. So I've removed this on YAGNI grounds. It
should be easy to restore if it's actually used somewhere.
Removed tConnection() subclass that was unused and _breakcr() method
in Connection base that was only called by tConnection(). The
Python GC should break cycles for us anyway.
Removed self._incrgc alias for self.cacheGC, which is in turn an alias
for Cache().incrgc. The cacheGC attribute seems to be used by
ZopeLegacy code, although it only seems to happen through DTML; so
I'm not really sure.
Remove try/except around unpickler.load() in __getitem__ of
Connection. It was a blind try/except that hid whatever the real
exception was. It raised a long string that was basically
impossible to catch, because it was formatted to contain the oid
of the object. It seems more helpful to have a traceback with the
real exception.
Add some helper methods that handle unpickling of objects and their
states. Used by __getitem__() and setstate().
Replace mtime() implementation with an even simpler stub. This method
is required by the interface, but there is no real implementation
or user yet.
Deleted setklassstate() method, which was not documented or called by
any code in Zope or ZODB.
=== Zope3/lib/python/ZopeLegacy/App/Product.py 1.54 => 1.54.4.1 ===
if RefreshFuncs.performFullRefresh(self._p_jar, self.id):
from ZODB import Connection
- Connection.updateCodeTimestamp() # Clears cache in next connection.
+ Connection.resetPersistentCaches()
message = 'Product refreshed.'
else:
message = 'An exception occurred.'
=== Zope3/lib/python/ZopeLegacy/App/RefreshFuncs.py 1.2 => 1.2.40.1 ===
finishAutoRefresh(jar, auto_refresh_ids)
from ZODB import Connection
- Connection.updateCodeTimestamp()
+ Connection.resetPersistentCaches()
get_transaction().commit()
jar._resetCache()
get_transaction().begin()