[Checkins] SVN: five.localsitemanager/trunk/ ported r92669 from branches/1.0
Michael Howitz
mh at gocept.com
Wed Oct 29 10:56:22 EDT 2008
Log message for revision 92670:
ported r92669 from 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.
Solution: For utilities registered with an absolute path the RequestContainer is now also removed at look-up.
Changed:
U five.localsitemanager/trunk/CHANGES.txt
U five.localsitemanager/trunk/src/five/localsitemanager/localsitemanager.txt
U five.localsitemanager/trunk/src/five/localsitemanager/registry.py
-=-
Modified: five.localsitemanager/trunk/CHANGES.txt
===================================================================
--- five.localsitemanager/trunk/CHANGES.txt 2008-10-29 14:51:36 UTC (rev 92669)
+++ five.localsitemanager/trunk/CHANGES.txt 2008-10-29 14:56:20 UTC (rev 92670)
@@ -7,11 +7,16 @@
* Requiring zope.component >= 3.5.0.
[icemac]
+* 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.0 - Unreleased
-----------------
-
-
1.0c1 - 2008-08-27
------------------
Modified: five.localsitemanager/trunk/src/five/localsitemanager/localsitemanager.txt
===================================================================
--- five.localsitemanager/trunk/src/five/localsitemanager/localsitemanager.txt 2008-10-29 14:51:36 UTC (rev 92669)
+++ five.localsitemanager/trunk/src/five/localsitemanager/localsitemanager.txt 2008-10-29 14:56:20 UTC (rev 92670)
@@ -270,9 +270,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/trunk/src/five/localsitemanager/registry.py
===================================================================
--- five.localsitemanager/trunk/src/five/localsitemanager/registry.py 2008-10-29 14:51:36 UTC (rev 92669)
+++ five.localsitemanager/trunk/src/five/localsitemanager/registry.py 2008-10-29 14:56:20 UTC (rev 92670)
@@ -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