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

2003-12-08 Thread Dieter Maurer
Dieter Maurer wrote at 2003-12-7 14:15 +0100:
Playing with Zope Head (as of 2003-12-04) revealed problems with
refresh.

Turns out to be a bug in ZODB.Connection.Connection._setDB:

  ConnectionObjectReader used the old cache while
  refresh cause a new cache to be installed later
  in _resetCache.

Patch attached.

-- 
Dieter
--- ZODB/Connection.py~	2003-11-28 17:44:49.0 +0100
+++ ZODB/Connection.py	2003-12-08 21:26:49.0 +0100
@@ -158,8 +158,6 @@
 Any objects modified since the last transaction are invalidated.
 
 self._db = odb
-self._reader = ConnectionObjectReader(self, self._cache,
-  self._db._classFactory)
 self._storage = odb._storage
 self._sortKey = odb._storage.sortKey
 self.new_oid = odb._storage.new_oid
@@ -168,6 +166,8 @@
 self._resetCache()
 else:
 self._flush_invalidations()
+self._reader = ConnectionObjectReader(self, self._cache,
+  self._db._classFactory)
 self._opened = time()
 
 return self
___
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 Head (2.8) breaks refresh

2003-12-08 Thread Jeremy Hylton
On Mon, 2003-12-08 at 15:36, Dieter Maurer wrote:
 Dieter Maurer wrote at 2003-12-7 14:15 +0100:
 Playing with Zope Head (as of 2003-12-04) revealed problems with
 refresh.
 
 Turns out to be a bug in ZODB.Connection.Connection._setDB:
 
   ConnectionObjectReader used the old cache while
   refresh cause a new cache to be installed later
   in _resetCache.
 
 Patch attached.

The patch doesn't make sense:

--- ZODB/Connection.py~ 2003-11-28 17:44:49.0 +0100
+++ ZODB/Connection.py  2003-12-08 21:26:49.0 +0100
@@ -158,8 +158,6 @@
-self._reader = ConnectionObjectReader(self, self._cache,
-  self._db._classFactory)
@@ -168,6 +166,8 @@
+self._reader = ConnectionObjectReader(self, self._cache,
+  self._db._classFactory)

Is there any difference between these two execept for whitespace?

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

2003-12-08 Thread Yuppie
Jeremy Hylton wrote:
@@ -158,8 +158,6 @@
-self._reader = ConnectionObjectReader(self, self._cache,
-  self._db._classFactory)
@@ -168,6 +166,8 @@
+self._reader = ConnectionObjectReader(self, self._cache,
+  self._db._classFactory)
Is there any difference between these two execept for whitespace?
Line numbers?

HTH, Yuppie



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

2003-12-08 Thread Jeremy Hylton
On Mon, 2003-12-08 at 15:56, Yuppie wrote:
 Jeremy Hylton wrote:
  @@ -158,8 +158,6 @@
  -self._reader = ConnectionObjectReader(self, self._cache,
  -  self._db._classFactory)
  @@ -168,6 +166,8 @@
  +self._reader = ConnectionObjectReader(self, self._cache,
  +  self._db._classFactory)
  
  Is there any difference between these two execept for whitespace?
 
 Line numbers?
 
 HTH, Yuppie

Yes.  That helps :-).

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 )