Re: [Zope-dev] Yet another bug. (Re: [Zope-dev] Bug?)
At 08:45 PM 6/19/00 +0800, mike wrote: >It looks like retrieved items have no _v_dm_ set. I fixed it (not sure >this is right) with: > >File: Rack.py > >def getItem(self, key): >"""Get an item from the rack by key""" > ># Borrow canonicals map for per-transaction item cache >k = key, >item = self._canonicalForm(k,_marker) > >if item is _marker: >item = self.retrieveItem(key) >self._registerCanonical(k,item) # XXX Should we cache >non-existence? > >if item is not None: item._setRack(self.aq_inner) >^ >return item Okay, I've tracked this one down now. It's retrieveItem() that's broken; the _setRack(self.aq_inner) call should go right before the _setSlot(slot) call. Checking this one in now... Will upload an alpha3 release shortly. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Yet another bug. (Re: [Zope-dev] Bug?)
"Phillip J. Eby" wrote: > > At 08:45 PM 6/19/00 +0800, mike wrote: > >It looks like retrieved items have no _v_dm_ set. I fixed it (not sure > >this is right) with: > > > > Um, check to make sure you're using _RawItem, not _v_itemConstructor, in > your retrieveItem method, if you're using a subclass. If you are using > _RawItem, then I've got a bug somewhere deeper that needs fixing. But > getItem isn't the place it's broken, as _RawItem is responsible for > ensuring the datamanager invariants (skin points to _v_dm_ and has its > canonical form registered). I use (ZSession.py from ZSession 0.0.2) : def getItem( self, id) : """ """ if self._timer.idleTime() > self.session_ttl / 2 : self.removeDead() item = Specialist.getItem( self, id) return item ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Yet another bug. (Re: [Zope-dev] Bug?)
At 08:45 PM 6/19/00 +0800, mike wrote: >It looks like retrieved items have no _v_dm_ set. I fixed it (not sure >this is right) with: > Um, check to make sure you're using _RawItem, not _v_itemConstructor, in your retrieveItem method, if you're using a subclass. If you are using _RawItem, then I've got a bug somewhere deeper that needs fixing. But getItem isn't the place it's broken, as _RawItem is responsible for ensuring the datamanager invariants (skin points to _v_dm_ and has its canonical form registered). ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )