diff --git a/browser/configurator.py b/browser/configurator.py index 9058fae..8c0096a 100644 --- a/browser/configurator.py +++ b/browser/configurator.py @@ -23,8 +23,8 @@ $Id$ """ from zope.app import zapi -from zope.app.annotation.interfaces import IAttributeAnnotatable, IAnnotations -from zope.app.annotation.attribute import AttributeAnnotations +from zope.annotation.interfaces import IAttributeAnnotatable, IAnnotations +from zope.annotation.attribute import AttributeAnnotations from zope.cachedescriptors.property import Lazy from zope.interface import Interface, Attribute, implements from zope.component import adapts diff --git a/browser/view.py b/browser/view.py index bfe5233..6542a80 100644 --- a/browser/view.py +++ b/browser/view.py @@ -25,7 +25,7 @@ $Id$ from zope import component from zope.interface import Interface, implements from zope.cachedescriptors.property import Lazy -from zope.publisher.interfaces.browser import ISkin +from zope.publisher.interfaces.browser import IBrowserSkinType from zope.app.pagetemplate import ViewPageTemplateFile @@ -108,7 +108,7 @@ class GenericView(object): def setSkin(self, skinName): skin = None if skinName: - skin = component.queryUtility(ISkin, skinName) + skin = component.queryUtility(IBrowserSkinType, skinName) if skin: applySkin(self.request, skin) self.skin = skin diff --git a/relation/interfaces.py b/relation/interfaces.py index 90036e5..f56e935 100644 --- a/relation/interfaces.py +++ b/relation/interfaces.py @@ -23,7 +23,7 @@ $Id$ """ from zope.interface import Interface, Attribute -from zope.app.event.interfaces import IObjectEvent +from zope.component.interfaces import IObjectEvent # relation interfaces @@ -31,7 +31,7 @@ from zope.app.event.interfaces import IObjectEvent class IRelation(Interface): """ Base interface for relations. """ - + def getPredicateName(): """ Return the predicate of this relation as a string that may be used for indexing. @@ -41,7 +41,7 @@ class IRelation(Interface): """ Return True if this relation is valid. If the registry argument is provided the check should be done - with respect to this relation registry, e.g. to + with respect to this relation registry, e.g. to """ @@ -54,8 +54,8 @@ class IMonadicRelation(IRelation): """ first = Attribute('First and only object that belongs to the relation.') - - + + class IDyadicRelation(IRelation): """ Relation connecting two objects. """ @@ -63,11 +63,11 @@ class IDyadicRelation(IRelation): first = Attribute('First object that belongs to the relation.') second = Attribute('Second object that belongs to the relation.') - + class ITriadicRelation(IDyadicRelation): """ Relation connecting three objects. """ - + third = Attribute('Third object that belongs to the relation.') @@ -90,14 +90,14 @@ class IAttributeRelation(IDyadicRelation): class IPredicate(Interface): """ A predicate signifies a relationship. This may be implemented - directly as a relation class, or the relation object may + directly as a relation class, or the relation object may hold the predicate as an attribute. """ - + def getPredicateName(): """ Return this predicate as a string that may be used for indexing. """ - + # event interfaces @@ -117,7 +117,7 @@ class IRelatable(Interface): # relation registry interfaces - + class IRelationRegistryUpdate(Interface): """ Interface for registering and unregistering relations with a relation registry. @@ -148,7 +148,7 @@ class IRelationRegistryQuery(Interface): search criteria, i.e. its predicate and first, second or third attribute will be used for searching, or explicit criteria via keyword arguments. - + Example for using keyword criteria: rr.queryRelations(first=someObject, second=anotherObject, relationship=SomeRelationClass) diff --git a/relation/registry.py b/relation/registry.py index f1b0c8b..0b70bae 100644 --- a/relation/registry.py +++ b/relation/registry.py @@ -30,9 +30,9 @@ from zope.app import zapi from zope.app.catalog.catalog import Catalog from zope.app.catalog.field import FieldIndex from zope.app.intid.interfaces import IIntIds -from zope.app.location.interfaces import ILocation +from zope.location.interfaces import ILocation from zope.event import notify -from zope.app.event.objectevent import ObjectEvent +from zope.component.interfaces import ObjectEvent from zope.security.proxy import removeSecurityProxy from interfaces import IRelationRegistry, IRelationInvalidatedEvent @@ -198,7 +198,7 @@ def getRelations(first=None, second=None, third=None, relationships=None): The relationships parameter expects a sequence of relationships (relation classes or predicate objects). """ - registry = zapi.getUtility(IRelationRegistry) + registry = component.getUtility(IRelationRegistry) query = {} if first is not None: query['first'] = first if second is not None: query['second'] = second diff --git a/storage/interfaces.py b/storage/interfaces.py index 3a5e520..92bf635 100644 --- a/storage/interfaces.py +++ b/storage/interfaces.py @@ -38,6 +38,6 @@ class IExternalStorage(Interface): def getData(address, params=None): """ Retrieve the data from the address specified, using the (optional) params argument that may give more information on - where and how to the data can be found. + where and how the data can be found. """