[Zope3-dev] Re: [ZODB-Dev] Connection instance has no attribute '_incrgc'

Steve Alexander steve@cat-box.net
Tue, 19 Mar 2002 13:33:36 +0000


Toby Dickenson wrote:
> On Tue, 19 Mar 2002 08:50:01 +0000, Steve Alexander
> <steve@cat-box.net> wrote:
> 
> 
>>Hi folks,
>>
>>Apologies for the cross-post to zodb-dev and zope3-dev.
> 
> 
> Im currently looking at the zope 2 zodb source. I dont see how thats
> possible, unless there was previous exception that you didnt mention.

The Zope3 source is somewhat different.

The following patch appears to fix things. However, perhaps DB.py should 
be using Connection.cacheGC rather than Connection._incrgc.

--- Connection.py	13 Mar 2002 22:49:28 -0000	1.60.6.11
+++ Connection.py	19 Mar 2002 13:32:40 -0000
@@ -96,7 +96,7 @@
          """Create a new Connection"""
          self._version = version
          self._cache = cache = Cache(cache_size, cache_deactivate_after)
-        self.cacheGC = cache.incrgc
+        self._incrgc = self.cacheGC = cache.incrgc

          # _invalidated queues invalidate messages delivered from the DB
          self._invalidated = d = {}


I'll check this change into Zope3 anyway, and hopefully someone who 
knows better can improve things later.

--
Steve Alexander