[CMF-checkins] SVN: CMF/trunk/ - removed z2 interfaces
Yvo Schubbe
y.2007- at wcm-solutions.de
Fri Mar 16 04:55:11 EDT 2007
Log message for revision 73215:
- removed z2 interfaces
Changed:
U CMF/trunk/CHANGES.txt
U CMF/trunk/CMFCalendar/Event.py
U CMF/trunk/CMFCalendar/tests/test_Calendar.py
U CMF/trunk/CMFCalendar/tests/test_Event.py
U CMF/trunk/CMFCore/ActionInformation.py
U CMF/trunk/CMFCore/ActionProviderBase.py
U CMF/trunk/CMFCore/ActionsTool.py
U CMF/trunk/CMFCore/CMFCatalogAware.py
U CMF/trunk/CMFCore/CachingPolicyManager.py
U CMF/trunk/CMFCore/CatalogTool.py
U CMF/trunk/CMFCore/ContentTypeRegistry.py
U CMF/trunk/CMFCore/DiscussionTool.py
U CMF/trunk/CMFCore/DynamicType.py
U CMF/trunk/CMFCore/MemberDataTool.py
U CMF/trunk/CMFCore/MembershipTool.py
U CMF/trunk/CMFCore/PortalContent.py
U CMF/trunk/CMFCore/PortalFolder.py
U CMF/trunk/CMFCore/RegistrationTool.py
U CMF/trunk/CMFCore/SkinsContainer.py
U CMF/trunk/CMFCore/SkinsTool.py
U CMF/trunk/CMFCore/TypesTool.py
U CMF/trunk/CMFCore/URLTool.py
U CMF/trunk/CMFCore/UndoTool.py
U CMF/trunk/CMFCore/WorkflowTool.py
U CMF/trunk/CMFCore/exportimport/actions.py
U CMF/trunk/CMFCore/exportimport/tests/test_actions.py
U CMF/trunk/CMFCore/fiveactionstool.py
D CMF/trunk/CMFCore/interfaces/CachingPolicyManager.py
D CMF/trunk/CMFCore/interfaces/ContentTypeRegistry.py
D CMF/trunk/CMFCore/interfaces/Contentish.py
D CMF/trunk/CMFCore/interfaces/Discussions.py
D CMF/trunk/CMFCore/interfaces/DublinCore.py
D CMF/trunk/CMFCore/interfaces/Dynamic.py
D CMF/trunk/CMFCore/interfaces/Folderish.py
D CMF/trunk/CMFCore/interfaces/IOpaqueItems.py
D CMF/trunk/CMFCore/interfaces/Syndicatable.py
U CMF/trunk/CMFCore/interfaces/__init__.py
D CMF/trunk/CMFCore/interfaces/portal_actions.py
D CMF/trunk/CMFCore/interfaces/portal_catalog.py
D CMF/trunk/CMFCore/interfaces/portal_discussion.py
D CMF/trunk/CMFCore/interfaces/portal_memberdata.py
D CMF/trunk/CMFCore/interfaces/portal_membership.py
D CMF/trunk/CMFCore/interfaces/portal_metadata.py
D CMF/trunk/CMFCore/interfaces/portal_properties.py
D CMF/trunk/CMFCore/interfaces/portal_registration.py
D CMF/trunk/CMFCore/interfaces/portal_skins.py
D CMF/trunk/CMFCore/interfaces/portal_types.py
D CMF/trunk/CMFCore/interfaces/portal_undo.py
D CMF/trunk/CMFCore/interfaces/portal_url.py
D CMF/trunk/CMFCore/interfaces/portal_workflow.py
U CMF/trunk/CMFCore/testing.py
U CMF/trunk/CMFCore/tests/test_ActionInformation.py
U CMF/trunk/CMFCore/tests/test_ActionProviderBase.py
U CMF/trunk/CMFCore/tests/test_ActionsTool.py
U CMF/trunk/CMFCore/tests/test_CachingPolicyManager.py
U CMF/trunk/CMFCore/tests/test_CatalogTool.py
U CMF/trunk/CMFCore/tests/test_ContentTypeRegistry.py
U CMF/trunk/CMFCore/tests/test_CookieCrumbler.py
U CMF/trunk/CMFCore/tests/test_DiscussionTool.py
U CMF/trunk/CMFCore/tests/test_DynamicType.py
U CMF/trunk/CMFCore/tests/test_MemberDataTool.py
U CMF/trunk/CMFCore/tests/test_MembershipTool.py
U CMF/trunk/CMFCore/tests/test_OpaqueItems.py
U CMF/trunk/CMFCore/tests/test_PortalContent.py
U CMF/trunk/CMFCore/tests/test_PortalFolder.py
U CMF/trunk/CMFCore/tests/test_RegistrationTool.py
U CMF/trunk/CMFCore/tests/test_SkinsTool.py
U CMF/trunk/CMFCore/tests/test_TypesTool.py
U CMF/trunk/CMFCore/tests/test_URLTool.py
U CMF/trunk/CMFCore/tests/test_UndoTool.py
U CMF/trunk/CMFCore/tests/test_WorkflowTool.py
U CMF/trunk/CMFDefault/DefaultWorkflow.py
U CMF/trunk/CMFDefault/DiscussionItem.py
U CMF/trunk/CMFDefault/DiscussionTool.py
U CMF/trunk/CMFDefault/Document.py
U CMF/trunk/CMFDefault/DublinCore.py
U CMF/trunk/CMFDefault/Favorite.py
U CMF/trunk/CMFDefault/File.py
U CMF/trunk/CMFDefault/Image.py
U CMF/trunk/CMFDefault/Link.py
U CMF/trunk/CMFDefault/MembershipTool.py
U CMF/trunk/CMFDefault/MetadataTool.py
U CMF/trunk/CMFDefault/NewsItem.py
U CMF/trunk/CMFDefault/PropertiesTool.py
U CMF/trunk/CMFDefault/RegistrationTool.py
U CMF/trunk/CMFDefault/SyndicationTool.py
D CMF/trunk/CMFDefault/interfaces/Document.py
U CMF/trunk/CMFDefault/interfaces/__init__.py
D CMF/trunk/CMFDefault/interfaces/portal_membership.py
U CMF/trunk/CMFDefault/tests/test_DefaultWorkflow.py
U CMF/trunk/CMFDefault/tests/test_DiscussionTool.py
U CMF/trunk/CMFDefault/tests/test_Discussions.py
U CMF/trunk/CMFDefault/tests/test_Document.py
U CMF/trunk/CMFDefault/tests/test_DublinCore.py
U CMF/trunk/CMFDefault/tests/test_Favorite.py
U CMF/trunk/CMFDefault/tests/test_File.py
U CMF/trunk/CMFDefault/tests/test_Image.py
U CMF/trunk/CMFDefault/tests/test_Link.py
U CMF/trunk/CMFDefault/tests/test_MembershipTool.py
U CMF/trunk/CMFDefault/tests/test_MetadataTool.py
U CMF/trunk/CMFDefault/tests/test_NewsItem.py
U CMF/trunk/CMFDefault/tests/test_PropertiesTool.py
U CMF/trunk/CMFDefault/tests/test_RegistrationTool.py
U CMF/trunk/CMFDefault/tests/test_SkinnedFolder.py
U CMF/trunk/CMFDefault/tests/test_SyndicationTool.py
U CMF/trunk/CMFTopic/DateCriteria.py
U CMF/trunk/CMFTopic/ListCriterion.py
U CMF/trunk/CMFTopic/SimpleIntCriterion.py
U CMF/trunk/CMFTopic/SimpleStringCriterion.py
U CMF/trunk/CMFTopic/SortCriterion.py
D CMF/trunk/CMFTopic/interfaces/Criterion.py
U CMF/trunk/CMFTopic/interfaces/__init__.py
U CMF/trunk/CMFTopic/tests/common.py
U CMF/trunk/CMFTopic/tests/test_Topic.py
U CMF/trunk/CMFUid/UniqueIdAnnotationTool.py
U CMF/trunk/CMFUid/UniqueIdGeneratorTool.py
U CMF/trunk/CMFUid/UniqueIdHandlerTool.py
U CMF/trunk/CMFUid/tests/test_uidannotation.py
U CMF/trunk/CMFUid/tests/test_uidgeneration.py
U CMF/trunk/CMFUid/tests/test_uidhandling.py
U CMF/trunk/DCWorkflow/DCWorkflow.py
U CMF/trunk/DCWorkflow/tests/test_DCWorkflow.py
-=-
Modified: CMF/trunk/CHANGES.txt
===================================================================
--- CMF/trunk/CHANGES.txt 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CHANGES.txt 2007-03-16 08:55:04 UTC (rev 73215)
@@ -2,10 +2,16 @@
Others
+ - interfaces: Removed deprecated oldstyle interfaces.
+
- CMFCore.MembershipTool: Removed ancient LoginManager compatibility code
and deprecated the no longer needed __getPUS method.
-CMF 2.1.x and earlier
+CMF 2.1.x
+ For a complete list see CHANGES.txt of the 2.1 branch.
+
+CMF 2.0.x and earlier
+
For a complete list of changes see HISTORY.txt.
Modified: CMF/trunk/CMFCalendar/Event.py
===================================================================
--- CMF/trunk/CMFCalendar/Event.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCalendar/Event.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -99,9 +99,6 @@
security.declareObjectProtected(View)
implements(IMutableEvent, IEvent, IDAVAware)
- __implements__ = ( PortalContent.__implements__
- , DefaultDublinCoreImpl.__implements__
- )
def __init__( self
, id
@@ -292,7 +289,7 @@
""" Return our end time as a DateTime object
"""
date = getattr( self, 'end_date', None )
- return date is None and self.start() or date
+ return date is None and self.start() or date
security.declarePublic('getStartTimeString')
def getStartTimeString( self ):
Modified: CMF/trunk/CMFCalendar/tests/test_Calendar.py
===================================================================
--- CMF/trunk/CMFCalendar/tests/test_Calendar.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCalendar/tests/test_Calendar.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -25,6 +25,7 @@
from AccessControl.User import UnrestrictedUser
from DateTime import DateTime
from zope.app.component.hooks import setSite
+from zope.interface.verify import verifyClass
from Products.CMFCalendar.testing import FunctionalLayer
@@ -39,8 +40,7 @@
def _makeOne(self, *args, **kw):
return self._getTargetClass()(*args, **kw)
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCalendar.interfaces import ICalendarTool
verifyClass(ICalendarTool, self._getTargetClass())
Modified: CMF/trunk/CMFCalendar/tests/test_Event.py
===================================================================
--- CMF/trunk/CMFCalendar/tests/test_Event.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCalendar/tests/test_Event.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -19,6 +19,7 @@
import Testing
from DateTime import DateTime
+from zope.interface.verify import verifyClass
from Products.CMFCore.testing import ConformsToContent
from Products.CMFCore.tests.base.testcase import RequestTest
@@ -34,8 +35,7 @@
def _makeOne(self, *args, **kw):
return self._getTargetClass()(*args, **kw)
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCalendar.interfaces import IEvent
from Products.CMFCalendar.interfaces import IMutableEvent
@@ -145,7 +145,7 @@
self.assertEqual( d.Title(), 'Test Event' )
self.assertEqual( d.Format(), 'text/html' )
self.assertEqual( d.Description().strip()
- , 'Fundraiser for disabled goldfish'
+ , 'Fundraiser for disabled goldfish'
)
self.assertEqual( d.Subject(), ('Foosubject',) )
self.assertEqual( d.Contributors(), ('Jim',) )
Modified: CMF/trunk/CMFCore/ActionInformation.py
===================================================================
--- CMF/trunk/CMFCore/ActionInformation.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/ActionInformation.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -24,7 +24,6 @@
from OFS.OrderedFolder import OrderedFolder
from OFS.PropertyManager import PropertyManager
from OFS.SimpleItem import SimpleItem
-
from zope.component import getUtility
from zope.i18nmessageid import Message
from zope.interface import implements
@@ -34,20 +33,18 @@
from interfaces import IActionCategory
from interfaces import IActionInfo
from interfaces import IMembershipTool
-from interfaces.portal_actions import ActionInfo as z2IActionInfo
from permissions import View
from utils import _checkPermission
-
_unchanged = [] # marker
+
class ActionCategory(IFAwareObjectManager, OrderedFolder):
""" Group of Action objects.
"""
implements(IActionCategory)
- __implements__ = OrderedFolder.__implements__
_product_interfaces = (IActionCategory, IAction)
@@ -164,7 +161,6 @@
"""
implements(IActionInfo)
- __implements__ = z2IActionInfo
__allow_access_to_unprotected_subobjects__ = 1
@@ -496,6 +492,7 @@
class oai:
+
#Provided for backwards compatability
# Provides information that may be needed when constructing the list of
# available actions.
@@ -528,4 +525,3 @@
if hasattr(self, name):
return getattr(self, name)
raise KeyError, name
-
Modified: CMF/trunk/CMFCore/ActionProviderBase.py
===================================================================
--- CMF/trunk/CMFCore/ActionProviderBase.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/ActionProviderBase.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -26,17 +26,16 @@
from exceptions import AccessControl_Unauthorized
from Expression import getExprContext
from interfaces import IActionProvider
-from interfaces.portal_actions import ActionProvider as z2IActionProvider
from permissions import ManagePortal
from utils import _dtmldir
class ActionProviderBase:
+
""" Provide ActionTabs and management methods for ActionProviders
"""
implements(IActionProvider)
- __implements__ = z2IActionProvider
security = ClassSecurityInfo()
Modified: CMF/trunk/CMFCore/ActionsTool.py
===================================================================
--- CMF/trunk/CMFCore/ActionsTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/ActionsTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -26,8 +26,6 @@
from interfaces import IActionCategory
from interfaces import IActionProvider
from interfaces import IActionsTool
-from interfaces.portal_actions import ActionProvider as z2IActionProvider
-from interfaces.portal_actions import portal_actions as z2IActionsTool
from permissions import ManagePortal
from utils import _dtmldir
from utils import registerToolInterface
@@ -43,8 +41,6 @@
"""
implements(IActionsTool)
- __implements__ = (z2IActionsTool, OrderedFolder.__implements__,
- ActionProviderBase.__implements__)
id = 'portal_actions'
meta_type = 'CMF Actions Tool'
@@ -159,14 +155,12 @@
# Include actions from specific tools.
for provider_name in self.listActionProviders():
provider = getattr(self, provider_name)
- if IActionProvider.providedBy(provider) or \
- z2IActionProvider.isImplementedBy(provider):
+ if IActionProvider.providedBy(provider):
actions.extend( provider.listActionInfos(object=object) )
# Include actions from object.
if object is not None:
- if IActionProvider.providedBy(object) or \
- z2IActionProvider.isImplementedBy(object):
+ if IActionProvider.providedBy(object):
actions.extend( object.listActionInfos(object=object) )
# Reorganize the actions by category.
Modified: CMF/trunk/CMFCore/CMFCatalogAware.py
===================================================================
--- CMF/trunk/CMFCore/CMFCatalogAware.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/CMFCatalogAware.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -24,25 +24,20 @@
from Globals import InitializeClass
from OFS.interfaces import IObjectClonedEvent
from OFS.interfaces import IObjectWillBeMovedEvent
-
from zope.app.container.interfaces import IObjectAddedEvent
from zope.app.container.interfaces import IObjectMovedEvent
from zope.component import queryUtility
from zope.component import subscribers
+from interfaces import ICallableOpaqueItem
+from interfaces import ICatalogTool
+from interfaces import IConfigurableWorkflowTool
from permissions import AccessContentsInformation
from permissions import ManagePortal
from permissions import ModifyPortalContent
from utils import _dtmldir
from utils import _getAuthenticatedUser
-from interfaces import ICallableOpaqueItem
-from interfaces import ICatalogTool
-from interfaces import IConfigurableWorkflowTool
-from interfaces.IOpaqueItems \
- import ICallableOpaqueItem as z2ICallableOpaqueItem
-
-
logger = logging.getLogger('CMFCore.CMFCatalogAware')
@@ -178,8 +173,7 @@
self_base = aq_base(self)
for name in self_base.__dict__.keys():
obj = getattr(self, name)
- if ICallableOpaqueItem.providedBy(obj) \
- or z2ICallableOpaqueItem.isImplementedBy(obj):
+ if ICallableOpaqueItem.providedBy(obj):
items.append((obj.getId(), obj))
return tuple(items)
Modified: CMF/trunk/CMFCore/CachingPolicyManager.py
===================================================================
--- CMF/trunk/CMFCore/CachingPolicyManager.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/CachingPolicyManager.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -29,19 +29,16 @@
from OFS.SimpleItem import SimpleItem
from Products.PageTemplates.Expressions import getEngine
from Products.PageTemplates.Expressions import SecureModuleImporter
-
from zope.app.container.interfaces import IObjectMovedEvent
from zope.component import queryUtility
from zope.interface import implements
-from permissions import ManagePortal
-from permissions import View
from Expression import Expression
from interfaces import ICachingPolicy
from interfaces import ICachingPolicyManager
from interfaces import IMembershipTool
-from interfaces.CachingPolicyManager \
- import CachingPolicyManager as z2ICachingPolicyManager
+from permissions import ManagePortal
+from permissions import View
from utils import _dtmldir
from utils import _setCacheHeaders
from utils import _ViewEmulator
@@ -132,7 +129,7 @@
with access to the following top-level names:
'object' -- the object itself
-
+
'view' -- the name of the view method
'keywords' -- keywords passed to the request
@@ -184,9 +181,9 @@
'must_revalidate=1' argument => "must-revalidate" token
'proxy_revalidate=1' argument => "proxy-revalidate" token
-
+
'public=1' argument => "public" token
-
+
'private=1' argument => "private" token
'no_transform=1' argument => "no-transform" token
@@ -257,7 +254,7 @@
pre_check = None
else:
pre_check = int(pre_check)
-
+
if post_check is not None:
if str(post_check).strip() == '':
post_check = None
@@ -377,7 +374,7 @@
"""
"""
return getattr(self, '_post_check', None)
-
+
def testPredicate(self, expr_context):
""" Does this request match our predicate?"""
return self._predicate(expr_context)
@@ -407,7 +404,7 @@
exp_time_str = rfc1123_date(now.timeTime() + self._max_age_secs)
headers.append( ( 'Expires', exp_time_str ) )
control.append( 'max-age=%d' % self._max_age_secs )
-
+
if self.getSMaxAgeSecs() is not None:
control.append( 's-maxage=%d' % self._s_max_age_secs )
@@ -462,7 +459,6 @@
"""
implements(ICachingPolicyManager)
- __implements__ = z2ICachingPolicyManager
id = 'caching_policy_manager'
meta_type = 'CMF Caching Policy Manager'
@@ -530,7 +526,7 @@
s_max_age_secs = None
else:
s_max_age_secs = int(s_max_age_secs)
-
+
if pre_check is None or str(pre_check).strip() == '':
pre_check = None
else:
@@ -601,7 +597,7 @@
s_max_age_secs = None
else:
s_max_age_secs = int(s_max_age_secs)
-
+
if pre_check is None or str(pre_check).strip() == '':
pre_check = None
else:
@@ -849,7 +845,7 @@
context = createCPContext( content, view_method, keywords, time=time )
for policy_id, policy in self.listPolicies():
if policy.getEnable304s() and policy.testPredicate(context):
-
+
last_modified = policy._mtime_func(context)
if type(last_modified) is type(''):
last_modified = DateTime(last_modified)
@@ -857,9 +853,9 @@
content_etag = None
if policy.getETagFunc():
content_etag = policy._etag_func(context)
-
+
return (last_modified, content_etag, policy.getLastModified())
-
+
return None
#
Modified: CMF/trunk/CMFCore/CatalogTool.py
===================================================================
--- CMF/trunk/CMFCore/CatalogTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/CatalogTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -24,7 +24,6 @@
from Globals import InitializeClass
from Products.PluginIndexes.common import safe_callable
from Products.ZCatalog.ZCatalog import ZCatalog
-
from zope.component import queryUtility
from zope.interface import implements
from zope.interface import providedBy
@@ -34,11 +33,8 @@
from ActionProviderBase import ActionProviderBase
from interfaces import ICatalogTool
-from interfaces import IIndexableObjectWrapper
from interfaces import IConfigurableWorkflowTool
-from interfaces.portal_catalog \
- import IndexableObjectWrapper as z2IIndexableObjectWrapper
-from interfaces.portal_catalog import portal_catalog as z2ICatalogTool
+from interfaces import IIndexableObjectWrapper
from permissions import AccessInactivePortalContent
from permissions import ManagePortal
from permissions import View
@@ -64,7 +60,6 @@
class IndexableObjectWrapper(object):
implements(IIndexableObjectWrapper)
- __implements__ = z2IIndexableObjectWrapper
__providedBy__ = IndexableObjectSpecification()
def __init__(self, vars, ob):
@@ -119,8 +114,6 @@
"""
implements(ICatalogTool)
- __implements__ = (z2ICatalogTool, ZCatalog.__implements__,
- ActionProviderBase.__implements__)
id = 'portal_catalog'
meta_type = 'CMF Catalog'
Modified: CMF/trunk/CMFCore/ContentTypeRegistry.py
===================================================================
--- CMF/trunk/CMFCore/ContentTypeRegistry.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/ContentTypeRegistry.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -22,31 +22,26 @@
from Globals import InitializeClass
from Globals import PersistentMapping
from OFS.SimpleItem import SimpleItem
-from ZPublisher.mapply import mapply
-
from zope.component import getUtility
from zope.interface import implements
+from ZPublisher.mapply import mapply
from interfaces import IContentTypeRegistry
from interfaces import IContentTypeRegistryPredicate
from interfaces import ITypesTool
-from interfaces.ContentTypeRegistry \
- import ContentTypeRegistry as z2IContentTypeRegistry
-from interfaces.ContentTypeRegistry \
- import ContentTypeRegistryPredicate as z2IContentTypeRegistryPredicate
from permissions import ManagePortal
from utils import _dtmldir
from utils import registerToolInterface
class MajorMinorPredicate( SimpleItem ):
+
"""
Predicate matching on 'major/minor' content types.
Empty major or minor implies wildcard (all match).
"""
implements(IContentTypeRegistryPredicate)
- __implements__ = z2IContentTypeRegistryPredicate
major = minor = None
PREDICATE_TYPE = 'major_minor'
@@ -127,13 +122,14 @@
InitializeClass( MajorMinorPredicate )
+
class ExtensionPredicate( SimpleItem ):
+
"""
Predicate matching on filename extensions.
"""
implements(IContentTypeRegistryPredicate)
- __implements__ = z2IContentTypeRegistryPredicate
extensions = None
PREDICATE_TYPE = 'extension'
@@ -190,7 +186,9 @@
InitializeClass( ExtensionPredicate )
+
class MimeTypeRegexPredicate( SimpleItem ):
+
"""
Predicate matching only on 'typ', using regex matching for
string patterns (other objects conforming to 'match' can
@@ -198,7 +196,6 @@
"""
implements(IContentTypeRegistryPredicate)
- __implements__ = z2IContentTypeRegistryPredicate
pattern = None
PREDICATE_TYPE = 'mimetype_regex'
@@ -247,7 +244,9 @@
InitializeClass( MimeTypeRegexPredicate )
+
class NameRegexPredicate( SimpleItem ):
+
"""
Predicate matching only on 'name', using regex matching
for string patterns (other objects conforming to 'match'
@@ -255,7 +254,6 @@
"""
implements(IContentTypeRegistryPredicate)
- __implements__ = z2IContentTypeRegistryPredicate
pattern = None
PREDICATE_TYPE = 'name_regex'
@@ -325,12 +323,12 @@
class ContentTypeRegistry( SimpleItem ):
+
"""
Registry for rules which map PUT args to a CMF Type Object.
"""
implements(IContentTypeRegistry)
- __implements__ = z2IContentTypeRegistry
meta_type = 'Content Type Registry'
id = 'content_type_registry'
Modified: CMF/trunk/CMFCore/DiscussionTool.py
===================================================================
--- CMF/trunk/CMFCore/DiscussionTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/DiscussionTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -17,45 +17,40 @@
import urllib
-from Acquisition import Implicit
from AccessControl import ClassSecurityInfo
+from Acquisition import Implicit
from DateTime.DateTime import DateTime
from Globals import DTMLFile
from Globals import InitializeClass
from OFS.SimpleItem import SimpleItem
-
from zope.component import getUtility
from zope.interface import implements
from ActionProviderBase import ActionProviderBase
-from permissions import AccessContentsInformation
-from permissions import ManagePortal
-from permissions import ReplyToItem
-from permissions import View
from interfaces import ICatalogTool
from interfaces import IMembershipTool
from interfaces import IOldstyleDiscussable
from interfaces import IOldstyleDiscussionTool
from interfaces import ITypesTool
-from interfaces.Discussions import OldDiscussable as z2IOldstyleDiscussable
-from interfaces.portal_discussion \
- import oldstyle_portal_discussion as z2IOldstyleDiscussionTool
+from permissions import AccessContentsInformation
+from permissions import ManagePortal
+from permissions import ReplyToItem
+from permissions import View
from utils import _dtmldir
from utils import UniqueObject
class OldDiscussable(Implicit):
+
"""
Adapter for PortalContent to implement "old-style" discussions.
"""
implements(IOldstyleDiscussable)
- __implements__ = z2IOldstyleDiscussable
_isDiscussable = 1
security = ClassSecurityInfo()
-
def __init__( self, content ):
self.content = content
@@ -127,8 +122,6 @@
class DiscussionTool(UniqueObject, SimpleItem, ActionProviderBase):
implements(IOldstyleDiscussionTool)
- __implements__ = (z2IOldstyleDiscussionTool,
- ActionProviderBase.__implements__)
id = 'portal_discussion'
meta_type = 'Oldstyle CMF Discussion Tool'
@@ -137,7 +130,7 @@
security = ClassSecurityInfo()
manage_options = ( { 'label' : 'Overview', 'action' : 'manage_overview' }
- ,
+ ,
) + SimpleItem.manage_options
#
Modified: CMF/trunk/CMFCore/DynamicType.py
===================================================================
--- CMF/trunk/CMFCore/DynamicType.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/DynamicType.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -19,9 +19,10 @@
from AccessControl import ClassSecurityInfo
from Globals import InitializeClass
-
from zope.app.publication.zopepublication import BeforeTraverseEvent
+from zope.app.publisher.browser import queryDefaultViewName
from zope.component import getUtility
+from zope.component import queryMultiAdapter
from zope.component import queryUtility
from zope.event import notify
from zope.interface import implements
@@ -29,10 +30,7 @@
from interfaces import IDynamicType
from interfaces import ITypesTool
from interfaces import IURLTool
-from interfaces.Dynamic import DynamicType as z2IDynamicType
-from zope.component import queryMultiAdapter
-from zope.app.publisher.browser import queryDefaultViewName
class DynamicType:
@@ -42,7 +40,6 @@
"""
implements(IDynamicType)
- __implements__ = z2IDynamicType
portal_type = None
@@ -89,7 +86,7 @@
else:
msg = 'Action "%s" not available for %s' % (
action_chain, '/'.join(self.getPhysicalPath()))
- raise ValueError(msg)
+ raise ValueError(msg)
# Support for dynamic icons
Modified: CMF/trunk/CMFCore/MemberDataTool.py
===================================================================
--- CMF/trunk/CMFCore/MemberDataTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/MemberDataTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -22,11 +22,10 @@
from Globals import InitializeClass
from OFS.PropertyManager import PropertyManager
from OFS.SimpleItem import SimpleItem
-from ZPublisher.Converters import type_converters
-
from zope.component import getUtility
from zope.component import queryUtility
from zope.interface import implements
+from ZPublisher.Converters import type_converters
from ActionProviderBase import ActionProviderBase
from exceptions import BadRequest
@@ -34,9 +33,6 @@
from interfaces import IMemberDataTool
from interfaces import IMembershipTool
from interfaces import IRegistrationTool
-from interfaces.portal_memberdata import MemberData as z2IMemberData
-from interfaces.portal_memberdata \
- import portal_memberdata as z2IMemberDataTool
from permissions import ManagePortal
from permissions import SetOwnProperties
from permissions import ViewManagementScreens
@@ -44,7 +40,6 @@
from utils import registerToolInterface
from utils import UniqueObject
-
_marker = [] # Create a new marker object.
@@ -55,7 +50,6 @@
"""
implements(IMemberDataTool)
- __implements__ = (z2IMemberDataTool, ActionProviderBase.__implements__)
id = 'portal_memberdata'
meta_type = 'CMF Member Data Tool'
@@ -261,7 +255,6 @@
class MemberData(SimpleItem):
implements(IMemberData)
- __implements__ = z2IMemberData
security = ClassSecurityInfo()
Modified: CMF/trunk/CMFCore/MembershipTool.py
===================================================================
--- CMF/trunk/CMFCore/MembershipTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/MembershipTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -28,7 +28,6 @@
from Globals import PersistentMapping
from OFS.Folder import Folder
from ZODB.POSException import ConflictError
-
from zope.component import getUtility
from zope.component import queryUtility
from zope.interface import implements
@@ -40,8 +39,6 @@
from interfaces import IMembershipTool
from interfaces import IRegistrationTool
from interfaces import ISiteRoot
-from interfaces.portal_membership \
- import portal_membership as z2IMembershipTool
from permissions import AccessContentsInformation
from permissions import ChangeLocalRoles
from permissions import ListPortalMembers
@@ -54,7 +51,6 @@
from utils import _getAuthenticatedUser
from utils import UniqueObject
-
logger = logging.getLogger('CMFCore.MembershipTool')
@@ -67,7 +63,6 @@
"""
implements(IMembershipTool)
- __implements__ = (z2IMembershipTool, ActionProviderBase.__implements__)
id = 'portal_membership'
meta_type = 'CMF Membership Tool'
Modified: CMF/trunk/CMFCore/PortalContent.py
===================================================================
--- CMF/trunk/CMFCore/PortalContent.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/PortalContent.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -15,11 +15,10 @@
$Id$
"""
-from Globals import InitializeClass
+from AccessControl import ClassSecurityInfo
from Acquisition import aq_base
+from Globals import InitializeClass
from OFS.SimpleItem import SimpleItem
-from AccessControl import ClassSecurityInfo
-from webdav.WriteLockInterface import WriteLockInterface as z2IWriteLock
from zope.interface import implements
from CMFCatalogAware import CMFCatalogAware
@@ -27,7 +26,6 @@
from exceptions import NotFound
from exceptions import ResourceLockedError
from interfaces import IContentish
-from interfaces.Contentish import Contentish as z2IContentish
from permissions import FTPAccess
from permissions import View
from utils import Message as _
@@ -44,7 +42,6 @@
"""
implements(IContentish)
- __implements__ = (z2IContentish, z2IWriteLock, DynamicType.__implements__)
isPortalContent = 1
_isPortalContent = 1 # More reliable than 'isPortalContent'.
Modified: CMF/trunk/CMFCore/PortalFolder.py
===================================================================
--- CMF/trunk/CMFCore/PortalFolder.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/PortalFolder.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -23,9 +23,8 @@
from AccessControl import getSecurityManager
from Acquisition import aq_parent, aq_inner, aq_base
from Globals import InitializeClass
-from OFS.OrderSupport import OrderSupport
from OFS.Folder import Folder
-
+from OFS.OrderSupport import OrderSupport
from zope.component import getUtility
from zope.component import queryUtility
from zope.component.factory import Factory
@@ -40,7 +39,6 @@
from interfaces import IFolderish
from interfaces import IMutableMinimalDublinCore
from interfaces import ITypesTool
-from interfaces.Folderish import Folderish as z2IFolderish
from permissions import AddPortalContent
from permissions import AddPortalFolders
from permissions import DeleteObjects
@@ -57,8 +55,6 @@
"""
implements(IFolderish, IMutableMinimalDublinCore)
- __implements__ = (z2IFolderish, DynamicType.__implements__,
- Folder.__implements__)
security = ClassSecurityInfo()
@@ -469,8 +465,6 @@
"""Implements portal content management, but not UI details.
"""
- __implements__ = (PortalFolderBase.__implements__,
- OrderSupport.__implements__)
portal_type = 'Folder'
security = ClassSecurityInfo()
@@ -496,9 +490,10 @@
class ContentFilter:
+
+ """Represent a predicate against a content object's metadata.
"""
- Represent a predicate against a content object's metadata.
- """
+
MARKER = []
filterSubject = []
def __init__( self
Modified: CMF/trunk/CMFCore/RegistrationTool.py
===================================================================
--- CMF/trunk/CMFCore/RegistrationTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/RegistrationTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -22,15 +22,12 @@
from Globals import DTMLFile
from Globals import InitializeClass
from OFS.SimpleItem import SimpleItem
-
from zope.component import getUtility
from zope.interface import implements
from ActionProviderBase import ActionProviderBase
from interfaces import IMembershipTool
from interfaces import IRegistrationTool
-from interfaces.portal_registration \
- import portal_registration as z2IRegistrationTool
from permissions import AddPortalMember
from permissions import MailForgottenPassword
from permissions import ManagePortal
@@ -47,7 +44,6 @@
"""
implements(IRegistrationTool)
- __implements__ = (z2IRegistrationTool, ActionProviderBase.__implements__)
id = 'portal_registration'
meta_type = 'CMF Registration Tool'
Modified: CMF/trunk/CMFCore/SkinsContainer.py
===================================================================
--- CMF/trunk/CMFCore/SkinsContainer.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/SkinsContainer.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -22,14 +22,12 @@
from exceptions import SkinPathError
from interfaces import ISkinsContainer
-from interfaces.portal_skins import SkinsContainer as z2ISkinsContainer
from permissions import AccessContentsInformation
class SkinsContainer:
implements(ISkinsContainer)
- __implements__ = z2ISkinsContainer
security = ClassSecurityInfo()
Modified: CMF/trunk/CMFCore/SkinsTool.py
===================================================================
--- CMF/trunk/CMFCore/SkinsTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/SkinsTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -27,7 +27,6 @@
from OFS.ObjectManager import REPLACEABLE
from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate
from Products.PythonScripts.PythonScript import PythonScript
-
from zope.component import getUtility
from zope.interface import implements
@@ -38,7 +37,6 @@
from interfaces import IMembershipTool
from interfaces import ISkinsTool
from interfaces import IURLTool
-from interfaces.portal_skins import portal_skins as z2ISkinsTool
from permissions import AccessContentsInformation
from permissions import ManagePortal
from permissions import View
@@ -47,7 +45,6 @@
from utils import registerToolInterface
from utils import UniqueObject
-
def modifiedOptions():
# Remove the existing "Properties" option and add our own.
rval = []
@@ -67,8 +64,6 @@
"""
implements(ISkinsTool)
- __implements__ = (z2ISkinsTool, SkinsContainer.__implements__,
- ActionProviderBase.__implements__)
id = 'portal_skins'
meta_type = 'CMF Skins Tool'
@@ -376,4 +371,3 @@
InitializeClass(SkinsTool)
registerToolInterface('portal_skins', ISkinsTool)
-
Modified: CMF/trunk/CMFCore/TypesTool.py
===================================================================
--- CMF/trunk/CMFCore/TypesTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/TypesTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -40,9 +40,6 @@
from exceptions import zExceptions_Unauthorized
from interfaces import ITypeInformation
from interfaces import ITypesTool
-from interfaces.portal_types \
- import ContentTypeInformation as z2ITypeInformation
-from interfaces.portal_types import portal_types as z2ITypesTool
from permissions import AccessContentsInformation
from permissions import ManagePortal
from permissions import View
@@ -53,10 +50,8 @@
from utils import SimpleItemWithProperties
from utils import UniqueObject
-
logger = logging.getLogger('CMFCore.TypesTool')
-
_marker = [] # Create a new marker.
@@ -344,7 +339,6 @@
"""
implements(ITypeInformation)
- __implements__ = z2ITypeInformation
security = ClassSecurityInfo()
@@ -472,7 +466,6 @@
"""
implements(ITypeInformation)
- __implements__ = z2ITypeInformation
security = ClassSecurityInfo()
@@ -537,7 +530,6 @@
"""
implements(ITypesTool)
- __implements__ = (z2ITypesTool, ActionProviderBase.__implements__)
id = 'portal_types'
meta_type = 'CMF Types Tool'
@@ -745,4 +737,3 @@
InitializeClass(TypesTool)
registerToolInterface('portal_types', ITypesTool)
-
Modified: CMF/trunk/CMFCore/URLTool.py
===================================================================
--- CMF/trunk/CMFCore/URLTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/URLTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -21,14 +21,12 @@
from Globals import DTMLFile
from Globals import InitializeClass
from OFS.SimpleItem import SimpleItem
-
from zope.component import queryUtility
from zope.interface import implements
from ActionProviderBase import ActionProviderBase
from interfaces import ISiteRoot
from interfaces import IURLTool
-from interfaces.portal_url import portal_url as z2IURLTool
from permissions import ManagePortal
from permissions import View
from utils import _dtmldir
@@ -42,7 +40,6 @@
"""
implements(IURLTool)
- __implements__ = (z2IURLTool, ActionProviderBase.__implements__)
id = 'portal_url'
meta_type = 'CMF URL Tool'
Modified: CMF/trunk/CMFCore/UndoTool.py
===================================================================
--- CMF/trunk/CMFCore/UndoTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/UndoTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -24,7 +24,6 @@
from ActionProviderBase import ActionProviderBase
from exceptions import AccessControl_Unauthorized
from interfaces import IUndoTool
-from interfaces.portal_undo import portal_undo as z2IUndoTool
from permissions import ListUndoableChanges
from permissions import ManagePortal
from utils import _checkPermission
@@ -40,7 +39,6 @@
"""
implements(IUndoTool)
- __implements__ = (z2IUndoTool, ActionProviderBase.__implements__)
id = 'portal_undo'
meta_type = 'CMF Undo Tool'
@@ -114,4 +112,3 @@
InitializeClass(UndoTool)
registerToolInterface('portal_undo', IUndoTool)
-
Modified: CMF/trunk/CMFCore/WorkflowTool.py
===================================================================
--- CMF/trunk/CMFCore/WorkflowTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/WorkflowTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -24,28 +24,26 @@
from Globals import PersistentMapping
from OFS.Folder import Folder
from OFS.ObjectManager import IFAwareObjectManager
-
from zope.component import queryUtility
-from zope.interface import implements
from zope.event import notify
+from zope.interface import implements
from ActionProviderBase import ActionProviderBase
from interfaces import IConfigurableWorkflowTool
from interfaces import ITypesTool
from interfaces import IWorkflowDefinition
from interfaces import IWorkflowTool
-from interfaces.portal_workflow import portal_workflow as z2IWorkflowTool
from permissions import ManagePortal
from utils import _dtmldir
from utils import Message as _
from utils import registerToolInterface
from utils import UniqueObject
+from WorkflowCore import ActionRaisedExceptionEvent
+from WorkflowCore import ActionSucceededEvent
+from WorkflowCore import ActionWillBeInvokedEvent
from WorkflowCore import ObjectDeleted
from WorkflowCore import ObjectMoved
from WorkflowCore import WorkflowException
-from WorkflowCore import ActionWillBeInvokedEvent
-from WorkflowCore import ActionRaisedExceptionEvent
-from WorkflowCore import ActionSucceededEvent
_marker = [] # Create a new marker object.
@@ -57,7 +55,6 @@
"""
implements(IConfigurableWorkflowTool, IWorkflowTool)
- __implements__ = (z2IWorkflowTool, ActionProviderBase.__implements__)
id = 'portal_workflow'
meta_type = 'CMF Workflow Tool'
@@ -618,4 +615,3 @@
InitializeClass(WorkflowTool)
registerToolInterface('portal_workflow', IWorkflowTool)
-
Modified: CMF/trunk/CMFCore/exportimport/actions.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/actions.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/exportimport/actions.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -15,6 +15,10 @@
$Id$
"""
+from zope.component import adapts
+from zope.component import getSiteManager
+from zope.component import getUtility
+
from Products.GenericSetup.interfaces import ISetupEnviron
from Products.GenericSetup.utils import exportObjects
from Products.GenericSetup.utils import I18NURI
@@ -28,14 +32,8 @@
from Products.CMFCore.interfaces import IActionCategory
from Products.CMFCore.interfaces import IActionProvider
from Products.CMFCore.interfaces import IActionsTool
-from Products.CMFCore.interfaces.portal_actions \
- import ActionProvider as z2IActionProvider
from Products.CMFCore.utils import getToolInterface
-from zope.component import adapts
-from zope.component import getUtility
-from zope.component import getSiteManager
-
_SPECIAL_PROVIDERS = ('portal_actions', 'portal_types', 'portal_workflow')
@@ -150,8 +148,7 @@
provider_iface = getToolInterface(provider_id)
provider = getUtility(provider_iface)
- if not (IActionProvider.providedBy(provider) or
- z2IActionProvider.isImplementedBy(provider)):
+ if not IActionProvider.providedBy(provider):
return fragment
if provider_id == 'portal_actions':
Modified: CMF/trunk/CMFCore/exportimport/tests/test_actions.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/tests/test_actions.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/exportimport/tests/test_actions.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -18,18 +18,17 @@
import unittest
import Testing
-from Acquisition import Implicit
from Acquisition import aq_parent
+from Acquisition import Implicit
from OFS.OrderedFolder import OrderedFolder
-
from zope.component import getSiteManager
from zope.interface import implements
from zope.interface import Interface
from Products.CMFCore.ActionProviderBase import ActionProviderBase
+from Products.CMFCore.interfaces import IActionProvider
from Products.CMFCore.interfaces import IActionsTool
-from Products.CMFCore.interfaces.portal_actions \
- import ActionProvider as IActionProvider
+from Products.CMFCore.testing import ExportImportZCMLLayer
from Products.CMFCore.tests.base.dummy import DummySite
from Products.CMFCore.utils import registerToolInterface
from Products.GenericSetup.testing import BodyAdapterTestCase
@@ -38,8 +37,6 @@
from Products.GenericSetup.tests.common import DummyExportContext
from Products.GenericSetup.tests.common import DummyImportContext
-from Products.CMFCore.testing import ExportImportZCMLLayer
-
_ACTION_XML = """\
<object name="foo_action" meta_type="CMF Action">
<property name="title">Foo</property>
@@ -213,7 +210,7 @@
class DummyTool(OrderedFolder, ActionProviderBase):
- __implements__ = IActionProvider
+ implements(IActionProvider)
class DummyUser(Implicit):
Modified: CMF/trunk/CMFCore/fiveactionstool.py
===================================================================
--- CMF/trunk/CMFCore/fiveactionstool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/fiveactionstool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -18,8 +18,8 @@
from AccessControl import ClassSecurityInfo
from Globals import InitializeClass
from OFS.SimpleItem import SimpleItem
-from zope.app.publisher.interfaces.browser import IBrowserMenu
from zope.app.publisher.browser.menu import getMenu
+from zope.app.publisher.interfaces.browser import IBrowserMenu
from zope.component import getUtilitiesFor
from Products.CMFCore.ActionInformation import ActionInformation
@@ -36,8 +36,6 @@
""" Links content to discussions.
"""
- __implements__ = (ActionProviderBase.__implements__)
-
id = 'portal_fiveactions'
meta_type = 'Five Actions Tool'
@@ -49,7 +47,7 @@
security.declarePrivate('listActions')
def listActions(self, info=None, object=None):
""" List all the actions defined by a provider.
- """
+ """
if object is None:
if info is None:
# There is no support for global actions
@@ -68,7 +66,7 @@
act_id = 'action_%s' % action
else:
act_id = 'action_%s_%s' % (object.getId(), action)
-
+
if entry.get('filter') is None:
filter = None
else:
@@ -90,7 +88,7 @@
category=str(menu_id),
visible=1)
actions.append(act)
-
+
return tuple(actions)
InitializeClass( FiveActionsTool )
Deleted: CMF/trunk/CMFCore/interfaces/CachingPolicyManager.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/CachingPolicyManager.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/CachingPolicyManager.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,20 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Caching policies tool interface.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - CachingPolicyManager
Deleted: CMF/trunk/CMFCore/interfaces/ContentTypeRegistry.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/ContentTypeRegistry.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/ContentTypeRegistry.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,21 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Putfactory registration tool interface.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - ContentTypeRegistryPredicate
-# - ContentTypeRegistry
Deleted: CMF/trunk/CMFCore/interfaces/Contentish.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/Contentish.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/Contentish.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,20 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Contentish type interface.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - Contentish
Deleted: CMF/trunk/CMFCore/interfaces/Discussions.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/Discussions.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/Discussions.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,22 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Discussable interface.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - Discussable
-# - OldDiscussable
-# - DiscussionResponse
Deleted: CMF/trunk/CMFCore/interfaces/DublinCore.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/DublinCore.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/DublinCore.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,22 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Dublin Core interface.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - DublinCore
-# - CatalogableDublinCore
-# - MutableDublinCore
Deleted: CMF/trunk/CMFCore/interfaces/Dynamic.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/Dynamic.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/Dynamic.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,20 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Dynamic type interface.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - DynamicType
Deleted: CMF/trunk/CMFCore/interfaces/Folderish.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/Folderish.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/Folderish.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,20 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2004 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Folderish type interface.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - Folderish
Deleted: CMF/trunk/CMFCore/interfaces/IOpaqueItems.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/IOpaqueItems.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/IOpaqueItems.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,21 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2003 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Marker interface for callable opaque items with manage_* hooks.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - ICallableOpaqueItem
-# - ICallableOpaqueItemEvents
Deleted: CMF/trunk/CMFCore/interfaces/Syndicatable.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/Syndicatable.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/Syndicatable.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,20 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Syndicatable interface.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - Syndicatable
Modified: CMF/trunk/CMFCore/interfaces/__init__.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/__init__.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/__init__.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -18,75 +18,3 @@
from _content import *
from _tools import *
from _events import *
-
-import CachingPolicyManager
-import Contentish
-import ContentTypeRegistry
-import Discussions
-import DublinCore
-import Dynamic
-import Folderish
-import IOpaqueItems
-import portal_actions
-import portal_catalog
-import portal_discussion
-import portal_memberdata
-import portal_membership
-import portal_metadata
-import portal_properties
-import portal_registration
-import portal_skins
-import portal_types
-import portal_undo
-import portal_url
-import portal_workflow
-import Syndicatable
-
-# BBB: will be removed in CMF 2.2
-# create zope2 interfaces
-from Interface.bridge import createZope3Bridge
-createZope3Bridge(ICachingPolicyManager, CachingPolicyManager,
- 'CachingPolicyManager')
-createZope3Bridge(IContentish, Contentish, 'Contentish')
-createZope3Bridge(IContentTypeRegistryPredicate, ContentTypeRegistry,
- 'ContentTypeRegistryPredicate')
-createZope3Bridge(IContentTypeRegistry, ContentTypeRegistry,
- 'ContentTypeRegistry')
-createZope3Bridge(IDiscussable, Discussions, 'Discussable')
-createZope3Bridge(IOldstyleDiscussable, Discussions, 'OldDiscussable')
-createZope3Bridge(IDiscussionResponse, Discussions, 'DiscussionResponse')
-createZope3Bridge(IDublinCore, DublinCore, 'DublinCore')
-createZope3Bridge(ICatalogableDublinCore, DublinCore, 'CatalogableDublinCore')
-createZope3Bridge(IMutableDublinCore, DublinCore, 'MutableDublinCore')
-createZope3Bridge(IDynamicType, Dynamic, 'DynamicType')
-createZope3Bridge(IFolderish, Folderish, 'Folderish')
-createZope3Bridge(ICallableOpaqueItem, IOpaqueItems, 'ICallableOpaqueItem')
-createZope3Bridge(ICallableOpaqueItemEvents, IOpaqueItems,
- 'ICallableOpaqueItemEvents')
-createZope3Bridge(IActionsTool, portal_actions, 'portal_actions')
-createZope3Bridge(IActionProvider, portal_actions, 'ActionProvider')
-createZope3Bridge(IActionInfo, portal_actions, 'ActionInfo')
-createZope3Bridge(ICatalogTool, portal_catalog, 'portal_catalog')
-createZope3Bridge(IIndexableObjectWrapper, portal_catalog,
- 'IndexableObjectWrapper')
-createZope3Bridge(IOldstyleDiscussionTool, portal_discussion,
- 'oldstyle_portal_discussion')
-createZope3Bridge(IDiscussionTool, portal_discussion, 'portal_discussion')
-createZope3Bridge(IMemberDataTool, portal_memberdata, 'portal_memberdata')
-createZope3Bridge(IMemberData, portal_memberdata, 'MemberData')
-createZope3Bridge(IMembershipTool, portal_membership, 'portal_membership')
-createZope3Bridge(IMetadataTool, portal_metadata, 'portal_metadata')
-createZope3Bridge(IPropertiesTool, portal_properties, 'portal_properties')
-createZope3Bridge(IRegistrationTool, portal_registration,
- 'portal_registration')
-createZope3Bridge(ISkinsContainer, portal_skins, 'SkinsContainer')
-createZope3Bridge(ISkinsTool, portal_skins, 'portal_skins')
-createZope3Bridge(ITypeInformation, portal_types, 'ContentTypeInformation')
-createZope3Bridge(ITypesTool, portal_types, 'portal_types')
-createZope3Bridge(IUndoTool, portal_undo, 'portal_undo')
-createZope3Bridge(IURLTool, portal_url, 'portal_url')
-createZope3Bridge(IWorkflowTool, portal_workflow, 'portal_workflow')
-createZope3Bridge(IWorkflowDefinition, portal_workflow, 'WorkflowDefinition')
-createZope3Bridge(ISyndicatable, Syndicatable, 'Syndicatable')
-
-del createZope3Bridge
Deleted: CMF/trunk/CMFCore/interfaces/portal_actions.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/portal_actions.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/portal_actions.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,24 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Actions tool interface.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - portal_actions
-# - ActionProvider
-# - ActionCategory
-# - Action
-# - ActionInfo
Deleted: CMF/trunk/CMFCore/interfaces/portal_catalog.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/portal_catalog.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/portal_catalog.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,21 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Catalog tool interface.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - portal_catalog
-# - IndexableObjectWrapper
Deleted: CMF/trunk/CMFCore/interfaces/portal_discussion.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/portal_discussion.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/portal_discussion.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,21 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Discussion tool interface.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - oldstyle_portal_discussion
-# - portal_discussion
Deleted: CMF/trunk/CMFCore/interfaces/portal_memberdata.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/portal_memberdata.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/portal_memberdata.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,21 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Memberdata storage tool interface.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - portal_memberdata
-# - MemberData
Deleted: CMF/trunk/CMFCore/interfaces/portal_membership.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/portal_membership.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/portal_membership.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,20 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Membership tool interface.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - portal_membership
Deleted: CMF/trunk/CMFCore/interfaces/portal_metadata.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/portal_metadata.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/portal_metadata.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,20 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Metadata registration tool interface.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - portal_metadata
Deleted: CMF/trunk/CMFCore/interfaces/portal_properties.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/portal_properties.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/portal_properties.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,20 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Properties tool interface.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - portal_properties
Deleted: CMF/trunk/CMFCore/interfaces/portal_registration.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/portal_registration.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/portal_registration.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,20 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Registration tool interface.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - portal_registration
Deleted: CMF/trunk/CMFCore/interfaces/portal_skins.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/portal_skins.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/portal_skins.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,21 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Skins tool interface.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - SkinsContainer
-# - portal_skins
Deleted: CMF/trunk/CMFCore/interfaces/portal_types.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/portal_types.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/portal_types.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,21 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Type registration tool interface.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - ContentTypeInformation
-# - portal_types
Deleted: CMF/trunk/CMFCore/interfaces/portal_undo.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/portal_undo.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/portal_undo.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,20 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Undo tool interface.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - portal_undo
Deleted: CMF/trunk/CMFCore/interfaces/portal_url.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/portal_url.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/portal_url.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,20 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" URL tool interface.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - portal_url
Deleted: CMF/trunk/CMFCore/interfaces/portal_workflow.py
===================================================================
--- CMF/trunk/CMFCore/interfaces/portal_workflow.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/interfaces/portal_workflow.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,21 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Workflow tool interface.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - portal_workflow
-# - WorkflowDefinition
Modified: CMF/trunk/CMFCore/testing.py
===================================================================
--- CMF/trunk/CMFCore/testing.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/testing.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -21,6 +21,7 @@
from zope.component import adapts
from zope.i18n.interfaces import IUserPreferredLanguages
from zope.interface import implements
+from zope.interface.verify import verifyClass
from zope.publisher.interfaces.http import IHTTPRequest
from zope.testing import testrunner
from zope.testing.cleanup import cleanUp
@@ -31,20 +32,7 @@
class ConformsToFolder:
- def test_folder_z2interfaces(self):
- from Interface.Verify import verifyClass
- from webdav.WriteLockInterface import WriteLockInterface
- from Products.CMFCore.interfaces.Dynamic \
- import DynamicType as IDynamicType
- from Products.CMFCore.interfaces.Folderish \
- import Folderish as IFolderish
-
- verifyClass(IDynamicType, self._getTargetClass())
- verifyClass(IFolderish, self._getTargetClass())
- verifyClass(WriteLockInterface, self._getTargetClass())
-
- def test_folder_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_folder_interfaces(self):
from webdav.interfaces import IWriteLock
from Products.CMFCore.interfaces import IDynamicType
from Products.CMFCore.interfaces import IFolderish
@@ -58,27 +46,7 @@
class ConformsToContent:
- def test_content_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.Contentish \
- import Contentish as IContentish
- from Products.CMFCore.interfaces.DublinCore \
- import CatalogableDublinCore as ICatalogableDublinCore
- from Products.CMFCore.interfaces.DublinCore \
- import DublinCore as IDublinCore
- from Products.CMFCore.interfaces.DublinCore \
- import MutableDublinCore as IMutableDublinCore
- from Products.CMFCore.interfaces.Dynamic \
- import DynamicType as IDynamicType
-
- verifyClass(ICatalogableDublinCore, self._getTargetClass())
- verifyClass(IContentish, self._getTargetClass())
- verifyClass(IDublinCore, self._getTargetClass())
- verifyClass(IDynamicType, self._getTargetClass())
- verifyClass(IMutableDublinCore, self._getTargetClass())
-
- def test_content_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_content_interfaces(self):
from Products.CMFCore.interfaces import ICatalogableDublinCore
from Products.CMFCore.interfaces import IContentish
from Products.CMFCore.interfaces import IDublinCore
Modified: CMF/trunk/CMFCore/tests/test_ActionInformation.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_ActionInformation.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/tests/test_ActionInformation.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -20,8 +20,8 @@
from OFS.Folder import manage_addFolder
from Products.PythonScripts.PythonScript import manage_addPythonScript
-
from zope.component import getSiteManager
+from zope.interface.verify import verifyClass
from Products.CMFCore.Expression import createExprContext
from Products.CMFCore.Expression import Expression
@@ -41,8 +41,7 @@
return ActionCategory(*args, **kw)
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.ActionInformation import ActionCategory
from Products.CMFCore.interfaces import IActionCategory
@@ -66,8 +65,7 @@
return Action(*args, **kw)
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.ActionInformation import Action
from Products.CMFCore.interfaces import IAction
@@ -139,17 +137,8 @@
return ActionInfo(*args, **kw)
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.ActionInformation import ActionInfo
- from Products.CMFCore.interfaces.portal_actions \
- import ActionInfo as IActionInfo
-
- verifyClass(IActionInfo, ActionInfo)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
- from Products.CMFCore.ActionInformation import ActionInfo
from Products.CMFCore.interfaces import IActionInfo
verifyClass(IActionInfo, ActionInfo)
@@ -346,8 +335,7 @@
return ActionInformation(*args, **kw)
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.ActionInformation import ActionInformation
from Products.CMFCore.interfaces import IAction
Modified: CMF/trunk/CMFCore/tests/test_ActionProviderBase.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_ActionProviderBase.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/tests/test_ActionProviderBase.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -19,6 +19,7 @@
import Testing
from zope.component import getSiteManager
+from zope.interface.verify import verifyClass
from zope.testing.cleanup import cleanUp
from Products.CMFCore.interfaces import IMembershipTool
@@ -80,15 +81,7 @@
klass = dummy and DummyProvider or ActionProviderBase
return klass()
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_actions \
- import ActionProvider as IActionProvider
-
- verifyClass(IActionProvider, ActionProviderBase)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import IActionProvider
verifyClass(IActionProvider, ActionProviderBase)
Modified: CMF/trunk/CMFCore/tests/test_ActionsTool.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_ActionsTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/tests/test_ActionsTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -19,18 +19,19 @@
import Testing
from zope.component import getSiteManager
+from zope.interface.verify import verifyClass
from zope.testing.cleanup import cleanUp
from Products.CMFCore.ActionInformation import Action
from Products.CMFCore.ActionInformation import ActionCategory
from Products.CMFCore.ActionInformation import ActionInformation
from Products.CMFCore.Expression import Expression
-from Products.CMFCore.MembershipTool import MembershipTool
+from Products.CMFCore.interfaces import IMembershipTool
+from Products.CMFCore.interfaces import ISiteRoot
from Products.CMFCore.interfaces import IURLTool
+from Products.CMFCore.MembershipTool import MembershipTool
from Products.CMFCore.tests.base.testcase import SecurityRequestTest
from Products.CMFCore.URLTool import URLTool
-from Products.CMFCore.interfaces import IMembershipTool
-from Products.CMFCore.interfaces import ISiteRoot
class ActionsToolTests(unittest.TestCase):
@@ -43,18 +44,7 @@
def _makeOne(self, *args, **kw):
return self._getTargetClass()(*args, **kw)
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_actions \
- import ActionProvider as IActionProvider
- from Products.CMFCore.interfaces.portal_actions \
- import portal_actions as IActionsTool
-
- verifyClass(IActionProvider, self._getTargetClass())
- verifyClass(IActionsTool, self._getTargetClass())
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import IActionProvider
from Products.CMFCore.interfaces import IActionsTool
Modified: CMF/trunk/CMFCore/tests/test_CachingPolicyManager.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_CachingPolicyManager.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/tests/test_CachingPolicyManager.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -28,9 +28,11 @@
from DateTime.DateTime import DateTime
from OFS.Cache import Cacheable
from zope.component import getSiteManager
+from zope.interface.verify import verifyClass
-from Products.CMFCore.FSPageTemplate import FSPageTemplate
from Products.CMFCore.FSDTMLMethod import FSDTMLMethod
+from Products.CMFCore.FSPageTemplate import FSPageTemplate
+from Products.CMFCore.interfaces import ICachingPolicyManager
from Products.CMFCore.interfaces import ITypesTool
from Products.CMFCore.testing import FunctionalZCMLLayer
from Products.CMFCore.testing import TraversingZCMLLayer
@@ -39,7 +41,6 @@
from Products.CMFCore.tests.base.dummy import DummyTool
from Products.CMFCore.tests.base.testcase import FSDVTest
from Products.CMFCore.tests.base.testcase import RequestTest
-from Products.CMFCore.interfaces import ICachingPolicyManager
ACCLARK = DateTime( '2001/01/01' )
portal_owner = 'portal_owner'
@@ -84,13 +85,13 @@
# from a "FileCacheManager"
return result
- self.ZCacheable_set(None)
+ self.ZCacheable_set(None)
class DummyView(CacheableDummyContent):
meta_type = 'DTML Method'
-
+
class CachingPolicyTests(unittest.TestCase):
layer = TraversingZCMLLayer
@@ -108,8 +109,7 @@
def setUp(self):
self._epoch = DateTime(0)
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.CachingPolicyManager import CachingPolicy
from Products.CMFCore.interfaces import ICachingPolicy
@@ -441,20 +441,11 @@
def assertEqualDelta( self, lhs, rhs, delta ):
self.failUnless( abs( lhs - rhs ) <= delta )
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.CachingPolicyManager import CachingPolicyManager
- from Products.CMFCore.interfaces.CachingPolicyManager \
- import CachingPolicyManager as ICachingPolicyManager
verifyClass(ICachingPolicyManager, CachingPolicyManager)
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
- from Products.CMFCore.CachingPolicyManager import CachingPolicyManager
-
- verifyClass(ICachingPolicyManager, CachingPolicyManager)
-
def test_empty( self ):
mgr = self._makeOne()
@@ -1133,7 +1124,7 @@
headers = [x.lower() for x in self.RESPONSE.headers.keys()]
self.failIf('x-cache-headers-set-by' in headers)
self.failIf('vary' in headers)
-
+
def test_fireForSubtemplates2(self):
# This is a FSPageTemplate that will be used as the View for
# our content objects. It doesn't matter what it returns.
@@ -1216,8 +1207,8 @@
self.assertEquals( headers.get('cache-control')
, 'max-age=100, s-maxage=100'
)
-
+
class OFSCacheTests(RequestTest):
layer = FunctionalZCMLLayer
@@ -1251,7 +1242,7 @@
enable_304s = 0)
def test_empty(self):
-
+
from Products.CMFCore.CachingPolicyManager import CPMCache
cpm = self.portal.caching_policy_manager
Modified: CMF/trunk/CMFCore/tests/test_CatalogTool.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_CatalogTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/tests/test_CatalogTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -20,6 +20,7 @@
from AccessControl.SecurityManagement import newSecurityManager
from DateTime import DateTime
+from zope.interface.verify import verifyClass
from Products.CMFCore.tests.base.dummy import DummyContent
from Products.CMFCore.tests.base.dummy import DummySite
@@ -38,15 +39,7 @@
def _makeOne(self, *args, **kw):
return self._getTargetClass()(*args, **kw)
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_catalog \
- import IndexableObjectWrapper as IIndexableObjectWrapper
-
- verifyClass(IIndexableObjectWrapper, self._getTargetClass())
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import IIndexableObjectWrapper
verifyClass(IIndexableObjectWrapper, self._getTargetClass())
@@ -97,20 +90,7 @@
def _makeOne(self, *args, **kw):
return self._getTargetClass()(*args, **kw)
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_actions \
- import ActionProvider as IActionProvider
- from Products.CMFCore.interfaces.portal_catalog \
- import portal_catalog as ICatalogTool
- from Products.ZCatalog.IZCatalog import IZCatalog
-
- verifyClass(IActionProvider, self._getTargetClass())
- verifyClass(ICatalogTool, self._getTargetClass())
- verifyClass(IZCatalog, self._getTargetClass())
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import IActionProvider
from Products.CMFCore.interfaces import ICatalogTool
from Products.ZCatalog.interfaces import IZCatalog
Modified: CMF/trunk/CMFCore/tests/test_ContentTypeRegistry.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_ContentTypeRegistry.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/tests/test_ContentTypeRegistry.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -18,7 +18,9 @@
import unittest
import Testing
+from zope.interface.verify import verifyClass
+
class MajorMinorPredicateTests(unittest.TestCase):
def _makeOne(self, *args, **kw):
@@ -26,18 +28,8 @@
return MajorMinorPredicate(*args, **kw)
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.ContentTypeRegistry import MajorMinorPredicate
- from Products.CMFCore.interfaces.ContentTypeRegistry \
- import ContentTypeRegistryPredicate \
- as IContentTypeRegistryPredicate
-
- verifyClass(IContentTypeRegistryPredicate, MajorMinorPredicate)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
- from Products.CMFCore.ContentTypeRegistry import MajorMinorPredicate
from Products.CMFCore.interfaces import IContentTypeRegistryPredicate
verifyClass(IContentTypeRegistryPredicate, MajorMinorPredicate)
@@ -82,18 +74,8 @@
return ExtensionPredicate(*args, **kw)
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.ContentTypeRegistry import ExtensionPredicate
- from Products.CMFCore.interfaces.ContentTypeRegistry \
- import ContentTypeRegistryPredicate \
- as IContentTypeRegistryPredicate
-
- verifyClass(IContentTypeRegistryPredicate, ExtensionPredicate)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
- from Products.CMFCore.ContentTypeRegistry import ExtensionPredicate
from Products.CMFCore.interfaces import IContentTypeRegistryPredicate
verifyClass(IContentTypeRegistryPredicate, ExtensionPredicate)
@@ -133,20 +115,9 @@
return MimeTypeRegexPredicate(*args, **kw)
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.ContentTypeRegistry \
import MimeTypeRegexPredicate
- from Products.CMFCore.interfaces.ContentTypeRegistry \
- import ContentTypeRegistryPredicate \
- as IContentTypeRegistryPredicate
-
- verifyClass(IContentTypeRegistryPredicate, MimeTypeRegexPredicate)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
- from Products.CMFCore.ContentTypeRegistry \
- import MimeTypeRegexPredicate
from Products.CMFCore.interfaces import IContentTypeRegistryPredicate
verifyClass(IContentTypeRegistryPredicate, MimeTypeRegexPredicate)
@@ -179,18 +150,8 @@
return NameRegexPredicate(*args, **kw)
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.ContentTypeRegistry import NameRegexPredicate
- from Products.CMFCore.interfaces.ContentTypeRegistry \
- import ContentTypeRegistryPredicate \
- as IContentTypeRegistryPredicate
-
- verifyClass(IContentTypeRegistryPredicate, NameRegexPredicate)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
- from Products.CMFCore.ContentTypeRegistry import NameRegexPredicate
from Products.CMFCore.interfaces import IContentTypeRegistryPredicate
verifyClass(IContentTypeRegistryPredicate, NameRegexPredicate)
@@ -227,17 +188,8 @@
def setUp( self ):
self.reg = self._makeOne()
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.ContentTypeRegistry import ContentTypeRegistry
- from Products.CMFCore.interfaces.ContentTypeRegistry \
- import ContentTypeRegistry as IContentTypeRegistry
-
- verifyClass(IContentTypeRegistry, ContentTypeRegistry)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
- from Products.CMFCore.ContentTypeRegistry import ContentTypeRegistry
from Products.CMFCore.interfaces import IContentTypeRegistry
verifyClass(IContentTypeRegistry, ContentTypeRegistry)
Modified: CMF/trunk/CMFCore/tests/test_CookieCrumbler.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_CookieCrumbler.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/tests/test_CookieCrumbler.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -19,6 +19,7 @@
import Testing
from zope.app.testing.placelesssetup import PlacelessSetup
+from zope.interface.verify import verifyClass
def makerequest(root, stdout, stdin=None):
# Customized version of Testing.makerequest.makerequest()
@@ -118,8 +119,7 @@
return root, cc, req, credentials
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import ICookieCrumbler
verifyClass(ICookieCrumbler, self._getTargetClass())
Modified: CMF/trunk/CMFCore/tests/test_DiscussionTool.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_DiscussionTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/tests/test_DiscussionTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -18,23 +18,13 @@
import unittest
import Testing
+from zope.interface.verify import verifyClass
+
class DiscussionToolTests(unittest.TestCase):
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.DiscussionTool import DiscussionTool
- from Products.CMFCore.interfaces.portal_actions \
- import ActionProvider as IActionProvider
- from Products.CMFCore.interfaces.portal_discussion \
- import oldstyle_portal_discussion as IOldstyleDiscussionTool
-
- verifyClass(IActionProvider, DiscussionTool)
- verifyClass(IOldstyleDiscussionTool, DiscussionTool)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
- from Products.CMFCore.DiscussionTool import DiscussionTool
from Products.CMFCore.interfaces import IActionProvider
from Products.CMFCore.interfaces import IOldstyleDiscussionTool
@@ -44,17 +34,8 @@
class OldDiscussableTests(unittest.TestCase):
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.DiscussionTool import OldDiscussable
- from Products.CMFCore.interfaces.Discussions \
- import OldDiscussable as IOldDiscussable
-
- verifyClass(IOldDiscussable, OldDiscussable)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
- from Products.CMFCore.DiscussionTool import OldDiscussable
from Products.CMFCore.interfaces import IOldstyleDiscussable
verifyClass(IOldstyleDiscussable, OldDiscussable)
Modified: CMF/trunk/CMFCore/tests/test_DynamicType.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_DynamicType.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/tests/test_DynamicType.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -26,6 +26,7 @@
from zope.component import provideAdapter
from zope.component.interfaces import IDefaultViewName
from zope.interface import alsoProvides
+from zope.interface.verify import verifyClass
from zope.publisher.interfaces.browser import IBrowserRequest
from zope.publisher.interfaces.browser import IBrowserView
from zope.testing.cleanup import cleanUp
@@ -34,8 +35,8 @@
from Products.CMFCore.DynamicType import DynamicType
from Products.CMFCore.interfaces import IMembershipTool
-from Products.CMFCore.interfaces import ITypesTool
from Products.CMFCore.interfaces import ISiteRoot
+from Products.CMFCore.interfaces import ITypesTool
from Products.CMFCore.tests.base.dummy import DummyObject
from Products.CMFCore.tests.base.dummy import DummySite
from Products.CMFCore.tests.base.dummy import DummyTool
@@ -62,19 +63,12 @@
class DynamicTypeTests(unittest.TestCase):
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.Dynamic \
- import DynamicType as IDynamicType
+ def test_interfaces(self):
+ from Products.CMFCore.interfaces import IDynamicType
verifyClass(IDynamicType, DynamicType)
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
- from Products.CMFCore.interfaces import IDynamicType
- verifyClass(IDynamicType, DynamicType)
-
class DynamicTypeDefaultTraversalTests(unittest.TestCase):
def setUp(self):
Modified: CMF/trunk/CMFCore/tests/test_MemberDataTool.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_MemberDataTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/tests/test_MemberDataTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -19,8 +19,8 @@
import Testing
import Acquisition
-
from zope.component import getSiteManager
+from zope.interface.verify import verifyClass
from zope.testing.cleanup import cleanUp
from Products.CMFCore.interfaces import IMemberDataTool
@@ -79,19 +79,7 @@
def tearDown(self):
cleanUp()
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_actions \
- import ActionProvider as IActionProvider
- from Products.CMFCore.interfaces.portal_memberdata \
- import portal_memberdata as IMemberDataTool
- from Products.CMFCore.MemberDataTool import MemberDataTool
-
- verifyClass(IActionProvider, MemberDataTool)
- verifyClass(IMemberDataTool, MemberDataTool)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import IActionProvider
from Products.CMFCore.MemberDataTool import MemberDataTool
@@ -148,16 +136,7 @@
return MemberData(*args, **kw)
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_memberdata \
- import MemberData as IMemberData
- from Products.CMFCore.MemberDataTool import MemberData
-
- verifyClass(IMemberData, MemberData)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import IMemberData
from Products.CMFCore.MemberDataTool import MemberData
Modified: CMF/trunk/CMFCore/tests/test_MembershipTool.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_MembershipTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/tests/test_MembershipTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -20,14 +20,14 @@
from AccessControl.SecurityManagement import newSecurityManager
from OFS.Folder import Folder
-
from zope.component import getSiteManager
+from zope.interface.verify import verifyClass
from zope.testing.cleanup import cleanUp
-from Products.CMFCore.MemberDataTool import MemberDataTool
-from Products.CMFCore.PortalFolder import PortalFolder
from Products.CMFCore.interfaces import IMemberDataTool
from Products.CMFCore.interfaces import ISiteRoot
+from Products.CMFCore.MemberDataTool import MemberDataTool
+from Products.CMFCore.PortalFolder import PortalFolder
from Products.CMFCore.tests.base.dummy import DummySite
from Products.CMFCore.tests.base.dummy import DummyTool
from Products.CMFCore.tests.base.dummy import DummyUserFolder
@@ -36,19 +36,7 @@
class MembershipToolTests(unittest.TestCase):
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_actions \
- import ActionProvider as IActionProvider
- from Products.CMFCore.interfaces.portal_membership \
- import portal_membership as IMembershipTool
- from Products.CMFCore.MembershipTool import MembershipTool
-
- verifyClass(IActionProvider, MembershipTool)
- verifyClass(IMembershipTool, MembershipTool)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import IActionProvider
from Products.CMFCore.interfaces import IMembershipTool
from Products.CMFCore.MembershipTool import MembershipTool
Modified: CMF/trunk/CMFCore/tests/test_OpaqueItems.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_OpaqueItems.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/tests/test_OpaqueItems.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -25,10 +25,6 @@
from Products.CMFCore.interfaces import ICallableOpaqueItemEvents
from Products.CMFCore.interfaces import IContentish
from Products.CMFCore.interfaces import ITypesTool
-from Products.CMFCore.interfaces.IOpaqueItems \
- import ICallableOpaqueItem as z2ICallableOpaqueItem
-from Products.CMFCore.interfaces.IOpaqueItems \
- import ICallableOpaqueItemEvents as z2ICallableOpaqueItemEvents
from Products.CMFCore.PortalFolder import PortalFolder
from Products.CMFCore.testing import TraversingEventZCMLLayer
from Products.CMFCore.tests.base.dummy \
@@ -101,21 +97,19 @@
class Marker(OpaqueBase):
+
""" Opaque item without manage_after/before hookes but marked as callable
"""
+
implements(ICallableOpaqueItem)
- __implements__ = (
- z2ICallableOpaqueItem,
- )
class Hooks(OpaqueBase):
+
""" Opaque item with manage_after/before hooks but not marked as callable
"""
+
implements(ICallableOpaqueItemEvents)
- __implements__ = (
- z2ICallableOpaqueItemEvents,
- )
def manage_afterAdd(self, item, container):
self.addCount = self.addCounter
@@ -131,9 +125,9 @@
class MarkerAndHooks(Marker, Hooks):
+
""" Opaque item with manage_after/before hookes and marked as callable
"""
- __implements__ = Marker.__implements__ + Hooks.__implements__
# -------------------------------------------
Modified: CMF/trunk/CMFCore/tests/test_PortalContent.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_PortalContent.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/tests/test_PortalContent.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -21,8 +21,8 @@
from AccessControl.SecurityManagement import newSecurityManager
from Acquisition import aq_base
from OFS.Folder import Folder
-
from zope.component import getSiteManager
+from zope.interface.verify import verifyClass
from zope.testing.cleanup import cleanUp
from Products.CMFCore.exceptions import NotFound
@@ -41,19 +41,7 @@
def tearDown(self):
cleanUp()
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.Contentish \
- import Contentish as IContentish
- from Products.CMFCore.interfaces.Dynamic \
- import DynamicType as IDynamicType
- from Products.CMFCore.PortalContent import PortalContent
-
- verifyClass(IContentish, PortalContent)
- verifyClass(IDynamicType, PortalContent)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import IContentish
from Products.CMFCore.interfaces import IDynamicType
from Products.CMFCore.PortalContent import PortalContent
Modified: CMF/trunk/CMFCore/tests/test_PortalFolder.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_PortalFolder.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/tests/test_PortalFolder.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -19,17 +19,17 @@
import Testing
import transaction
-from AccessControl.SecurityManagement import newSecurityManager
from AccessControl import SecurityManager
from AccessControl import Unauthorized
+from AccessControl.SecurityManagement import newSecurityManager
from Acquisition import aq_base
from Acquisition import Implicit
from DateTime import DateTime
from OFS.Image import manage_addFile
-
from zope.component import getSiteManager
from zope.component.interfaces import IFactory
from zope.interface import implements
+from zope.interface.verify import verifyClass
from Products.CMFCore.CatalogTool import CatalogTool
from Products.CMFCore.exceptions import BadRequest
@@ -133,14 +133,7 @@
SecurityTest.setUp(self)
self.site = DummySite('site').__of__(self.root)
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from OFS.IOrderSupport import IOrderedContainer
-
- verifyClass(IOrderedContainer, self._getTargetClass())
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from OFS.interfaces import IOrderedContainer
verifyClass(IOrderedContainer, self._getTargetClass())
Modified: CMF/trunk/CMFCore/tests/test_RegistrationTool.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_RegistrationTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/tests/test_RegistrationTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -18,7 +18,9 @@
import unittest
import Testing
+from zope.interface.verify import verifyClass
+
class RegistrationToolTests(unittest.TestCase):
def _makeOne(self):
@@ -26,19 +28,7 @@
return RegistrationTool()
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_actions \
- import ActionProvider as IActionProvider
- from Products.CMFCore.interfaces.portal_registration \
- import portal_registration as IRegistrationTool
- from Products.CMFCore.RegistrationTool import RegistrationTool
-
- verifyClass(IActionProvider, RegistrationTool)
- verifyClass(IRegistrationTool, RegistrationTool)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import IActionProvider
from Products.CMFCore.interfaces import IRegistrationTool
from Products.CMFCore.RegistrationTool import RegistrationTool
Modified: CMF/trunk/CMFCore/tests/test_SkinsTool.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_SkinsTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/tests/test_SkinsTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -19,22 +19,15 @@
import Testing
from zope.component import getSiteManager
+from zope.interface.verify import verifyClass
from zope.testing.cleanup import cleanUp
from Products.CMFCore.interfaces import ISkinsTool
+
class SkinsContainerTests(unittest.TestCase):
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_skins \
- import SkinsContainer as ISkinsContainer
- from Products.CMFCore.SkinsContainer import SkinsContainer
-
- verifyClass(ISkinsContainer, SkinsContainer)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import ISkinsContainer
from Products.CMFCore.SkinsContainer import SkinsContainer
@@ -48,22 +41,7 @@
return SkinsTool(*args, **kw)
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_actions \
- import ActionProvider as IActionProvider
- from Products.CMFCore.interfaces.portal_skins \
- import portal_skins as ISkinsTool
- from Products.CMFCore.interfaces.portal_skins \
- import SkinsContainer as ISkinsContainer
- from Products.CMFCore.SkinsTool import SkinsTool
-
- verifyClass(IActionProvider, SkinsTool)
- verifyClass(ISkinsContainer, SkinsTool)
- verifyClass(ISkinsTool, SkinsTool)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import IActionProvider
from Products.CMFCore.interfaces import ISkinsContainer
from Products.CMFCore.SkinsTool import SkinsTool
@@ -104,10 +82,10 @@
sm.registerUtility(tool, ISkinsTool)
# This is needed otherwise REQUEST is the string
# '<Special Object Used to Force Acquisition>'
- REQUEST = None
-
+ REQUEST = None
+
return TestSkinnableObjectManager()
-
+
def tearDown(self):
from Products.CMFCore.Skinnable import SKINDATA
SKINDATA.clear()
@@ -121,7 +99,7 @@
som.tool.addSkinSelection('skinA', pathA)
som.tool.addSkinSelection('skinB', pathB)
-
+
som.tool.manage_properties(default_skin='skinA')
# Expect the default skin name to be returned
@@ -130,8 +108,8 @@
# after a changeSkin the new skin name should be returned
som.changeSkin('skinB')
self.failUnless(som.getCurrentSkinName() == 'skinB')
-
+
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(SkinsContainerTests),
Modified: CMF/trunk/CMFCore/tests/test_TypesTool.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_TypesTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/tests/test_TypesTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -28,6 +28,7 @@
from webdav.NullResource import NullResource
from zope.component import getSiteManager
from zope.component.interfaces import IFactory
+from zope.interface.verify import verifyClass
from zope.testing.cleanup import cleanUp
from Products.CMFCore.ActionInformation import ActionInformation
@@ -71,19 +72,7 @@
SecurityTest.tearDown(self)
self._free_warning_output()
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_actions \
- import ActionProvider as IActionProvider
- from Products.CMFCore.interfaces.portal_types \
- import portal_types as ITypesTool
- from Products.CMFCore.TypesTool import TypesTool
-
- verifyClass(IActionProvider, TypesTool)
- verifyClass(ITypesTool, TypesTool)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import IActionProvider
from Products.CMFCore.interfaces import ITypesTool
from Products.CMFCore.TypesTool import TypesTool
@@ -296,16 +285,7 @@
return FactoryTypeInformation(id, **kw)
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_types \
- import ContentTypeInformation as ITypeInformation
- from Products.CMFCore.TypesTool import FactoryTypeInformation
-
- verifyClass(ITypeInformation, FactoryTypeInformation)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import ITypeInformation
from Products.CMFCore.TypesTool import FactoryTypeInformation
@@ -331,16 +311,7 @@
return ScriptableTypeInformation(id, **kw)
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_types \
- import ContentTypeInformation as ITypeInformation
- from Products.CMFCore.TypesTool import ScriptableTypeInformation
-
- verifyClass(ITypeInformation, ScriptableTypeInformation)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import ITypeInformation
from Products.CMFCore.TypesTool import ScriptableTypeInformation
Modified: CMF/trunk/CMFCore/tests/test_URLTool.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_URLTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/tests/test_URLTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -19,6 +19,8 @@
import Testing
from zope.component import getSiteManager
+from zope.interface.verify import verifyClass
+from zope.testing.cleanup import cleanUp
from Products.CMFCore.interfaces import ISiteRoot
from Products.CMFCore.tests.base.dummy import DummyContent
@@ -33,25 +35,16 @@
sm = getSiteManager()
sm.registerUtility(self.site, ISiteRoot)
+ def tearDown(self):
+ cleanUp()
+
def _makeOne(self, *args, **kw):
from Products.CMFCore.URLTool import URLTool
url_tool = URLTool(*args, **kw)
return url_tool.__of__( self.site )
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_actions \
- import ActionProvider as IActionProvider
- from Products.CMFCore.interfaces.portal_url \
- import portal_url as IURLTool
- from Products.CMFCore.URLTool import URLTool
-
- verifyClass(IActionProvider, URLTool)
- verifyClass(IURLTool, URLTool)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import IActionProvider
from Products.CMFCore.interfaces import IURLTool
from Products.CMFCore.URLTool import URLTool
Modified: CMF/trunk/CMFCore/tests/test_UndoTool.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_UndoTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/tests/test_UndoTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -18,22 +18,12 @@
import unittest
import Testing
+from zope.interface.verify import verifyClass
+
class UndoToolTests(unittest.TestCase):
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_actions \
- import ActionProvider as IActionProvider
- from Products.CMFCore.interfaces.portal_undo \
- import portal_undo as IUndoTool
- from Products.CMFCore.UndoTool import UndoTool
-
- verifyClass(IActionProvider, UndoTool)
- verifyClass(IUndoTool, UndoTool)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import IActionProvider
from Products.CMFCore.interfaces import IUndoTool
from Products.CMFCore.UndoTool import UndoTool
Modified: CMF/trunk/CMFCore/tests/test_WorkflowTool.py
===================================================================
--- CMF/trunk/CMFCore/tests/test_WorkflowTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFCore/tests/test_WorkflowTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -19,14 +19,15 @@
import Testing
from OFS.SimpleItem import SimpleItem
-
from zope.component import adapter
from zope.component import getSiteManager
from zope.component import provideHandler
-from Products.CMFCore.interfaces import IActionWillBeInvokedEvent
+from zope.interface.verify import verifyClass
+from zope.testing.cleanup import cleanUp
+
from Products.CMFCore.interfaces import IActionRaisedExceptionEvent
from Products.CMFCore.interfaces import IActionSucceededEvent
-
+from Products.CMFCore.interfaces import IActionWillBeInvokedEvent
from Products.CMFCore.interfaces import ITypesTool
@@ -110,7 +111,7 @@
@adapter(IActionWillBeInvokedEvent)
def notifyBeforeHandler(evt):
evt.workflow.notified( 'before-evt' ).append( (evt.object, evt.action) )
-
+
@adapter(IActionSucceededEvent)
def notifySuccessHandler(evt):
evt.workflow.notified( 'success-evt' ).append( (evt.object, evt.action,
@@ -183,19 +184,10 @@
tool.setChainForPortalTypes( ( 'Dummy Content', ), ( 'a', 'b' ) )
return tool
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_actions \
- import ActionProvider as IActionProvider
- from Products.CMFCore.interfaces.portal_workflow \
- import portal_workflow as IWorkflowTool
- from Products.CMFCore.WorkflowTool import WorkflowTool
+ def tearDown(self):
+ cleanUp()
- verifyClass(IActionProvider, WorkflowTool)
- verifyClass(IWorkflowTool, WorkflowTool)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import IActionProvider
from Products.CMFCore.interfaces import IConfigurableWorkflowTool
from Products.CMFCore.interfaces import IWorkflowTool
@@ -363,7 +355,7 @@
notified = wf.notified( 'before' )
self.assertEqual( len( notified ), 1 )
self.assertEqual( notified[0], ( ob, 'action' ) )
-
+
notified = wf.notified( 'before-evt' )
self.assertEqual( len( notified ), 1 )
self.assertEqual( notified[0], ( ob, 'action' ) )
@@ -381,7 +373,7 @@
notified = wf.notified( 'success' )
self.assertEqual( len( notified ), 1 )
self.assertEqual( notified[0], ( ob, 'action', None ) )
-
+
notified = wf.notified( 'success-evt' )
self.assertEqual( len( notified ), 1 )
self.assertEqual( notified[0], ( ob, 'action', None ) )
@@ -399,7 +391,7 @@
notified = wf.notified( 'exception' )
self.assertEqual( len( notified ), 1 )
self.assertEqual( notified[0], ( ob, 'action', 'exception' ) )
-
+
notified = wf.notified( 'exception-evt' )
self.assertEqual( len( notified ), 1 )
self.assertEqual( notified[0], ( ob, 'action', 'exception' ) )
Modified: CMF/trunk/CMFDefault/DefaultWorkflow.py
===================================================================
--- CMF/trunk/CMFDefault/DefaultWorkflow.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/DefaultWorkflow.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -15,13 +15,12 @@
$Id$
"""
+from AccessControl import ClassSecurityInfo
from Acquisition import aq_base
from Acquisition import aq_inner
from Acquisition import aq_parent
-from AccessControl import ClassSecurityInfo
from DateTime import DateTime
from Globals import InitializeClass
-
from zope.component import getUtility
from zope.component import queryUtility
from zope.interface import implements
@@ -29,8 +28,6 @@
from Products.CMFCore.interfaces import ICatalogTool
from Products.CMFCore.interfaces import IMembershipTool
from Products.CMFCore.interfaces import IWorkflowDefinition
-from Products.CMFCore.interfaces.portal_workflow \
- import WorkflowDefinition as z2IWorkflowDefinition
from Products.CMFCore.utils import _checkPermission
from Products.CMFCore.utils import _modifyPermissionMappings
from Products.CMFCore.utils import SimpleItemWithProperties
@@ -42,13 +39,12 @@
from permissions import View
-class DefaultWorkflowDefinition (SimpleItemWithProperties):
+class DefaultWorkflowDefinition(SimpleItemWithProperties):
""" Default workflow definition.
"""
implements(IWorkflowDefinition)
- __implements__ = z2IWorkflowDefinition
meta_type = 'CMF Default Workflow'
id = 'default_workflow'
Modified: CMF/trunk/CMFDefault/DiscussionItem.py
===================================================================
--- CMF/trunk/CMFDefault/DiscussionItem.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/DiscussionItem.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -22,7 +22,6 @@
from Globals import Persistent
from Globals import PersistentMapping
from OFS.Traversable import Traversable
-
from zope.component import getUtility
from zope.interface import implements
@@ -30,10 +29,6 @@
from Products.CMFCore.interfaces import IDiscussable
from Products.CMFCore.interfaces import IDiscussionResponse
from Products.CMFCore.interfaces import IDiscussionTool
-from Products.CMFCore.interfaces.Discussions \
- import Discussable as z2IDiscussable
-from Products.CMFCore.interfaces.Discussions \
- import DiscussionResponse as z2IDiscussionResponse
from Document import Document
from permissions import AccessContentsInformation
@@ -76,7 +71,6 @@
"""
implements(IDiscussionResponse)
- __implements__ = (z2IDiscussionResponse, Document.__implements__)
meta_type = 'Discussion Item'
portal_type = 'Discussion Item'
@@ -162,7 +156,6 @@
"""
implements(IDiscussable, ICallableOpaqueItemEvents)
- __implements__ = z2IDiscussable
# for the security machinery to allow traversal
#__roles__ = None
Modified: CMF/trunk/CMFDefault/DiscussionTool.py
===================================================================
--- CMF/trunk/CMFDefault/DiscussionTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/DiscussionTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -20,7 +20,6 @@
from Globals import DTMLFile
from Globals import InitializeClass
from OFS.SimpleItem import SimpleItem
-
from zope.component import getUtility
from zope.interface import implements
@@ -29,10 +28,6 @@
from Products.CMFCore.interfaces import IDiscussionTool
from Products.CMFCore.interfaces import IMembershipTool
from Products.CMFCore.interfaces import ITypesTool
-from Products.CMFCore.interfaces.Discussions \
- import DiscussionResponse as z2IDiscussionResponse
-from Products.CMFCore.interfaces.portal_discussion \
- import portal_discussion as z2IDiscussionTool
from Products.CMFCore.utils import registerToolInterface
from Products.CMFCore.utils import UniqueObject
@@ -43,16 +38,15 @@
from permissions import ModifyPortalContent
from utils import _dtmldir
-
_marker = []
+
class DiscussionTool( UniqueObject, SimpleItem, ActionProviderBase ):
""" Links content to discussions.
"""
implements(IDiscussionTool)
- __implements__ = (z2IDiscussionTool, ActionProviderBase.__implements__)
id = 'portal_discussion'
meta_type = 'Default Discussion Tool'
@@ -96,7 +90,6 @@
raise DiscussionNotAllowed
if not IDiscussionResponse.providedBy(content) and \
- not z2IDiscussionResponse.isImplementedBy(content) and \
getattr( aq_base(content), 'talkback', None ) is None:
# Discussion Items use the DiscussionItemContainer object of the
# related content item, so only create one for other content items
@@ -130,4 +123,3 @@
InitializeClass( DiscussionTool )
registerToolInterface('portal_discussion', IDiscussionTool)
-
Modified: CMF/trunk/CMFDefault/Document.py
===================================================================
--- CMF/trunk/CMFDefault/Document.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/Document.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -36,8 +36,6 @@
from exceptions import ResourceLockedError
from interfaces import IDocument
from interfaces import IMutableDocument
-from interfaces.Document import IDocument as z2IDocument
-from interfaces.Document import IMutableDocument as z2IMutableDocument
from permissions import ModifyPortalContent
from permissions import View
from utils import _dtmldir
@@ -62,9 +60,6 @@
"""
implements(IMutableDocument, IDocument, IDAVAware)
- __implements__ = (z2IMutableDocument, z2IDocument,
- PortalContent.__implements__,
- DefaultDublinCoreImpl.__implements__)
effective_date = expiration_date = None
cooked_text = text = text_format = ''
Modified: CMF/trunk/CMFDefault/DublinCore.py
===================================================================
--- CMF/trunk/CMFDefault/DublinCore.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/DublinCore.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -21,7 +21,6 @@
from Globals import DTMLFile
from Globals import InitializeClass
from OFS.PropertyManager import PropertyManager
-
from zope.component import queryUtility
from zope.interface import implements
@@ -30,18 +29,12 @@
from Products.CMFCore.interfaces import IMembershipTool
from Products.CMFCore.interfaces import IMetadataTool
from Products.CMFCore.interfaces import IMutableDublinCore
-from Products.CMFCore.interfaces.DublinCore \
- import CatalogableDublinCore as z2ICatalogableDublinCore
-from Products.CMFCore.interfaces.DublinCore \
- import DublinCore as z2IDublinCore
-from Products.CMFCore.interfaces.DublinCore \
- import MutableDublinCore as z2IMutableDublinCore
from permissions import ModifyPortalContent
from permissions import View
-from utils import tuplize
from utils import _dtmldir
from utils import semi_split
+from utils import tuplize
_marker=[]
@@ -56,8 +49,6 @@
"""
implements(IDublinCore, ICatalogableDublinCore, IMutableDublinCore)
- __implements__ = (z2IDublinCore, z2ICatalogableDublinCore,
- z2IMutableDublinCore)
security = ClassSecurityInfo()
Modified: CMF/trunk/CMFDefault/Favorite.py
===================================================================
--- CMF/trunk/CMFDefault/Favorite.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/Favorite.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -54,7 +54,6 @@
"""
implements(IMutableFavorite, IFavorite)
- __implements__ = Link.__implements__ # redundant, but explicit
security = ClassSecurityInfo()
Modified: CMF/trunk/CMFDefault/File.py
===================================================================
--- CMF/trunk/CMFDefault/File.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/File.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -20,15 +20,15 @@
import OFS.Image
from AccessControl import ClassSecurityInfo
from Globals import InitializeClass
+from OFS.Cache import Cacheable
from zope.component.factory import Factory
from zope.interface import implements
-from OFS.Cache import Cacheable
from Products.CMFCore.PortalContent import PortalContent
+from Products.CMFCore.utils import _checkConditionalGET
from Products.CMFCore.utils import _OldCacheHeaders
from Products.CMFCore.utils import _setCacheHeaders
from Products.CMFCore.utils import _ViewEmulator
-from Products.CMFCore.utils import _checkConditionalGET
from Products.GenericSetup.interfaces import IDAVAware
from DublinCore import DefaultDublinCoreImpl
@@ -67,7 +67,7 @@
, description, contributors, effective_date, expiration_date
, format, language, rights
)
-
+
# Add the File instance to self
self._setObject(id, fobj)
@@ -83,9 +83,6 @@
"""
implements(IMutableFile, IFile, IDAVAware)
- __implements__ = ( PortalContent.__implements__
- , DefaultDublinCoreImpl.__implements__
- )
effective_date = expiration_date = None
_isDiscussable = 1
@@ -217,10 +214,10 @@
security.declareProtected(View, 'download')
def download(self, REQUEST, RESPONSE):
"""Download this item.
-
+
Calls OFS.Image.File.index_html to perform the actual transfer after
first setting Content-Disposition to suggest a filename.
-
+
This method is deprecated, use the URL of this object itself. Because
the default view of a File object is to download, rather than view,
this method is obsolete. Also note that certain browsers do not deal
Modified: CMF/trunk/CMFDefault/Image.py
===================================================================
--- CMF/trunk/CMFDefault/Image.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/Image.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -19,15 +19,15 @@
import OFS.Image
from AccessControl import ClassSecurityInfo
from Globals import InitializeClass
+from OFS.Cache import Cacheable
from zope.component.factory import Factory
from zope.interface import implements
-from OFS.Cache import Cacheable
from Products.CMFCore.PortalContent import PortalContent
+from Products.CMFCore.utils import _checkConditionalGET
from Products.CMFCore.utils import _OldCacheHeaders
from Products.CMFCore.utils import _setCacheHeaders
from Products.CMFCore.utils import _ViewEmulator
-from Products.CMFCore.utils import _checkConditionalGET
from Products.GenericSetup.interfaces import IDAVAware
from DublinCore import DefaultDublinCoreImpl
@@ -66,7 +66,7 @@
, description, contributors, effective_date, expiration_date
, format, language, rights
)
-
+
# Add the Image instance to self
self._setObject(id, iobj)
@@ -81,10 +81,7 @@
"""
implements(IMutableImage, IImage, IDAVAware)
- __implements__ = ( PortalContent.__implements__
- , DefaultDublinCoreImpl.__implements__
- )
-
+
effective_date = expiration_date = None
_isDiscussable = 1
icon = PortalContent.icon
Modified: CMF/trunk/CMFDefault/Link.py
===================================================================
--- CMF/trunk/CMFDefault/Link.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/Link.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -58,9 +58,6 @@
"""
implements(IMutableLink, ILink, IDAVAware)
- __implements__ = ( PortalContent.__implements__
- , DefaultDublinCoreImpl.__implements__
- )
URL_FORMAT = format = 'text/url'
effective_date = expiration_date = None
Modified: CMF/trunk/CMFDefault/MembershipTool.py
===================================================================
--- CMF/trunk/CMFDefault/MembershipTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/MembershipTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -23,7 +23,6 @@
from Globals import InitializeClass
from zope.interface import implements
-from Products.CMFCore.ActionProviderBase import ActionProviderBase
from Products.CMFCore.MembershipTool import MembershipTool as BaseTool
from Products.CMFCore.utils import _checkPermission
from Products.CMFCore.utils import _getAuthenticatedUser
@@ -31,15 +30,12 @@
from Document import addDocument
from interfaces import IMembershipTool
-from interfaces.portal_membership \
- import portal_membership as z2IMembershipTool
from permissions import ListPortalMembers
from permissions import ManagePortal
from permissions import ManageUsers
from permissions import View
from utils import _dtmldir
-
DEFAULT_MEMBER_CONTENT = """\
Default page for %s
@@ -51,13 +47,12 @@
"""
-class MembershipTool( BaseTool ):
+class MembershipTool(BaseTool):
""" Implement 'portal_membership' interface using "stock" policies.
"""
implements(IMembershipTool)
- __implements__ = (z2IMembershipTool, ActionProviderBase.__implements__)
meta_type = 'Default Membership Tool'
membersfolder_id = 'Members'
@@ -217,4 +212,3 @@
InitializeClass(MembershipTool)
registerToolInterface('portal_membership', IMembershipTool)
-
Modified: CMF/trunk/CMFDefault/MetadataTool.py
===================================================================
--- CMF/trunk/CMFDefault/MetadataTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/MetadataTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -25,8 +25,6 @@
from Products.CMFCore.ActionProviderBase import ActionProviderBase
from Products.CMFCore.interfaces import IMetadataTool
-from Products.CMFCore.interfaces.portal_metadata \
- import portal_metadata as z2IMetadataTool
from Products.CMFCore.utils import registerToolInterface
from Products.CMFCore.utils import UniqueObject
@@ -38,6 +36,7 @@
class MetadataElementPolicy( SimpleItem ):
+
""" Represent a type-specific policy about a particular metadata element.
"""
@@ -115,8 +114,10 @@
class ElementSpec( SimpleItem ):
+
""" Represent all the tool knows about a single metadata element.
"""
+
security = ClassSecurityInfo()
#
@@ -143,7 +144,7 @@
security.declareProtected(View , 'getPolicy')
def getPolicy( self, typ=None ):
""" Find the policy for this element for objects of the given type.
-
+
o Return a default, if none found.
"""
try:
@@ -175,7 +176,7 @@
security.declareProtected(ManagePortal, 'removePolicy')
def removePolicy( self, typ ):
""" Remove the policy from this element for objects of the given type.
-
+
o Do *not* remvoe the default, however.
"""
if typ is None:
@@ -186,8 +187,10 @@
class MetadataSchema( SimpleItem ):
+
""" Describe a metadata schema.
"""
+
security = ClassSecurityInfo()
meta_type = 'Metadata Schema'
@@ -278,7 +281,7 @@
, REQUEST=None
):
""" Update a policy for one of our elements
-
+
o 'content_type' will be '<default>' when we edit the default.
"""
if content_type == '<default>':
@@ -348,7 +351,7 @@
security.declareProtected(ManagePortal, 'listPolicies')
def listPolicies( self, typ=None ):
""" Show all policies for a given content type
-
+
o If 'typ' is none, return the list of default policies.
"""
result = []
@@ -370,7 +373,6 @@
class MetadataTool( UniqueObject, Folder, ActionProviderBase ):
implements(IMetadataTool)
- __implements__ = (z2IMetadataTool, ActionProviderBase.__implements__)
id = 'portal_metadata'
meta_type = 'Default Metadata Tool'
@@ -621,4 +623,3 @@
InitializeClass( MetadataTool )
registerToolInterface('portal_metadata', IMetadataTool)
-
Modified: CMF/trunk/CMFDefault/NewsItem.py
===================================================================
--- CMF/trunk/CMFDefault/NewsItem.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/NewsItem.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -50,7 +50,6 @@
"""
implements(IMutableNewsItem, INewsItem)
- __implements__ = Document.__implements__ # redundant, but explicit
text_format = 'html'
Modified: CMF/trunk/CMFDefault/PropertiesTool.py
===================================================================
--- CMF/trunk/CMFDefault/PropertiesTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/PropertiesTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -27,8 +27,6 @@
from Products.CMFCore.ActionProviderBase import ActionProviderBase
from Products.CMFCore.interfaces import IPropertiesTool
from Products.CMFCore.interfaces import ISiteRoot
-from Products.CMFCore.interfaces.portal_properties \
- import portal_properties as z2IPropertiesTool
from Products.CMFCore.utils import registerToolInterface
from Products.CMFCore.utils import UniqueObject
@@ -39,7 +37,6 @@
class PropertiesTool(UniqueObject, SimpleItem, ActionProviderBase):
implements(IPropertiesTool)
- __implements__ = (z2IPropertiesTool, ActionProviderBase.__implements__)
id = 'portal_properties'
meta_type = 'Default Properties Tool'
Modified: CMF/trunk/CMFDefault/RegistrationTool.py
===================================================================
--- CMF/trunk/CMFDefault/RegistrationTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/RegistrationTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -20,7 +20,6 @@
from Globals import InitializeClass
from Products.MailHost.interfaces import IMailHost
from zope.component import getUtility
-from zope.interface import implements
from zope.schema import ValidationError
from Products.CMFCore.interfaces import IMembershipTool
@@ -39,9 +38,6 @@
""" Manage through-the-web signup policies.
"""
- implements(IRegistrationTool)
- __implements__ = BaseTool.__implements__
-
meta_type = 'Default Registration Tool'
security = ClassSecurityInfo()
@@ -210,4 +206,3 @@
InitializeClass(RegistrationTool)
registerToolInterface('portal_registration', IRegistrationTool)
-
Modified: CMF/trunk/CMFDefault/SyndicationTool.py
===================================================================
--- CMF/trunk/CMFDefault/SyndicationTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/SyndicationTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -23,7 +23,6 @@
from Globals import HTMLFile
from Globals import InitializeClass
from OFS.SimpleItem import SimpleItem
-
from zope.interface import implements
from Products.CMFCore.ActionProviderBase import ActionProviderBase
@@ -48,7 +47,6 @@
"""
implements(ISyndicationTool)
- __implements__ = ActionProviderBase.__implements__
id = 'portal_syndication'
meta_type = 'Default Syndication Tool'
@@ -391,4 +389,3 @@
InitializeClass(SyndicationTool)
registerToolInterface('portal_syndication', ISyndicationTool)
-
Deleted: CMF/trunk/CMFDefault/interfaces/Document.py
===================================================================
--- CMF/trunk/CMFDefault/interfaces/Document.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/interfaces/Document.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,20 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2005 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Document content type interfaces.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - IDocument
Modified: CMF/trunk/CMFDefault/interfaces/__init__.py
===================================================================
--- CMF/trunk/CMFDefault/interfaces/__init__.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/interfaces/__init__.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -24,16 +24,3 @@
"""CMF default skin.
"""
-
-
-# BBB: will be removed in CMF 2.2
-# create zope2 interfaces
-from Interface.bridge import createZope3Bridge
-import Document
-import portal_membership
-
-createZope3Bridge(IDocument, Document, 'IDocument')
-createZope3Bridge(IMutableDocument, Document, 'IMutableDocument')
-createZope3Bridge(IMembershipTool, portal_membership, 'portal_membership')
-
-del createZope3Bridge
Deleted: CMF/trunk/CMFDefault/interfaces/portal_membership.py
===================================================================
--- CMF/trunk/CMFDefault/interfaces/portal_membership.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/interfaces/portal_membership.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,20 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2003 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Extended membership tool interface.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - portal_membership
Modified: CMF/trunk/CMFDefault/tests/test_DefaultWorkflow.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_DefaultWorkflow.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/tests/test_DefaultWorkflow.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -18,11 +18,12 @@
import unittest
import Testing
+from zope.interface.verify import verifyClass
+
from Products.CMFCore.tests.base.dummy import DummyContent
from Products.CMFCore.tests.base.dummy import DummySite
from Products.CMFCore.tests.base.dummy import DummyTool
from Products.CMFCore.tests.base.dummy import DummyUserFolder
-
from Products.CMFCore.WorkflowTool import WorkflowTool
@@ -41,17 +42,7 @@
wftool._setObject('wf', DefaultWorkflowDefinition('wf'))
wftool.setDefaultChain('wf')
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_workflow \
- import WorkflowDefinition as IWorkflowDefinition
- from Products.CMFDefault.DefaultWorkflow \
- import DefaultWorkflowDefinition
-
- verifyClass(IWorkflowDefinition, DefaultWorkflowDefinition)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import IWorkflowDefinition
from Products.CMFDefault.DefaultWorkflow \
import DefaultWorkflowDefinition
Modified: CMF/trunk/CMFDefault/tests/test_DiscussionTool.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_DiscussionTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/tests/test_DiscussionTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -19,6 +19,7 @@
import Testing
from zope.component import getSiteManager
+from zope.interface.verify import verifyClass
from zope.testing.cleanup import cleanUp
from Products.CMFCore.interfaces import IDiscussionTool
@@ -49,19 +50,7 @@
def tearDown(self):
cleanUp()
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_actions \
- import ActionProvider as IActionProvider
- from Products.CMFCore.interfaces.portal_discussion \
- import portal_discussion as IDiscussionTool
- from Products.CMFDefault.DiscussionTool import DiscussionTool
-
- verifyClass(IActionProvider, DiscussionTool)
- verifyClass(IDiscussionTool, DiscussionTool)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import IActionProvider
from Products.CMFCore.interfaces import IDiscussionTool
from Products.CMFDefault.DiscussionTool import DiscussionTool
Modified: CMF/trunk/CMFDefault/tests/test_Discussions.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_Discussions.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/tests/test_Discussions.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -19,6 +19,7 @@
import Testing
from zope.component import getSiteManager
+from zope.interface.verify import verifyClass
from Products.CMFCore.CatalogTool import CatalogTool
from Products.CMFCore.interfaces import ICatalogTool
@@ -40,31 +41,7 @@
class DiscussionItemTests(unittest.TestCase):
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.Contentish \
- import Contentish as IContentish
- from Products.CMFCore.interfaces.Discussions \
- import DiscussionResponse as IDiscussionResponse
- from Products.CMFCore.interfaces.DublinCore \
- import CatalogableDublinCore as ICatalogableDublinCore
- from Products.CMFCore.interfaces.DublinCore \
- import DublinCore as IDublinCore
- from Products.CMFCore.interfaces.DublinCore \
- import MutableDublinCore as IMutableDublinCore
- from Products.CMFCore.interfaces.Dynamic \
- import DynamicType as IDynamicType
- from Products.CMFDefault.DiscussionItem import DiscussionItem
-
- verifyClass(ICatalogableDublinCore, DiscussionItem)
- verifyClass(IContentish, DiscussionItem)
- verifyClass(IDiscussionResponse, DiscussionItem)
- verifyClass(IDublinCore, DiscussionItem)
- verifyClass(IDynamicType, DiscussionItem)
- verifyClass(IMutableDublinCore, DiscussionItem)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import ICatalogableDublinCore
from Products.CMFCore.interfaces import IContentish
from Products.CMFCore.interfaces import IDiscussionResponse
@@ -88,15 +65,7 @@
return DiscussionItemContainer
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.Discussions \
- import Discussable as IDiscussable
-
- verifyClass(IDiscussable, self._getTargetClass())
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import ICallableOpaqueItemEvents
from Products.CMFCore.interfaces import IDiscussable
Modified: CMF/trunk/CMFDefault/tests/test_Document.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_Document.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/tests/test_Document.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -24,8 +24,9 @@
from re import compile
from StringIO import StringIO
-from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate
from DocumentTemplate.DT_Util import html_quote
+from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate
+from zope.interface.verify import verifyClass
from Products.CMFCore.testing import ConformsToContent
from Products.CMFCore.tests.base.content import BASIC_HTML
@@ -60,16 +61,7 @@
class DocumentTests(ConformsToContent, RequestTestBase):
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFDefault.interfaces.Document import IDocument
- from Products.CMFDefault.interfaces.Document import IMutableDocument
-
- verifyClass(IDocument, self._getTargetClass())
- verifyClass(IMutableDocument, self._getTargetClass())
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFDefault.interfaces import IDocument
from Products.CMFDefault.interfaces import IMutableDocument
Modified: CMF/trunk/CMFDefault/tests/test_DublinCore.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_DublinCore.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/tests/test_DublinCore.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -21,8 +21,8 @@
from AccessControl.SecurityManagement import newSecurityManager
from Acquisition import Implicit
from DateTime.DateTime import DateTime
-
from zope.component import getSiteManager
+from zope.interface.verify import verifyClass
from zope.testing.cleanup import cleanUp
from Products.CMFCore.interfaces import IMembershipTool
@@ -74,22 +74,7 @@
cleanUp()
SecurityTest.tearDown(self)
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.DublinCore \
- import CatalogableDublinCore as ICatalogableDublinCore
- from Products.CMFCore.interfaces.DublinCore \
- import DublinCore as IDublinCore
- from Products.CMFCore.interfaces.DublinCore \
- import MutableDublinCore as IMutableDublinCore
- from Products.CMFDefault.DublinCore import DefaultDublinCoreImpl
-
- verifyClass(ICatalogableDublinCore, DefaultDublinCoreImpl)
- verifyClass(IDublinCore, DefaultDublinCoreImpl)
- verifyClass(IMutableDublinCore, DefaultDublinCoreImpl)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import ICatalogableDublinCore
from Products.CMFCore.interfaces import IDublinCore
from Products.CMFCore.interfaces import IMutableDublinCore
@@ -103,8 +88,7 @@
site = DummySite('site').__of__(self.root)
sm = getSiteManager()
acl_users = site._setObject( 'acl_users', DummyUserFolder() )
- site._setObject( 'portal_membership', MembershipTool() )
- sm.registerUtility(site.portal_membership, IMembershipTool)
+ sm.registerUtility(MembershipTool(), IMembershipTool)
newSecurityManager(None, acl_users.user_foo)
item = self._makeDummyContent('item').__of__(site)
self.assertEqual( item.listCreators(), () )
@@ -119,8 +103,7 @@
site = DummySite('site').__of__(self.root)
sm = getSiteManager()
acl_users = site._setObject( 'acl_users', DummyUserFolder() )
- site._setObject( 'portal_membership', MembershipTool() )
- sm.registerUtility(site.portal_membership, IMembershipTool)
+ sm.registerUtility(MembershipTool(), IMembershipTool)
newSecurityManager(None, acl_users.user_foo)
item = self._makeDummyContent('item').__of__(site)
self.assertEqual( item.listCreators(), () )
@@ -144,8 +127,7 @@
site = DummySite('site').__of__(self.root)
sm = getSiteManager()
acl_users = site._setObject( 'acl_users', DummyUserFolder() )
- site._setObject( 'portal_membership', MembershipTool() )
- sm.registerUtility(site.portal_membership, IMembershipTool)
+ sm.registerUtility(MembershipTool(), IMembershipTool)
newSecurityManager(None, acl_users.user_foo)
item = self._makeDummyContent('item').__of__(site)
item.manage_fixupOwnershipAfterAdd()
@@ -178,8 +160,8 @@
PUBLISHER = 'Some Publisher'
site = DummySite('site').__of__(self.root)
sm = getSiteManager()
- site.portal_metadata = DummyMetadataTool(publisher=PUBLISHER)
- sm.registerUtility(site.portal_metadata, IMetadataTool)
+ sm.registerUtility(DummyMetadataTool(publisher=PUBLISHER),
+ IMetadataTool)
item = self._makeDummyContent('item').__of__(site)
self.assertEqual(item.Publisher(), PUBLISHER)
Modified: CMF/trunk/CMFDefault/tests/test_Favorite.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_Favorite.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/tests/test_Favorite.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -19,6 +19,7 @@
import Testing
from zope.component import getSiteManager
+from zope.interface.verify import verifyClass
from zope.testing.cleanup import cleanUp
from Products.CMFCore.interfaces import IMembershipTool
@@ -50,8 +51,7 @@
def tearDown(self):
cleanUp()
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFDefault.interfaces import IFavorite
from Products.CMFDefault.interfaces import ILink
from Products.CMFDefault.interfaces import IMutableFavorite
Modified: CMF/trunk/CMFDefault/tests/test_File.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_File.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/tests/test_File.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -21,13 +21,14 @@
from os.path import join as path_join
from zope.component import getSiteManager
+from zope.interface.verify import verifyClass
from zope.testing.cleanup import cleanUp
from Products.CMFCore.interfaces import ICachingPolicyManager
from Products.CMFCore.testing import ConformsToContent
+from Products.CMFCore.tests.base.dummy import DummyCachingManager
from Products.CMFCore.tests.base.dummy import DummyCachingManagerWithPolicy
-from Products.CMFCore.tests.base.dummy import DummyCachingManager
-from Products.CMFCore.tests.base.testcase import RequestTest
+from Products.CMFCore.tests.base.testcase import RequestTest
from Products.CMFDefault import tests
TESTS_HOME = tests.__path__[0]
@@ -45,8 +46,7 @@
def _makeOne(self, *args, **kw):
return self._getTargetClass()(*args, **kw)
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFDefault.interfaces import IFile
from Products.CMFDefault.interfaces import IMutableFile
@@ -122,7 +122,7 @@
from webdav.common import rfc1123_date
from Products.CMFCore.tests.base.dummy import FAKE_ETAG
-
+
file = self._makeOne( 'test_file', 'test_file.swf', file=ref )
file = file.__of__( self.root )
@@ -143,7 +143,7 @@
path, ref = self._extractFile()
from webdav.common import rfc1123_date
-
+
file = self._makeOne( 'test_file', 'test_file.swf', file=ref )
file = file.__of__( self.root )
Modified: CMF/trunk/CMFDefault/tests/test_Image.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_Image.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/tests/test_Image.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -21,14 +21,14 @@
from os.path import join as path_join
from cStringIO import StringIO
+import transaction
+from AccessControl.SecurityManagement import newSecurityManager
+from AccessControl.User import UnrestrictedUser
from zope.app.component.hooks import setSite
from zope.component import getSiteManager
+from zope.interface.verify import verifyClass
from zope.testing.cleanup import cleanUp
-import transaction
-from AccessControl.SecurityManagement import newSecurityManager
-from AccessControl.User import UnrestrictedUser
-
from Products.CMFCore.interfaces import ICachingPolicyManager
from Products.CMFCore.testing import ConformsToContent
from Products.CMFCore.tests.base.dummy import DummyCachingManager
@@ -57,8 +57,7 @@
self.site = DummySite('site')
self.site._setObject( 'portal_membership', DummyTool() )
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFDefault.interfaces import IFile
from Products.CMFDefault.interfaces import IImage
from Products.CMFDefault.interfaces import IMutableFile
Modified: CMF/trunk/CMFDefault/tests/test_Link.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_Link.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/tests/test_Link.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -20,6 +20,8 @@
from re import compile
+from zope.interface.verify import verifyClass
+
from Products.CMFCore.testing import ConformsToContent
from Products.CMFCore.tests.base.content import BASIC_RFC822
from Products.CMFCore.tests.base.content import RFC822_W_CONTINUATION
@@ -45,8 +47,7 @@
d.edit(orig)
self.assertEqual(d.getRemoteUrl(), wanted)
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFDefault.interfaces import ILink
from Products.CMFDefault.interfaces import IMutableLink
Modified: CMF/trunk/CMFDefault/tests/test_MembershipTool.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_MembershipTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/tests/test_MembershipTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -19,8 +19,8 @@
import Testing
from AccessControl.SecurityManagement import newSecurityManager
-
from zope.component import getSiteManager
+from zope.interface.verify import verifyClass
from zope.testing.cleanup import cleanUp
from Products.CMFCore.interfaces import IConfigurableWorkflowTool
@@ -43,19 +43,7 @@
self.site = DummySite('site')
self.site._setObject( 'portal_membership', self._makeOne() )
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_actions \
- import ActionProvider as IActionProvider
- from Products.CMFDefault.interfaces.portal_membership \
- import portal_membership as IMembershipTool
- from Products.CMFDefault.MembershipTool import MembershipTool
-
- verifyClass(IActionProvider, MembershipTool)
- verifyClass(IMembershipTool, MembershipTool)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import IActionProvider
from Products.CMFDefault.interfaces import IMembershipTool
from Products.CMFDefault.MembershipTool import MembershipTool
Modified: CMF/trunk/CMFDefault/tests/test_MetadataTool.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_MetadataTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/tests/test_MetadataTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -19,6 +19,7 @@
import Testing
from Acquisition import aq_base
+from zope.interface.verify import verifyClass
class TestMetadataElementPolicy(unittest.TestCase):
@@ -41,7 +42,7 @@
def test_edit_single_valued( self ):
sv_policy = self._makeOne( 0 )
- sv_policy.edit( 1, 1, 'xxx', 0, '' )
+ sv_policy.edit( 1, 1, 'xxx', 0, '' )
self.failIf( sv_policy.isMultiValued() )
self.failUnless( sv_policy.isRequired() )
self.failUnless( sv_policy.supplyDefault() )
@@ -139,18 +140,7 @@
return Foo(), Bar()
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_actions \
- import ActionProvider as IActionProvider
- from Products.CMFCore.interfaces.portal_metadata \
- import portal_metadata as IMetadataTool
-
- verifyClass(IActionProvider, self._getTargetClass())
- verifyClass(IMetadataTool, self._getTargetClass())
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import IActionProvider
from Products.CMFCore.interfaces import IMetadataTool
Modified: CMF/trunk/CMFDefault/tests/test_NewsItem.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_NewsItem.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/tests/test_NewsItem.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -18,6 +18,8 @@
import unittest
import Testing
+from zope.interface.verify import verifyClass
+
from Products.CMFCore.testing import ConformsToContent
from Products.CMFCore.tests.base.content import BASIC_HTML
from Products.CMFCore.tests.base.content import BASIC_STRUCTUREDTEXT
@@ -36,8 +38,7 @@
def _makeOne(self, *args, **kw):
return self._getTargetClass()(*args, **kw)
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFDefault.interfaces import IDocument
from Products.CMFDefault.interfaces import IMutableDocument
from Products.CMFDefault.interfaces import IMutableNewsItem
Modified: CMF/trunk/CMFDefault/tests/test_PropertiesTool.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_PropertiesTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/tests/test_PropertiesTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -18,22 +18,12 @@
import unittest
import Testing
+from zope.interface.verify import verifyClass
+
class PropertiesToolTests(unittest.TestCase):
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_actions \
- import ActionProvider as IActionProvider
- from Products.CMFCore.interfaces.portal_properties \
- import portal_properties as IPropertiesTool
- from Products.CMFDefault.PropertiesTool import PropertiesTool
-
- verifyClass(IActionProvider, PropertiesTool)
- verifyClass(IPropertiesTool, PropertiesTool)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import IActionProvider
from Products.CMFCore.interfaces import IPropertiesTool
from Products.CMFDefault.PropertiesTool import PropertiesTool
Modified: CMF/trunk/CMFDefault/tests/test_RegistrationTool.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_RegistrationTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/tests/test_RegistrationTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -20,6 +20,7 @@
from Acquisition import Implicit
from zope.component import getSiteManager
+from zope.interface.verify import verifyClass
from zope.testing.cleanup import cleanUp
from Products.CMFCore.interfaces import IMembershipTool
@@ -47,18 +48,7 @@
cleanUp()
RequestTest.tearDown(self)
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_actions \
- import ActionProvider as IActionProvider
- from Products.CMFCore.interfaces.portal_registration \
- import portal_registration as IRegistrationTool
-
- verifyClass(IActionProvider, self._getTargetClass())
- verifyClass(IRegistrationTool, self._getTargetClass())
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import IActionProvider
from Products.CMFCore.interfaces import IRegistrationTool
Modified: CMF/trunk/CMFDefault/tests/test_SkinnedFolder.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_SkinnedFolder.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/tests/test_SkinnedFolder.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -18,6 +18,8 @@
import unittest
import Testing
+from zope.interface.verify import verifyClass
+
from Products.CMFCore.testing import ConformsToFolder
@@ -28,14 +30,7 @@
return SkinnedFolder
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from OFS.IOrderSupport import IOrderedContainer
-
- verifyClass(IOrderedContainer, self._getTargetClass())
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from OFS.interfaces import IOrderedContainer
from Products.CMFCore.interfaces import IContentish
Modified: CMF/trunk/CMFDefault/tests/test_SyndicationTool.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_SyndicationTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFDefault/tests/test_SyndicationTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -19,8 +19,8 @@
import Testing
from DateTime.DateTime import DateTime
-
from zope.component import getSiteManager
+from zope.interface.verify import verifyClass
from zope.testing.cleanup import cleanUp
from Products.CMFCore.interfaces import ITypesTool
@@ -46,6 +46,13 @@
cleanUp()
SecurityTest.tearDown(self)
+ def test_interfaces(self):
+ from Products.CMFCore.interfaces import IActionProvider
+ from Products.CMFCore.interfaces import ISyndicationTool
+
+ verifyClass(IActionProvider, self._getTargetClass())
+ verifyClass(ISyndicationTool, self._getTargetClass())
+
def test_empty(self):
ONE_MINUTE = (24.0 * 60.0) / 86400
Modified: CMF/trunk/CMFTopic/DateCriteria.py
===================================================================
--- CMF/trunk/CMFTopic/DateCriteria.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFTopic/DateCriteria.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -21,7 +21,6 @@
from zope.interface import implements
from AbstractCriterion import AbstractCriterion
-from interfaces import Criterion as z2ICriterion
from interfaces import ICriterion
from permissions import ChangeTopics
from permissions import View
@@ -36,7 +35,6 @@
"""
implements(ICriterion)
- __implements__ = z2ICriterion
meta_type = 'Friendly Date Criterion'
@@ -148,7 +146,7 @@
} ), )
else:
return ( ( field, { 'query': date.earliestTime()
- , 'range': operation
+ , 'range': operation
} ), )
else:
# Value 0 means "Now", so get everything from now on
Modified: CMF/trunk/CMFTopic/ListCriterion.py
===================================================================
--- CMF/trunk/CMFTopic/ListCriterion.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFTopic/ListCriterion.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -20,7 +20,6 @@
from zope.interface import implements
from AbstractCriterion import AbstractCriterion
-from interfaces import Criterion as z2ICriterion
from interfaces import ICriterion
from permissions import ChangeTopics
from permissions import View
@@ -35,7 +34,6 @@
"""
implements(ICriterion)
- __implements__ = z2ICriterion
meta_type = 'List Criterion'
operator = None
Modified: CMF/trunk/CMFTopic/SimpleIntCriterion.py
===================================================================
--- CMF/trunk/CMFTopic/SimpleIntCriterion.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFTopic/SimpleIntCriterion.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -20,7 +20,6 @@
from zope.interface import implements
from AbstractCriterion import AbstractCriterion
-from interfaces import Criterion as z2ICriterion
from interfaces import ICriterion
from permissions import ChangeTopics
from permissions import View
@@ -35,7 +34,6 @@
"""
implements(ICriterion)
- __implements__ = z2ICriterion
meta_type = 'Integer Criterion'
Modified: CMF/trunk/CMFTopic/SimpleStringCriterion.py
===================================================================
--- CMF/trunk/CMFTopic/SimpleStringCriterion.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFTopic/SimpleStringCriterion.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -20,7 +20,6 @@
from zope.interface import implements
from AbstractCriterion import AbstractCriterion
-from interfaces import Criterion as z2ICriterion
from interfaces import ICriterion
from permissions import ChangeTopics
from permissions import View
@@ -33,7 +32,6 @@
"""
implements(ICriterion)
- __implements__ = z2ICriterion
meta_type = 'String Criterion'
@@ -45,21 +43,21 @@
self.id = id
self.field = field
self.value = ''
-
+
security.declareProtected( ChangeTopics, 'getEditForm' )
def getEditForm( self ):
"""
Return the skinned name of the edit form.
"""
return 'ssc_edit'
-
+
security.declareProtected( ChangeTopics, 'edit' )
def edit( self, value ):
"""
Update the value we are to match up against.
"""
self.value = str( value )
-
+
security.declareProtected(View, 'getCriteriaItems')
def getCriteriaItems( self ):
"""
@@ -72,7 +70,6 @@
return tuple( result )
-
InitializeClass( SimpleStringCriterion )
# Register as a criteria type with the Topic class
Modified: CMF/trunk/CMFTopic/SortCriterion.py
===================================================================
--- CMF/trunk/CMFTopic/SortCriterion.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFTopic/SortCriterion.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -20,7 +20,6 @@
from zope.interface import implements
from AbstractCriterion import AbstractCriterion
-from interfaces import Criterion as z2ICriterion
from interfaces import ICriterion
from permissions import ChangeTopics
from permissions import View
@@ -35,7 +34,6 @@
"""
implements(ICriterion)
- __implements__ = z2ICriterion
meta_type = 'Sort Criterion'
@@ -49,7 +47,7 @@
self.id = id
self.index = index
self.reversed = 0
-
+
# inherit permissions
def Field( self ):
"""
@@ -64,14 +62,14 @@
used to edit this kind of criterion.
"""
return 'sort_edit'
-
+
security.declareProtected( ChangeTopics, 'edit' )
def edit( self, reversed ):
"""
Update the value we are to match up against.
"""
self.reversed = bool(reversed)
-
+
security.declareProtected(View, 'getCriteriaItems')
def getCriteriaItems( self ):
"""
Deleted: CMF/trunk/CMFTopic/interfaces/Criterion.py
===================================================================
--- CMF/trunk/CMFTopic/interfaces/Criterion.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFTopic/interfaces/Criterion.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -1,21 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" Declare interface for search criterion classes, as used by Topic instances
-to build their queries.
-
-$Id$
-"""
-
-# BBB: module will be removed in CMF 2.2
-# zope2 interfaces created on runtime:
-# - Criterion
Modified: CMF/trunk/CMFTopic/interfaces/__init__.py
===================================================================
--- CMF/trunk/CMFTopic/interfaces/__init__.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFTopic/interfaces/__init__.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -101,14 +101,3 @@
a value to be injected into the query dictionary (and,
therefore, tailored to work with the catalog).
"""
-
-
-# BBB: will be removed in CMF 2.2
-# create zope2 interfaces
-from Interface.bridge import createZope3Bridge
-import Criterion
-
-createZope3Bridge(ICriterion, Criterion, 'Criterion')
-
-from Criterion import Criterion
-del createZope3Bridge
Modified: CMF/trunk/CMFTopic/tests/common.py
===================================================================
--- CMF/trunk/CMFTopic/tests/common.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFTopic/tests/common.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -17,20 +17,15 @@
from unittest import TestCase
+from zope.interface.verify import verifyClass
+
class CriterionTestCase(TestCase):
def _makeOne(self, id, *args, **kw):
return self._getTargetClass()(id, *args, **kw)
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFTopic.interfaces import Criterion as ICriterion
-
- verifyClass( ICriterion, self._getTargetClass() )
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFTopic.interfaces import ICriterion
- verifyClass( ICriterion, self._getTargetClass() )
+ verifyClass(ICriterion, self._getTargetClass())
Modified: CMF/trunk/CMFTopic/tests/test_Topic.py
===================================================================
--- CMF/trunk/CMFTopic/tests/test_Topic.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFTopic/tests/test_Topic.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -22,6 +22,7 @@
from Acquisition import Implicit
from zope.component import getSiteManager
+from zope.interface.verify import verifyClass
from Products.CMFCore.interfaces import ICatalogTool
from Products.CMFCore.interfaces import ISyndicationTool
@@ -162,14 +163,7 @@
SecurityTest.setUp(self)
self.site = DummySite('site').__of__(self.root)
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from OFS.IOrderSupport import IOrderedContainer
-
- verifyClass(IOrderedContainer, self._getTargetClass())
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from OFS.interfaces import IOrderedContainer
from Products.CMFCore.interfaces import IContentish
from Products.CMFTopic.interfaces import IMutableTopic
Modified: CMF/trunk/CMFUid/UniqueIdAnnotationTool.py
===================================================================
--- CMF/trunk/CMFUid/UniqueIdAnnotationTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFUid/UniqueIdAnnotationTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -24,13 +24,12 @@
from Globals import Persistent
from OFS.PropertyManager import PropertyManager
from OFS.SimpleItem import SimpleItem
-
from zope.component import getUtility
from zope.interface import implements
-from Products.CMFCore.utils import UniqueObject
-from Products.CMFCore.utils import registerToolInterface
from Products.CMFCore.ActionProviderBase import ActionProviderBase
+from Products.CMFCore.utils import registerToolInterface
+from Products.CMFCore.utils import UniqueObject
from Products.CMFUid.interfaces import IUniqueIdAnnotation
from Products.CMFUid.interfaces import IUniqueIdAnnotationManagement
@@ -115,10 +114,6 @@
__doc__ = __doc__ # copy from module
implements(IUniqueIdAnnotationManagement)
- __implements__ = (
- ActionProviderBase.__implements__,
- SimpleItem.__implements__,
- )
manage_options = (
PropertyManager.manage_options +
@@ -149,4 +144,3 @@
InitializeClass(UniqueIdAnnotationTool)
registerToolInterface('portal_uidannotation', IUniqueIdAnnotationManagement)
-
Modified: CMF/trunk/CMFUid/UniqueIdGeneratorTool.py
===================================================================
--- CMF/trunk/CMFUid/UniqueIdGeneratorTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFUid/UniqueIdGeneratorTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -26,22 +26,19 @@
from Products.CMFCore.ActionProviderBase import ActionProviderBase
from Products.CMFCore.utils import registerToolInterface
from Products.CMFCore.utils import UniqueObject
+
from Products.CMFUid.interfaces import IUniqueIdGenerator
class UniqueIdGeneratorTool(UniqueObject, SimpleItem, ActionProviderBase):
"""Generator of unique ids.
-
+
This is a dead simple implementation using a counter. May cause
ConflictErrors under high load and the values are predictable.
"""
implements(IUniqueIdGenerator)
- __implements__ = (
- ActionProviderBase.__implements__,
- SimpleItem.__implements__,
- )
id = 'portal_uidgenerator'
alternative_id = 'portal_standard_uidgenerator'
@@ -77,4 +74,3 @@
InitializeClass(UniqueIdGeneratorTool)
registerToolInterface('portal_uidgenerator', IUniqueIdGenerator)
-
Modified: CMF/trunk/CMFUid/UniqueIdHandlerTool.py
===================================================================
--- CMF/trunk/CMFUid/UniqueIdHandlerTool.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFUid/UniqueIdHandlerTool.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -27,7 +27,6 @@
from Globals import package_home
from OFS.SimpleItem import SimpleItem
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
-
from zope.component import getUtility
from zope.interface import implements
@@ -55,10 +54,6 @@
implements(IUniqueIdHandler, IUniqueIdBrainQuery,
IUniqueIdUnrestrictedQuery)
- __implements__ = (
- ActionProviderBase.__implements__,
- SimpleItem.__implements__,
- )
id = 'portal_uidhandler'
@@ -266,4 +261,3 @@
InitializeClass(UniqueIdHandlerTool)
registerToolInterface('portal_uidhandler', IUniqueIdHandler)
-
Modified: CMF/trunk/CMFUid/tests/test_uidannotation.py
===================================================================
--- CMF/trunk/CMFUid/tests/test_uidannotation.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFUid/tests/test_uidannotation.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -23,6 +23,7 @@
from zope.app.container.contained import ObjectAddedEvent
from zope.component import getSiteManager
from zope.event import notify
+from zope.interface.verify import verifyClass
from Products.CMFCore.PortalFolder import PortalFolder
from Products.CMFCore.testing import EventZCMLLayer
@@ -53,8 +54,7 @@
, IUniqueIdAnnotationManagement
)
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFUid.interfaces import IUniqueIdAnnotation
from Products.CMFUid.interfaces import IUniqueIdAnnotationManagement
from Products.CMFUid.UniqueIdAnnotationTool \
Modified: CMF/trunk/CMFUid/tests/test_uidgeneration.py
===================================================================
--- CMF/trunk/CMFUid/tests/test_uidgeneration.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFUid/tests/test_uidgeneration.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -19,6 +19,7 @@
import Testing
from BTrees.Length import Length
+from zope.interface.verify import verifyClass
from Products.CMFCore.tests.base.testcase import SecurityTest
@@ -35,8 +36,7 @@
SecurityTest.setUp(self)
self.root._setObject('portal_uidgenerator', self._getTargetClass()())
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFUid.interfaces import IUniqueIdGenerator
verifyClass(IUniqueIdGenerator, self._getTargetClass())
Modified: CMF/trunk/CMFUid/tests/test_uidhandling.py
===================================================================
--- CMF/trunk/CMFUid/tests/test_uidhandling.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/CMFUid/tests/test_uidhandling.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -19,6 +19,7 @@
import Testing
from zope.component import getSiteManager
+from zope.interface.verify import verifyClass
from zope.testing.cleanup import cleanUp
from Products.CMFCore.interfaces import ICatalogTool
@@ -69,13 +70,13 @@
cleanUp()
SecurityTest.tearDown(self)
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFUid.interfaces import IUniqueIdBrainQuery
from Products.CMFUid.interfaces import IUniqueIdHandler
from Products.CMFUid.interfaces import IUniqueIdUnrestrictedQuery
+
+ verifyClass(IUniqueIdBrainQuery, self._getTargetClass())
verifyClass(IUniqueIdHandler, self._getTargetClass())
- verifyClass(IUniqueIdBrainQuery, self._getTargetClass())
verifyClass(IUniqueIdUnrestrictedQuery, self._getTargetClass())
def test_getUidOfNotYetRegisteredObject(self):
Modified: CMF/trunk/DCWorkflow/DCWorkflow.py
===================================================================
--- CMF/trunk/DCWorkflow/DCWorkflow.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/DCWorkflow/DCWorkflow.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -25,32 +25,29 @@
from Globals import InitializeClass
from OFS.Folder import Folder
from OFS.ObjectManager import bad_id
-
from zope.component import getUtility
-from zope.interface import implements
from zope.event import notify
+from zope.interface import implements
# CMFCore
from Products.CMFCore.interfaces import ICatalogTool
from Products.CMFCore.interfaces import IWorkflowDefinition
-from Products.CMFCore.interfaces.portal_workflow \
- import WorkflowDefinition as z2IWorkflowDefinition
from Products.CMFCore.WorkflowCore import ObjectDeleted
from Products.CMFCore.WorkflowCore import ObjectMoved
from Products.CMFCore.WorkflowCore import WorkflowException
# DCWorkflow
+from events import BeforeTransitionEvent, AfterTransitionEvent
+from Expression import createExprContext
+from Expression import StateChangeInfo
from interfaces import IDCWorkflowDefinition
from permissions import ManagePortal
+from Transitions import TRIGGER_AUTOMATIC
+from Transitions import TRIGGER_USER_ACTION
from utils import Message as _
-from utils import modifyRolesForPermission
from utils import modifyRolesForGroup
+from utils import modifyRolesForPermission
from WorkflowUIMixin import WorkflowUIMixin
-from Transitions import TRIGGER_AUTOMATIC
-from Transitions import TRIGGER_USER_ACTION
-from Expression import StateChangeInfo
-from Expression import createExprContext
-from events import BeforeTransitionEvent, AfterTransitionEvent
def checkId(id):
res = bad_id(id)
@@ -68,7 +65,6 @@
'''
implements(IDCWorkflowDefinition, IWorkflowDefinition)
- __implements__ = z2IWorkflowDefinition
title = 'DC Workflow Definition'
_isAWorkflow = 1
@@ -471,7 +467,7 @@
msg = _(u'Destination state undefined: ${state_id}',
mapping={'state_id': new_state})
raise WorkflowException(msg)
-
+
# Fire "before" event
notify(BeforeTransitionEvent(ob, self, old_sdef, new_sdef, tdef, former_status, kwargs))
Modified: CMF/trunk/DCWorkflow/tests/test_DCWorkflow.py
===================================================================
--- CMF/trunk/DCWorkflow/tests/test_DCWorkflow.py 2007-03-16 08:41:43 UTC (rev 73214)
+++ CMF/trunk/DCWorkflow/tests/test_DCWorkflow.py 2007-03-16 08:55:04 UTC (rev 73215)
@@ -20,14 +20,15 @@
from zope.component import adapter
from zope.component import provideHandler
+from zope.interface.verify import verifyClass
from Products.CMFCore.testing import TraversingEventZCMLLayer
from Products.CMFCore.tests.base.dummy import DummyContent
from Products.CMFCore.tests.base.dummy import DummySite
from Products.CMFCore.tests.base.dummy import DummyTool
from Products.CMFCore.WorkflowTool import WorkflowTool
-from Products.DCWorkflow.interfaces import IBeforeTransitionEvent
from Products.DCWorkflow.interfaces import IAfterTransitionEvent
+from Products.DCWorkflow.interfaces import IBeforeTransitionEvent
class DCWorkflowDefinitionTests(unittest.TestCase):
@@ -40,16 +41,7 @@
self.site._setObject( 'portal_workflow', WorkflowTool() )
self._constructDummyWorkflow()
- def test_z2interfaces(self):
- from Interface.Verify import verifyClass
- from Products.CMFCore.interfaces.portal_workflow \
- import WorkflowDefinition as IWorkflowDefinition
- from Products.DCWorkflow.DCWorkflow import DCWorkflowDefinition
-
- verifyClass(IWorkflowDefinition, DCWorkflowDefinition)
-
- def test_z3interfaces(self):
- from zope.interface.verify import verifyClass
+ def test_interfaces(self):
from Products.CMFCore.interfaces import IWorkflowDefinition
from Products.DCWorkflow.DCWorkflow import DCWorkflowDefinition
@@ -100,28 +92,28 @@
# XXX more
def test_events(self):
-
+
events = []
-
+
@adapter(IBeforeTransitionEvent)
def _handleBefore(event):
events.append(event)
provideHandler(_handleBefore)
-
+
@adapter(IAfterTransitionEvent)
def _handleAfter(event):
events.append(event)
provideHandler(_handleAfter)
-
+
wftool = self.site.portal_workflow
wf = self._getDummyWorkflow()
dummy = self.site._setObject( 'dummy', DummyContent() )
wftool.notifyCreated(dummy)
wf.doActionFor(dummy, 'publish', comment='foo', test='bar')
-
+
self.assertEquals(4, len(events))
-
+
evt = events[0]
self.failUnless(IBeforeTransitionEvent.providedBy(evt))
self.assertEquals(dummy, evt.object)
@@ -130,7 +122,7 @@
self.assertEquals(None, evt.transition)
self.assertEquals({}, evt.status)
self.assertEquals(None, evt.kwargs)
-
+
evt = events[1]
self.failUnless(IAfterTransitionEvent.providedBy(evt))
self.assertEquals(dummy, evt.object)
@@ -139,7 +131,7 @@
self.assertEquals(None, evt.transition)
self.assertEquals({}, evt.status)
self.assertEquals(None, evt.kwargs)
-
+
evt = events[2]
self.failUnless(IBeforeTransitionEvent.providedBy(evt))
self.assertEquals(dummy, evt.object)
@@ -148,7 +140,7 @@
self.assertEquals('publish', evt.transition.id)
self.assertEquals({'state': 'private', 'comments': ''}, evt.status)
self.assertEquals({'test' : 'bar', 'comment' : 'foo'}, evt.kwargs)
-
+
evt = events[3]
self.failUnless(IAfterTransitionEvent.providedBy(evt))
self.assertEquals(dummy, evt.object)
More information about the CMF-checkins
mailing list