Commit 8a7ff3a5 authored by Shane Hathaway's avatar Shane Hathaway

Merge from 2_6 branch: fixed stored acquisition wrappers.

Some indexes were storing acquisition wrappers in the cyclic references
back to the ZCatalog instance.  Removed the acquisition wrappers and
cleaned up a bad use of apply().  The acquisition wrappers were revealed
by AdaptableStorage.

There's a second problem, in that indexes are unknowingly storing references
back to the ZCatalog in an unused attribute.  In the 2_6 branch it's
hard to fix without breaking things, but on the HEAD there's a better way
to fix this.  Coming soon, I hope.
parent 047ee3f4
......@@ -19,7 +19,7 @@ from OFS.Folder import Folder
from OFS.FindSupport import FindSupport
from OFS.ObjectManager import ObjectManager
from DateTime import DateTime
from Acquisition import Implicit
from Acquisition import Implicit, aq_base
from Persistence import Persistent
from DocumentTemplate.DT_Util import InstanceDict, TemplateDict
from DocumentTemplate.DT_Util import Eval
......@@ -913,9 +913,9 @@ class ZCatalog(Folder, Persistent, Implicit):
# for new index types is to use an "extra" record.
if 'extra' in base.__init__.func_code.co_varnames:
index = apply(base,(name,), {"extra":extra,"caller":self})
index = base(name, extra=extra, caller=aq_base(self))
else:
index = base(name,self)
index = base(name, aq_base(self))
self._catalog.addIndex(name,index)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment