[Checkins] SVN: five.localsitemanager/branches/1.0/ Fix unregistring of components with a physical path.
Sylvain Viollon
sylvain at infrae.com
Mon Oct 19 11:02:34 EDT 2009
Log message for revision 105149:
Fix unregistring of components with a physical path.
Changed:
U five.localsitemanager/branches/1.0/CHANGES.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 2009-10-19 14:55:24 UTC (rev 105148)
+++ five.localsitemanager/branches/1.0/CHANGES.txt 2009-10-19 15:02:34 UTC (rev 105149)
@@ -1,6 +1,12 @@
Changelog
=========
+1.2 - unreleased
+----------------
+
+* Fix unregistring of components which have a physical path.
+ [thefunny42]
+
1.1 - 2009-06-19
----------------
@@ -22,7 +28,7 @@
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]
Modified: five.localsitemanager/branches/1.0/src/five/localsitemanager/registry.py
===================================================================
--- five.localsitemanager/branches/1.0/src/five/localsitemanager/registry.py 2009-10-19 14:55:24 UTC (rev 105148)
+++ five.localsitemanager/branches/1.0/src/five/localsitemanager/registry.py 2009-10-19 15:02:34 UTC (rev 105149)
@@ -165,15 +165,18 @@
class ComponentPathWrapper(persistent.Persistent):
-
+
def __init__(self, component, path):
self.component = component
self.path = path
def __eq__(self, other):
return self.component == other
-
+ def __ne__(self, other):
+ return self.component != other
+
+
class PersistentComponents \
(PersistentComponents,
OFS.ObjectManager.ObjectManager):
@@ -222,7 +225,7 @@
if not hasattr(component, 'getPhysicalPath'):
raise AttributeError(
'Component %r does not implement getPhysicalPath, '
- 'so register it unwrapped or implement this method.' %
+ 'so register it unwrapped or implement this method.' %
component)
path = component.getPhysicalPath()
# If the path is relative we can't store it because we
@@ -242,4 +245,3 @@
zope.event.notify(zope.component.interfaces.Registered(
UtilityRegistration(self, provided, name, component, info)
))
-
More information about the checkins
mailing list