[Testbot] Plone 4.3 - Python 2.7 - Build # 2570 - Still failing! - 5 failure(s)

jenkins at plone.org jenkins at plone.org
Mon Sep 22 17:34:17 UTC 2014


-------------------------------------------------------------------------------
Plone 4.3 - Python 2.7 - Build # 2570 - Still Failing!
-------------------------------------------------------------------------------

http://jenkins.plone.org/job/plone-4.3-python-2.7/2570/


-------------------------------------------------------------------------------
CHANGES
-------------------------------------------------------------------------------

Repository: plone.dexterity
Branch: refs/heads/master
Date: 2014-09-22T18:33:22+02:00
Author: Jens W. Klein (jensens) <jk at kleinundpartner.at>
Commit: https://github.com/plone/plone.dexterity/commit/45f0c1b372f31fadcc76a2a1a78d7ac922edf727

use of implementer/adapter decorators instead of old implements/adapts in-class declaration

Files changed:
M plone/dexterity/behavior.py
M plone/dexterity/content.py
M plone/dexterity/events.py
M plone/dexterity/exportimport.py
M plone/dexterity/factory.py
M plone/dexterity/filerepresentation.py
M plone/dexterity/fti.py
M plone/dexterity/primary.py

diff --git a/plone/dexterity/behavior.py b/plone/dexterity/behavior.py
index 50c2e9e..07cf843 100644
--- a/plone/dexterity/behavior.py
+++ b/plone/dexterity/behavior.py
@@ -3,17 +3,18 @@
 from plone.behavior.interfaces import IBehaviorAssignable
 from plone.dexterity.interfaces import IDexterityContent
 from plone.dexterity.interfaces import IDexterityFTI
-from zope.component import adapts, getUtility, queryUtility
-from zope.interface import implements
+from zope.component import adapter
+from zope.component import getUtility
+from zope.component import queryUtility
+from zope.interface import implementer
 
 
+ at implementer(IBehaviorAssignable)
+ at adapter(IDexterityContent)
 class DexterityBehaviorAssignable(object):
     """Support plone.behavior behaviors stored in the FTI
     """
 
-    implements(IBehaviorAssignable)
-    adapts(IDexterityContent)
-
     def __init__(self, context):
         self.fti = getUtility(IDexterityFTI, name=context.portal_type)
 
diff --git a/plone/dexterity/content.py b/plone/dexterity/content.py
index a9e046d..2dcede4 100644
--- a/plone/dexterity/content.py
+++ b/plone/dexterity/content.py
@@ -36,7 +36,7 @@
 from zope.annotation import IAttributeAnnotatable
 from zope.component import queryUtility
 from zope.container.contained import Contained
-from zope.interface import implements
+from zope.interface import implementer
 from zope.interface.declarations import Implements
 from zope.interface.declarations import ObjectSpecificationDescriptor
 from zope.interface.declarations import getObjectSpecification
@@ -204,13 +204,18 @@ def _verifyObjectPaste(self, obj, validate_src=True):
                     )
 
 
+ at implementer(
+    IDexterityContent,
+    IAttributeAnnotatable,
+    IAttributeUUID,
+    IDublinCore,
+    ICatalogableDublinCore,
+    IMutableDublinCore
+)
 class DexterityContent(DAVResourceMixin, PortalContent, PropertyManager,
                        Contained):
     """Base class for Dexterity content
     """
-    implements(
-        IDexterityContent, IAttributeAnnotatable, IAttributeUUID,
-        IDublinCore, ICatalogableDublinCore, IMutableDublinCore)
 
     __providedBy__ = FTIAwareSpecification()
     __allow_access_to_unprotected_subobjects__ = AttributeValidator()
@@ -579,11 +584,11 @@ def setRights(self, rights):
         self.rights = safe_unicode(rights)
 
 
+ at implementer(IDexterityItem)
 class Item(PasteBehaviourMixin, BrowserDefaultMixin, DexterityContent):
     """A non-containerish, CMFish item
     """
 
-    implements(IDexterityItem)
     __providedBy__ = FTIAwareSpecification()
     __allow_access_to_unprotected_subobjects__ = AttributeValidator()
 
@@ -598,13 +603,13 @@ class Item(PasteBehaviourMixin, BrowserDefaultMixin, DexterityContent):
     __getattr__ = DexterityContent.__getattr__
 
 
+ at implementer(IDexterityContainer)
 class Container(
         PasteBehaviourMixin, DAVCollectionMixin, BrowserDefaultMixin,
         CMFCatalogAware, CMFOrderedBTreeFolderBase, DexterityContent):
     """Base class for folderish items
     """
 
-    implements(IDexterityContainer)
     __providedBy__ = FTIAwareSpecification()
     __allow_access_to_unprotected_subobjects__ = AttributeValidator()
 
diff --git a/plone/dexterity/events.py b/plone/dexterity/events.py
index 11f1ca7..cd4ed99 100644
--- a/plone/dexterity/events.py
+++ b/plone/dexterity/events.py
@@ -1,37 +1,36 @@
-from zope.component.interfaces import ObjectEvent
-from zope.interface import implements
-
 from plone.dexterity import interfaces
+from zope.component.interfaces import ObjectEvent
+from zope.interface import implementer
 
 
+ at implementer(interfaces.IEditBegunEvent)
 class EditBegunEvent(ObjectEvent):
     """An edit operation was begun
     """
-    implements(interfaces.IEditBegunEvent)
 
 
+ at implementer(interfaces.IAddBegunEvent)
 class AddBegunEvent(ObjectEvent):
     """An add operation was begun. The event context is the folder,
     since the object does not exist yet.
     """
-    implements(interfaces.IAddBegunEvent)
 
 
+ at implementer(interfaces.IEditCancelledEvent)
 class EditCancelledEvent(ObjectEvent):
     """An edit operation was cancelled
     """
-    implements(interfaces.IEditCancelledEvent)
 
 
+ at implementer(interfaces.IAddCancelledEvent)
 class AddCancelledEvent(ObjectEvent):
     """An add operation was cancelled. The event context is the folder,
     since the object does not exist yet.
     """
-    implements(interfaces.IAddCancelledEvent)
 
 
+ at implementer(interfaces.IEditFinishedEvent)
 class EditFinishedEvent(ObjectEvent):
     """Edit was finished and contents are saved. This event is fired
     even when no changes happen (and no modified event is fired.)
     """
-    implements(interfaces.IEditFinishedEvent)
diff --git a/plone/dexterity/exportimport.py b/plone/dexterity/exportimport.py
index 7540067..c9cb324 100644
--- a/plone/dexterity/exportimport.py
+++ b/plone/dexterity/exportimport.py
@@ -11,9 +11,10 @@
 from csv import reader
 from csv import writer
 from zope.component import queryAdapter
-from zope.interface import implements
+from zope.interface import implementer
 
 
+ at implementer(IFilesystemExporter, IFilesystemImporter)
 class DexterityContentExporterImporter(FolderishExporterImporter):
     """ Tree-walking exporter / importer for Dexterity types.
 
@@ -35,8 +36,6 @@ class DexterityContentExporterImporter(FolderishExporterImporter):
     subdirectories within the parent's directory.
     """
 
-    implements(IFilesystemExporter, IFilesystemImporter)
-
     def __init__(self, context):
         self.context = context
 
diff --git a/plone/dexterity/factory.py b/plone/dexterity/factory.py
index cacc15d..c77da26 100644
--- a/plone/dexterity/factory.py
+++ b/plone/dexterity/factory.py
@@ -5,16 +5,15 @@
 from plone.dexterity.utils import resolveDottedName
 from zope.component import getUtility
 from zope.component.factory import Factory
-from zope.interface import implements
+from zope.interface import implementer
 from zope.interface.declarations import Implements
 
 
+ at implementer(IDexterityFactory)
 class DexterityFactory(Persistent, Factory):
     """A factory for Dexterity content.
     """
 
-    implements(IDexterityFactory)
-
     def __init__(self, portal_type):
         self.portal_type = portal_type
 
diff --git a/plone/dexterity/filerepresentation.py b/plone/dexterity/filerepresentation.py
index cfa1d49..4b41b02 100644
--- a/plone/dexterity/filerepresentation.py
+++ b/plone/dexterity/filerepresentation.py
@@ -16,14 +16,14 @@
 from webdav.Resource import Resource
 from zExceptions import MethodNotAllowed
 from zExceptions import Unauthorized
-from zope.component import adapts
+from zope.component import adapter
 from zope.component import createObject
 from zope.event import notify
 from zope.filerepresentation.interfaces import IDirectoryFactory
 from zope.filerepresentation.interfaces import IFileFactory
 from zope.filerepresentation.interfaces import IRawReadFile
 from zope.filerepresentation.interfaces import IRawWriteFile
-from zope.interface import implements
+from zope.interface import implementer
 from zope.interface.interfaces import IInterface
 from zope.lifecycleevent import modified, ObjectCreatedEvent
 from zope.schema import getFieldsInOrder
@@ -356,10 +356,10 @@ def listDAVObjects(self):
         return []
 
 
+ at implementer(IStreamIterator)
 class StringStreamIterator(object):
     """Simple stream iterator to allow efficient data streaming.
     """
-    implements(IStreamIterator)
 
     def __init__(self, data, size=None, chunk=1 << 16):
         """Consume data (a str) into a temporary file and prepare streaming.
@@ -397,6 +397,8 @@ def __len__(self):
         return self.size
 
 
+ at implementer(IDirectoryFactory)
+ at adapter(IDexterityContainer)
 class DefaultDirectoryFactory(object):
     """Default directory factory, invoked when an FTP/WebDAV operation
     attempts to create a new folder via a MKCOL request.
@@ -404,9 +406,6 @@ class DefaultDirectoryFactory(object):
     The default implementation simply calls manage_addFolder().
     """
 
-    implements(IDirectoryFactory)
-    adapts(IDexterityContainer)
-
     def __init__(self, context):
         self.context = context
 
@@ -414,6 +413,8 @@ def __call__(self, name):
         self.context.manage_addFolder(name)
 
 
+ at implementer(IFileFactory)
+ at adapter(IDexterityContainer)
 class DefaultFileFactory(object):
     """Default file factory, invoked when an FTP/WebDAV operation
     attempts to create a new resource via a PUT request.
@@ -423,9 +424,6 @@ class DefaultFileFactory(object):
     tool.
     """
 
-    implements(IFileFactory)
-    adapts(IDexterityContainer)
-
     def __init__(self, context):
         self.context = context
 
@@ -497,6 +495,7 @@ def __call__(self, name, contentType, data):
         return obj
 
 
+ at implementer(IRawReadFile)
 class ReadFileBase(object):
     """Convenience base class for read files which delegate to another stream
     type (e.g. a temporary file or StringIO)
@@ -504,8 +503,6 @@ class ReadFileBase(object):
     Override _getStream() and any required methods.
     """
 
-    implements(IRawReadFile)
-
     def __init__(self, context):
         self.context = context
         self._size = 0
@@ -566,6 +563,8 @@ def _getStream(self):
         raise NotImplementedError("Subclass and override this _getStream()")
 
 
+ at implementer(IStreamIterator)
+ at adapter(IDexterityContent)
 class DefaultReadFile(ReadFileBase):
     """IRawReadFile adapter for Dexterity objects.
 
@@ -576,9 +575,6 @@ class DefaultReadFile(ReadFileBase):
     will return an accurate file size.
     """
 
-    implements(IStreamIterator)
-    adapts(IDexterityContent)
-
     def __init__(self, context):
         self.context = context
         self._haveMessage = False
@@ -646,6 +642,7 @@ def _getStream(self):
         return out
 
 
+ at implementer(IRawWriteFile)
 class WriteFileBase(object):
     """Convenience base class for write files which delegate to another
     stream, e.g. a file or StringIO.
@@ -653,8 +650,6 @@ class WriteFileBase(object):
     Implement _getStream() and override any methods required.
     """
 
-    implements(IRawWriteFile)
-
     def __init__(self, context):
         self.context = context
 
@@ -708,15 +703,14 @@ def _getStream(self):
         raise NotImplementedError("Subclass and override this _getStream()")
 
 
+ at implementer(IRawWriteFile)
+ at adapter(IDexterityContent)
 class DefaultWriteFile(object):
     """IRawWriteFile file adapter for Dexterity objects.
 
     Uses RFC822 marshaler.
     """
 
-    implements(IRawWriteFile)
-    adapts(IDexterityContent)
-
     def __init__(self, context):
         self.context = context
 
diff --git a/plone/dexterity/fti.py b/plone/dexterity/fti.py
index bbba19e..89d7f56 100644
--- a/plone/dexterity/fti.py
+++ b/plone/dexterity/fti.py
@@ -17,7 +17,7 @@
 from zope.component.interfaces import IFactory
 from zope.event import notify
 from zope.i18nmessageid import Message
-from zope.interface import implements
+from zope.interface import implementer
 from zope.lifecycleevent import modified
 from zope.security.interfaces import IPermission
 from zope.site.hooks import getSiteManager
@@ -26,20 +26,19 @@
 import plone.dexterity.schema
 
 
+ at implementer(IDexterityFTIModificationDescription)
 class DexterityFTIModificationDescription(object):
-    implements(IDexterityFTIModificationDescription)
 
     def __init__(self, attribute, oldValue):
         self.attribute = attribute
         self.oldValue = oldValue
 
 
+ at implementer(IDexterityFTI)
 class DexterityFTI(base.DynamicViewTypeInformation):
     """A Dexterity FTI
     """
 
-    implements(IDexterityFTI)
-
     meta_type = "Dexterity FTI"
 
     _properties = base.DynamicViewTypeInformation._properties + (
@@ -446,7 +445,8 @@ def unregister_factory(factory_name, site_manager):
 
     # If a factory with a matching name exists, remove it
     if [f for f in utilities
-        if (f.provided, f.name, f.info) == (IFactory, factory_name, 'plone.dexterity.dynamic')]:
+        if (f.provided, f.name, f.info)
+            == (IFactory, factory_name, 'plone.dexterity.dynamic')]:
         site_manager.unregisterUtility(provided=IFactory, name=factory_name)
 
 
diff --git a/plone/dexterity/primary.py b/plone/dexterity/primary.py
index dbb1da3..fb58ccc 100644
--- a/plone/dexterity/primary.py
+++ b/plone/dexterity/primary.py
@@ -3,14 +3,14 @@
 from plone.dexterity.utils import iterSchemata
 from plone.rfc822.interfaces import IPrimaryField
 from plone.rfc822.interfaces import IPrimaryFieldInfo
-from zope.component import adapts
-from zope.interface import implements
+from zope.component import adapter
+from zope.interface import implementer
 from zope.schema import getFieldsInOrder
 
 
+ at implementer(IPrimaryFieldInfo)
+ at adapter(IDexterityContent)
 class PrimaryFieldInfo(object):
-    implements(IPrimaryFieldInfo)
-    adapts(IDexterityContent)
 
     def __init__(self, context):
         self.context = context




-------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CHANGES.log
Type: application/octet-stream
Size: 13614 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140922/bc456c3f/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 87189 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140922/bc456c3f/attachment-0003.obj>


More information about the Testbot mailing list