[Zope3-checkins] CVS: Zope3/src/zope/app/services - view.py:1.36
servicecontainer.py:1.8 pagefolder.py:1.15 hub.py:1.23
Jeremy Hylton
cvs-admin at zope.org
Mon Nov 3 23:04:56 EST 2003
Update of /cvs-repository/Zope3/src/zope/app/services
In directory cvs.zope.org:/tmp/cvs-serv28992/src/zope/app/services
Modified Files:
view.py servicecontainer.py pagefolder.py hub.py
Log Message:
Fix various import issues.
Some names where from imported twice.
Other imports were unused.
Often imports were in partly random order, making them harder to read.
=== Zope3/src/zope/app/services/view.py 1.35 => 1.36 ===
--- Zope3/src/zope/app/services/view.py:1.35 Sun Sep 21 13:31:12 2003
+++ Zope3/src/zope/app/services/view.py Mon Nov 3 23:04:25 2003
@@ -16,40 +16,32 @@
"""
__metaclass__ = type
-from __future__ import generators
-
from persistence import Persistent
from persistence.dict import PersistentDict
-from zope.publisher.interfaces.browser import IBrowserPresentation
-
-from zope.component.interfaces import IViewService, IGlobalViewService
-from zope.component.exceptions import ComponentLookupError
-
+from zope.app.component.nextservice import getNextService
+from zope.app.container.contained import Contained
from zope.app.i18n import ZopeMessageIDFactory as _
+from zope.app import zapi
from zope.app.interfaces.services.interface import IInterfaceBasedRegistry
from zope.app.interfaces.services.registration import ActiveStatus
from zope.app.interfaces.services.registration import IRegistry, IRegistration
+from zope.app.interfaces.services.service import ISimpleService
+from zope.app.interfaces.services.view import ILocalViewService
+from zope.app.interfaces.services.view import IPageRegistration
+from zope.app.interfaces.services.view import IViewRegistration
+from zope.app.services.adapter import PersistentAdapterRegistry
from zope.app.services.registration import RegistrationStack
from zope.app.services.registration import SimpleRegistration
from zope.app.services.servicenames import Views
-from zope.app.component.nextservice import getNextService
-from zope.app import zapi
+from zope.component.exceptions import ComponentLookupError
+from zope.component.interfaces import IViewService, IGlobalViewService
+from zope.configuration.exceptions import ConfigurationError
+from zope.exceptions import NotFoundError
from zope.interface import implements
-
-from zope.security.checker import NamesChecker, ProxyFactory
-
from zope.proxy import removeAllProxies
-from zope.exceptions import NotFoundError
-
-from zope.app.interfaces.services.interface import IInterfaceBasedRegistry
-from zope.app.interfaces.services.view import IViewRegistration
-from zope.app.interfaces.services.view import IPageRegistration
-from zope.app.interfaces.services.view import ILocalViewService
-from zope.app.services.adapter import PersistentAdapterRegistry
-from zope.configuration.exceptions import ConfigurationError
-from zope.app.interfaces.services.service import ISimpleService
-from zope.app.container.contained import Contained
+from zope.publisher.interfaces.browser import IBrowserPresentation
+from zope.security.checker import NamesChecker, ProxyFactory
class ViewService(Persistent, Contained):
@@ -350,7 +342,8 @@
if self.template and self.attribute:
raise ConfigurationError(
"PageRegistration for %s view name %s: "
- "Cannot have both 'template' and 'attribute' at the same time." %
+ "Cannot have both 'template' and 'attribute' "
+ "at the same time." %
(self.forInterface, self.viewName))
if not self.template and not self.attribute:
=== Zope3/src/zope/app/services/servicecontainer.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/services/servicecontainer.py:1.7 Mon Nov 3 16:37:56 2003
+++ Zope3/src/zope/app/services/servicecontainer.py Mon Nov 3 23:04:25 2003
@@ -16,13 +16,16 @@
$Id$
"""
-from zope.component.exceptions import ComponentLookupError
+import zope.interface
+
+from transaction import get_transaction
+from zope.app.container.contained import Contained
+from zope.app.event.function import Subscriber
+from zope.app import zapi
from zope.app.interfaces.services.service import IPossibleSite, ISite
+from zope.component.exceptions import ComponentLookupError
from zope.component.interfaces import IServiceService
from zope.interface import implements
-from zope.app.container.contained import Contained
-from zope.app import zapi
-import zope.interface
class ServiceManagerContainer(Contained):
@@ -58,13 +61,6 @@
ISite,
zope.interface.directlyProvidedBy(self))
-
-
-
-from zope.app.event.function import Subscriber
-from transaction import get_transaction
-from zope.component.exceptions import ComponentLookupError
-
def fixup(event):
database = event.database
connection = database.open()
@@ -97,5 +93,3 @@
for item in folder.values():
if IPossibleSite.isImplementedBy(item):
fixfolder(item)
-
-
=== Zope3/src/zope/app/services/pagefolder.py 1.14 => 1.15 ===
--- Zope3/src/zope/app/services/pagefolder.py:1.14 Sun Sep 21 13:32:54 2003
+++ Zope3/src/zope/app/services/pagefolder.py Mon Nov 3 23:04:25 2003
@@ -21,22 +21,21 @@
__metaclass__ = type
from zope.app.container.btree import BTreeContainer
-from zope.app.interfaces.services.view import IZPTTemplate
-from zope.publisher.interfaces.browser import IBrowserPresentation
-from zope.app.traversing import getPath
-from zope.app.interfaces.services.registration import ActiveStatus
-from zope.app.services.registration import RegistrationManagerContainer
-from zope.proxy import removeAllProxies
-from zope.app.services.view import PageRegistration
-from zope.app.interfaces.services.pagefolder import IPageFolder
-from zope.app.interfaces.services.registration import IRegistrationManager
-from zope.app.interfaces.file import IDirectoryFactory
from zope.app.fssync.classes import ObjectEntryAdapter, AttrMapping
+from zope.app.interfaces.file import IDirectoryFactory
from zope.app.interfaces.fssync import IObjectDirectory
-from zope.interface import implements
+from zope.app.interfaces.services.pagefolder import IPageFolder
from zope.app.interfaces.services.registration import ActiveStatus
+from zope.app.interfaces.services.registration import IRegistrationManager
from zope.app.interfaces.services.registration import RegisteredStatus
from zope.app.interfaces.services.registration import UnregisteredStatus
+from zope.app.interfaces.services.view import IZPTTemplate
+from zope.app.services.registration import RegistrationManagerContainer
+from zope.app.services.view import PageRegistration
+from zope.app.traversing import getPath
+from zope.interface import implements
+from zope.proxy import removeAllProxies
+from zope.publisher.interfaces.browser import IBrowserPresentation
class PageFolder(RegistrationManagerContainer, BTreeContainer):
=== Zope3/src/zope/app/services/hub.py 1.22 => 1.23 ===
--- Zope3/src/zope/app/services/hub.py:1.22 Fri Oct 31 18:09:16 2003
+++ Zope3/src/zope/app/services/hub.py Mon Nov 3 23:04:25 2003
@@ -26,38 +26,34 @@
from zodb.btrees.IOBTree import IOBTree
from zodb.btrees.OIBTree import OIBTree
-from zope.app.traversing import getPath, canonicalPath
-
from zope.component import getAdapter, getService
from zope.exceptions import NotFoundError
from zope.proxy import removeAllProxies
from zope.app.services.servicenames import EventSubscription
-from zope.app.interfaces.traversing import ITraverser
from zope.app.interfaces.event import IObjectEvent
from zope.app.interfaces.container import IObjectRemovedEvent
from zope.app.interfaces.container import IObjectMovedEvent
+from zope.app.interfaces.container import IObjectAddedEvent
+from zope.app.interfaces.content.folder import IFolder
+from zope.app.interfaces.event import ISubscriber
from zope.app.interfaces.event import IObjectCreatedEvent
from zope.app.interfaces.event import IObjectModifiedEvent
from zope.app.interfaces.services.hub import IObjectHub, ObjectHubError
-from zope.app.services.event import ServiceSubscriberEventChannel
from zope.app.interfaces.services.hub import IObjectRegisteredHubEvent
from zope.app.interfaces.services.hub import IObjectUnregisteredHubEvent
from zope.app.interfaces.services.hub import IObjectModifiedHubEvent
from zope.app.interfaces.services.hub import IObjectMovedHubEvent
from zope.app.interfaces.services.hub import IObjectRemovedHubEvent
-from zope.app.interfaces.traversing import ITraverser
from zope.app.interfaces.services.service import ISimpleService
+from zope.app.interfaces.traversing import ITraverser, ITraversable
+from zope.app.container.contained import ObjectAddedEvent
from zope.interface import implements
-from zope.app.interfaces.event import ISubscriber
-from zope.app.interfaces.container import IObjectAddedEvent
-from zope.app.interfaces.content.folder import IFolder
-from zope.app.interfaces.traversing import ITraversable
+from zope.app.services.event import ServiceSubscriberEventChannel
from zope.app.services.servicenames import HubIds
-from zope.app.container.contained import ObjectAddedEvent
-from zope.app.traversing import traverse, traverseName, getPath, getRoot
-from zope.app.interfaces.services.hub import ObjectHubError
+from zope.app.traversing \
+ import getPath, canonicalPath, traverse, traverseName, getRoot
from zope.app.interfaces.services.hub import ISubscriptionControl
from persistence import Persistent
from zope.app.container.contained import Contained
More information about the Zope3-Checkins
mailing list