[Zope3-checkins] CVS: Zope3/src/zope/app/registration -
registration.py:1.11
Philipp von Weitershausen
philikon at philikon.de
Wed May 5 08:15:13 EDT 2004
Update of /cvs-repository/Zope3/src/zope/app/registration
In directory cvs.zope.org:/tmp/cvs-serv29355/registration
Modified Files:
registration.py
Log Message:
cleanup
=== Zope3/src/zope/app/registration/registration.py 1.10 => 1.11 ===
--- Zope3/src/zope/app/registration/registration.py:1.10 Fri Apr 30 12:45:29 2004
+++ Zope3/src/zope/app/registration/registration.py Wed May 5 08:14:41 2004
@@ -15,25 +15,27 @@
$Id$
"""
+import sys
from persistent import Persistent
-from zope.app.annotation.interfaces import IAttributeAnnotatable
-from zope.app.container.contained import Contained
-from zope.app.container.contained import setitem, contained, uncontained
-from zope.app.dependable.interfaces import IDependable, DependencyError
-from zope.app.event.interfaces import ISubscriber
-from zope.app import zapi
-from zope.app.module.interfaces import IModuleManager
+
+import zope.cachedescriptors.property
+from zope.interface import implements
from zope.exceptions import DuplicationError
from zope.fssync.server.entryadapter import ObjectEntryAdapter
from zope.fssync.server.interfaces import IObjectFile
-from zope.interface import implements
from zope.proxy import removeAllProxies, getProxiedObject
from zope.security.checker import InterfaceChecker, CheckerPublic
from zope.security.proxy import Proxy, trustedRemoveSecurityProxy
from zope.xmlpickle import dumps, loads
-import interfaces
-import sys
-import zope.cachedescriptors.property
+
+from zope.app import zapi
+from zope.app.annotation.interfaces import IAttributeAnnotatable
+from zope.app.container.contained import Contained
+from zope.app.container.contained import setitem, contained, uncontained
+from zope.app.dependable.interfaces import IDependable, DependencyError
+from zope.app.event.interfaces import ISubscriber
+from zope.app.module.interfaces import IModuleManager
+from zope.app.registration import interfaces
class RegistrationStatusProperty(object):
@@ -247,11 +249,10 @@
# Nothing registered. Need to stick None in front so that nothing
# is active.
data = (None, )
-
+
self.data = data + (registration, )
def unregister(self, registration):
-
data = self.data
if data:
if data[0] == registration:
@@ -358,9 +359,7 @@
return bool(self.data)
def info(self):
-
data = self.data
-
result = [{'active': False,
'registration': registration,
}
@@ -387,7 +386,7 @@
try:
data.append(zapi.traverse(sm, path))
except KeyError:
- # ignore objects we can'r get to
+ # ignore objects we can't get to
raise # for testing
else:
data.append(path)
@@ -627,8 +626,7 @@
return component
-class ComponentRegistrationRemoveSubscriber:
-
+class ComponentRegistrationRemoveSubscriber(object):
implements(ISubscriber)
def __init__(self, component_registration, event):
@@ -645,8 +643,7 @@
if adapter is not None:
adapter.removeUsage(zapi.getPath(self.component_registration))
-class ComponentRegistrationAddSubscriber:
-
+class ComponentRegistrationAddSubscriber(object):
implements(ISubscriber)
def __init__(self, component_registration, event):
@@ -671,7 +668,6 @@
This class is the only place that knows how 'Registered'
data is represented.
"""
-
implements(interfaces.IRegistered)
# We want to use this key:
@@ -690,7 +686,6 @@
class RegistrationManagerRemoveSubscriber:
"""Subscriber for RegistrationManager remove events."""
-
implements(ISubscriber)
def __init__(self, registration_manager, event):
@@ -706,7 +701,6 @@
Manages registrations within a package.
"""
-
implements(interfaces.IRegistrationManager)
def __init__(self):
@@ -839,7 +833,6 @@
class RegisterableContainer(object):
"""Mix-in to implement IRegisterableContainer
"""
-
implements(interfaces.IRegisterableContainer)
def __init__(self):
@@ -914,7 +907,6 @@
class ComponentRegistrationAdapter(ObjectEntryAdapter):
-
"""Fssync adapter for ComponentRegistration objects and subclasses.
This is fairly generic -- it should apply to most subclasses of
More information about the Zope3-Checkins
mailing list