[Checkins] SVN: five.localsitemanager/branches/1.0/ Utilities registered with an absolute path were returned with the RequestContainer in the aq_chain. As the result of the first utility look-up is stored in the adapter look-up cache, subsequent utility look-ups return the utlitiy with the RequestContainer of the first look-up.
Michael Howitz
mh at gocept.com
Wed Oct 29 10:51:38 EDT 2008
Log message for revision 92669:
Utilities registered with an absolute path were returned with the RequestContainer in the aq_chain. As the result of the first utility look-up is stored in the adapter look-up cache, subsequent utility look-ups return the utlitiy with the RequestContainer of the first look-up.
Solution: For utilities registered with an absolute path the RequestContainer is now also removed at look-up.
Changed:
U five.localsitemanager/branches/1.0/CHANGES.txt
U five.localsitemanager/branches/1.0/src/five/localsitemanager/localsitemanager.txt
U five.localsitemanager/branches/1.0/src/five/localsitemanager/registry.py
-=-
Modified: five.localsitemanager/branches/1.0/CHANGES.txt
===================================================================
--- five.localsitemanager/branches/1.0/CHANGES.txt 2008-10-29 12:43:43 UTC (rev 92668)
+++ five.localsitemanager/branches/1.0/CHANGES.txt 2008-10-29 14:51:36 UTC (rev 92669)
@@ -1,10 +1,20 @@
Changelog
=========
-1.0
----
+1.1 (unreleased)
+----------------
+* Utilities registered with an absolute path were returned with the
+ RequestContainer in the aq_chain. As the result of the first utility
+ look-up is stored in the adapter look-up cache, subsequent utility
+ look-ups return the utlitiy with the RequestContainer of the first
+ look-up.
+
+ Solution: For utilities registered with an absolute path the
+ RequestContainer is now also removed at look-up.
+ [icemac]
+
1.0c1 - 2008-08-27
------------------
Modified: five.localsitemanager/branches/1.0/src/five/localsitemanager/localsitemanager.txt
===================================================================
--- five.localsitemanager/branches/1.0/src/five/localsitemanager/localsitemanager.txt 2008-10-29 12:43:43 UTC (rev 92668)
+++ five.localsitemanager/branches/1.0/src/five/localsitemanager/localsitemanager.txt 2008-10-29 14:51:36 UTC (rev 92669)
@@ -261,9 +261,9 @@
>>> si_util.getPhysicalPath()
('', 'a', 'b', 'si_util')
>>> si_util.aq_chain
- [<SITestUtility at /a/b/si_util>, <Folder at /a/b>, <Folder at /a>, <Application at >, <ZPublisher.BaseRequest.RequestContainer object at 0x...>]
+ [<SITestUtility at /a/b/si_util>, <Folder at /a/b>, <Folder at /a>, <Application at >]
>>> si_util.absolute_url()
- 'http://nohost/a/b/si_util'
+ 'a/b/si_util'
>>> zope.component.getUtility(ITestUtility, name='with_aq_chain')
<SITestUtility at /a/b/si_util>
Modified: five.localsitemanager/branches/1.0/src/five/localsitemanager/registry.py
===================================================================
--- five.localsitemanager/branches/1.0/src/five/localsitemanager/registry.py 2008-10-29 12:43:43 UTC (rev 92668)
+++ five.localsitemanager/branches/1.0/src/five/localsitemanager/registry.py 2008-10-29 14:51:36 UTC (rev 92669)
@@ -105,7 +105,7 @@
# If component is stored as a ComponentPathWrapper, we traverse to
# the component using the stored path:
if isinstance(comp, ComponentPathWrapper):
- return getSite().unrestrictedTraverse(comp.path)
+ return _rewrap(getSite().unrestrictedTraverse(comp.path))
# BBB: The primary reason for doing this sort of wrapping of
# returned utilities is to support CMF tool-like functionality where
More information about the Checkins
mailing list