[CMF-checkins] CVS: CMF/CMFUid - UniqueIdAnnotationTool.py:1.8.8.1
UniqueIdGeneratorTool.py:1.12.2.1
UniqueIdHandlerTool.py:1.16.2.1 interfaces.py:1.13.6.1
Tres Seaver
tseaver at palladion.com
Fri Jul 15 18:41:54 EDT 2005
Update of /cvs-repository/CMF/CMFUid
In directory cvs.zope.org:/tmp/cvs-serv16776/CMFUid
Modified Files:
Tag: tseaver-z3_interfaces-branch
UniqueIdAnnotationTool.py UniqueIdGeneratorTool.py
UniqueIdHandlerTool.py interfaces.py
Log Message:
Branch for Z3-ification of CMF interfaces
- All interfaces declared in the CMF are now Zope3-style interfaces
(the one remaining exception is to leave Zope2's
'webdav.WriteLockInterface' declared by CMFCore.PortalContent and
derivatives.).
TOOD
- Clean up XXX'es noted during this pass.
=== CMF/CMFUid/UniqueIdAnnotationTool.py 1.8 => 1.8.8.1 ===
--- CMF/CMFUid/UniqueIdAnnotationTool.py:1.8 Fri Aug 27 04:18:15 2004
+++ CMF/CMFUid/UniqueIdAnnotationTool.py Fri Jul 15 18:41:24 2005
@@ -22,6 +22,8 @@
from Acquisition import aq_base, aq_inner, aq_parent
from Acquisition import Implicit
+from zope.interface import implements, implementedBy
+
from OFS.PropertyManager import PropertyManager
from OFS.SimpleItem import SimpleItem
@@ -36,9 +38,7 @@
"""Unique id object used as annotation on (content) objects.
"""
- __implements__ = (
- IUniqueIdAnnotation,
- )
+ implements(IUniqueIdAnnotation)
def __init__(self, obj, id):
"""See IUniqueIdAnnotation.
@@ -109,11 +109,10 @@
class UniqueIdAnnotationTool(UniqueObject, SimpleItem, PropertyManager, ActionProviderBase):
__doc__ = __doc__ # copy from module
- __implements__ = (
- IUniqueIdAnnotationManagement,
- ActionProviderBase.__implements__,
- SimpleItem.__implements__,
- )
+ implements(IUniqueIdAnnotationManagement,
+ implementedBy(ActionProviderBase),
+ implementedBy(SimpleItem),
+ )
manage_options = (
PropertyManager.manage_options +
=== CMF/CMFUid/UniqueIdGeneratorTool.py 1.12 => 1.12.2.1 ===
--- CMF/CMFUid/UniqueIdGeneratorTool.py:1.12 Thu Jul 14 06:44:50 2005
+++ CMF/CMFUid/UniqueIdGeneratorTool.py Fri Jul 15 18:41:24 2005
@@ -22,6 +22,8 @@
from Globals import InitializeClass
from OFS.SimpleItem import SimpleItem
+from zope.interface import implements, implementedBy
+
from Products.CMFCore.ActionProviderBase import ActionProviderBase
from Products.CMFCore.utils import UniqueObject
from Products.CMFUid.interfaces import IUniqueIdGenerator
@@ -34,11 +36,10 @@
ConflictErrors under high load and the values are predictable.
"""
- __implements__ = (
- IUniqueIdGenerator,
- ActionProviderBase.__implements__,
- SimpleItem.__implements__,
- )
+ implements(IUniqueIdGenerator,
+ implementedBy(ActionProviderBase),
+ implementedBy(SimpleItem),
+ )
id = 'portal_uidgenerator'
alternative_id = 'portal_standard_uidgenerator'
=== CMF/CMFUid/UniqueIdHandlerTool.py 1.16 => 1.16.2.1 ===
--- CMF/CMFUid/UniqueIdHandlerTool.py:1.16 Thu Jul 14 06:45:38 2005
+++ CMF/CMFUid/UniqueIdHandlerTool.py Fri Jul 15 18:41:24 2005
@@ -26,6 +26,8 @@
from OFS.SimpleItem import SimpleItem
+from zope.interface import implements, implementedBy
+
from Products.CMFCore.utils import getToolByName, UniqueObject
from Products.CMFCore.ActionProviderBase import ActionProviderBase
from Products.CMFCore.permissions import ManagePortal
@@ -40,13 +42,12 @@
class UniqueIdHandlerTool(UniqueObject, SimpleItem, ActionProviderBase):
__doc__ = __doc__ # copy from module
- __implements__ = (
- IUniqueIdHandler,
- IUniqueIdBrainQuery,
- IUniqueIdUnrestrictedQuery,
- ActionProviderBase.__implements__,
- SimpleItem.__implements__,
- )
+ implements(IUniqueIdHandler,
+ IUniqueIdBrainQuery,
+ IUniqueIdUnrestrictedQuery,
+ implementedBy(ActionProviderBase),
+ implementedBy(SimpleItem),
+ )
id = 'portal_uidhandler'
alternative_id = "portal_standard_uidhandler"
=== CMF/CMFUid/interfaces.py 1.13 => 1.13.6.1 ===
--- CMF/CMFUid/interfaces.py:1.13 Sun Mar 13 09:14:08 2005
+++ CMF/CMFUid/interfaces.py Fri Jul 15 18:41:24 2005
@@ -19,10 +19,11 @@
$Id$
"""
-from Interface import Interface, Attribute
+from zope.interface import Interface
+from zope.interface import Attribute
-from Products.CMFCore.interfaces.IOpaqueItems \
- import ICallableOpaqueItem, ICallableOpaqueItemEvents
+from Products.CMFCore.interfaces import ICallableOpaqueItem
+from Products.CMFCore.interfaces import ICallableOpaqueItemEvents
class UniqueIdError(Exception): pass
More information about the CMF-checkins
mailing list