[Testbot] Plone 5.0 - Python 2.7 - Build # 3110 - Still failing! - 0 failure(s)

jenkins at plone.org jenkins at plone.org
Mon Aug 25 23:52:01 UTC 2014


-------------------------------------------------------------------------------
Plone 5.0 - Python 2.7 - Build # 3110 - Still Failing!
-------------------------------------------------------------------------------

http://jenkins.plone.org/job/plone-5.0-python-2.7/3110/


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

Repository: plone.portlets
Branch: refs/heads/master
Date: 2014-08-26T00:26:04+02:00
Author: Gil Forcada (gforcada) <gforcada at gnome.org>
Commit: https://github.com/plone/plone.portlets/commit/4e4806c3f52fc27828507a4b08d33aad587a6e31

Whitespaces cleanup

Files changed:
M plone/portlets/CREDITS.txt
M plone/portlets/README.txt
M plone/portlets/TODO.txt
M plone/portlets/configure.zcml
M plone/portlets/retriever.py
M plone/portlets/settings.py
M plone/portlets/uisupport.txt
M plone/portlets/utils.txt

diff --git a/plone/portlets/CREDITS.txt b/plone/portlets/CREDITS.txt
index 07d4779..5bcebe8 100644
--- a/plone/portlets/CREDITS.txt
+++ b/plone/portlets/CREDITS.txt
@@ -8,9 +8,9 @@ Development of plone.portlets and plone.app.portlets was generously sponsored by
 
  - Martin Aspeli <optilude at gmx.net>
     plone.portlets implementation
-    
+
  - Philipp von Weitershausen
     zope 3 life line and design guru
-    
+
  - Geir Baekholt
     original design, use case support and sanity checking
diff --git a/plone/portlets/README.txt b/plone/portlets/README.txt
index 8f532a1..c3296f1 100644
--- a/plone/portlets/README.txt
+++ b/plone/portlets/README.txt
@@ -3,38 +3,38 @@ Plone Portlets Engine
 =====================
 
 This package contains the basic interfaces and generalisable code for managing
-dynamic portlets. Portlets are content providers (see ``zope.contentprovider``) 
-which are assigned to columns or other areas (represented by portlet managers). 
+dynamic portlets. Portlets are content providers (see ``zope.contentprovider``)
+which are assigned to columns or other areas (represented by portlet managers).
 
 The portlets infrastructure is similar to ``zope.viewlet``, but differs in that
 lit is dynamic. Rather than register viewlets that "plug into" a viewlet manager
-in ZCML, ``plone.portlets`` contains the basis for portlets that are assigned - 
+in ZCML, ``plone.portlets`` contains the basis for portlets that are assigned -
 persistently, at run time - to e.g. locations, content types, users or groups.
 
 The remainder of this file will explain the API and components in detail, but
 in general, the package is intended to be used as follows:
 
 - The application layer registers a generic adapter to IPortletContext. Any
-context where portlets may be assigned or displayed needs to be adaptable to 
+context where portlets may be assigned or displayed needs to be adaptable to
 this interface. It will inform the portlets infrastructure about things like
 the parent of the current object (if any), and values for various categories
 of portlets, such as the current user id for user portlets or a list of group
 ids for group portlets.
 
-- Any number of PortletManagers are stored persistently as local utilities. 
-A PortletManager is a storage for site-wide portal assignments (e.g. user, 
-group, content type). Contextual (location-specific) assignments are stored in 
+- Any number of PortletManagers are stored persistently as local utilities.
+A PortletManager is a storage for site-wide portal assignments (e.g. user,
+group, content type). Contextual (location-specific) assignments are stored in
 annotations, on objects providing the ILocalPortletAssignable marker.
 
-For example, there may be one portlet manager for the "left column" and one 
+For example, there may be one portlet manager for the "left column" and one
 portlet manager for the "right column".
 
 - When a PortletManager is registered as a local utility, an appropriate adapter
 will also be registered (via an event handler) to support the 'provider:' TAL
 expression. Thus, if the portlet manager is registered as a utility with name
-'plone.leftcolumn'. Then, any template in that site would be able to write e.g. 
-tal:replace="structure provider:plone.leftcolumn" to see the context-dependent 
-rendering of that particular portlet manager. 
+'plone.leftcolumn'. Then, any template in that site would be able to write e.g.
+tal:replace="structure provider:plone.leftcolumn" to see the context-dependent
+rendering of that particular portlet manager.
 
 The rendering logic is found in an IPortletManagerRenderer, whilst the logic
 of composing portlet registrations into a list of portlets to render, in a
@@ -43,28 +43,28 @@ particular order, is up to an IPortletRetriever.
 Actual portlets are described by three interfaces, which may be kept separate or
 implemented in the same component, depending on the use case.
 
-- IPortletDataProvider is a marker interface for objects that provide 
+- IPortletDataProvider is a marker interface for objects that provide
 configuration information for how a portlet should be rendered. This may be
 an existing content object, or something specific to a portlet.
 
-- A special type of content provider, IPortletRenderer, knows how to render each 
-type of portlet. The IPortletRenderer should be a multi-adapter from 
+- A special type of content provider, IPortletRenderer, knows how to render each
+type of portlet. The IPortletRenderer should be a multi-adapter from
 (context, request, view, portlet manager, data provider).
 
 - An IPortletAssignment is a persistent object that can be instantiated and
-is stored by an IPortletManager or annotation on an ILocalPortletAssignable. 
+is stored by an IPortletManager or annotation on an ILocalPortletAssignable.
 The assignment is able to return an IPortletDataProvider to render.
 
 Typically, you will either have a specific IPortletAssignment for a specific
 IPortletDataProvider, or a generic IPortletAssignment for different types of
-data providers. You will also typically have a generalisable IPortletRenderer 
+data providers. You will also typically have a generalisable IPortletRenderer
 for each type of data provider.
 
-The examples below demonstrate a "specific-specific" portlet in the form of a 
-login portlet - here, the same object provides both the assignment and the data 
-provider aspect - and a "generic-generic" portlet, where a generic 
-IPortletAssignment knows how to reference a content object, with different 
-content objects potentially having different types of IPortletRenderers for 
+The examples below demonstrate a "specific-specific" portlet in the form of a
+login portlet - here, the same object provides both the assignment and the data
+provider aspect - and a "generic-generic" portlet, where a generic
+IPortletAssignment knows how to reference a content object, with different
+content objects potentially having different types of IPortletRenderers for
 rendering.
 
 The portlet context
@@ -74,44 +74,44 @@ We will create a test environment first, consisting of content objects (folders
 and documents) that have a unique id managed by a global UID registry. For
 the purposes of testing, we simply use the python id() for this, though this
 is obviously not a realistic implementation (since it is non-persistent and
-instance-specific). The environment also represents the current user and 
+instance-specific). The environment also represents the current user and
 that user's groups.
 
   >>> from zope.interface import implements, Interface, directlyProvides
   >>> from zope.component import adapts, provideAdapter
-  
+
   >>> from zope import schema
-  
+
   >>> from zope.container.interfaces import IContained
   >>> from zope.site.interfaces import IFolder
   >>> from zope.site.folder import rootFolder, Folder
-  
+
   >>> IFolder._content_iface = True
-  
+
   >>> __uids__ = {}
-  
+
   >>> class ITestUser(Interface):
   ...     id = schema.TextLine(title=u'User id')
   ...     groups = schema.Iterable(title=u'Groups of this user')
-  
+
   >>> class ITestGroup(Interface):
   ...     id = schema.TextLine(title=u'Group id')
-  
+
   >>> class TestUser(object):
   ...     implements(ITestUser)
   ...     def __init__(self, id, groups):
   ...         self.id = id
   ...         self.groups = groups
-  
+
   >>> class TestGroup(object):
   ...     implements(ITestGroup)
   ...     def __init__(self, id):
   ...         self.id = id
-  
+
   >>> Anonymous = TestUser('(Anonymous)', ())
   >>> user1 = TestUser('user1', (TestGroup('group1'), TestGroup('group2'),))
   >>> __current_user__ = user1
-  
+
 Now we can provide an IPortletContext for this environment. This allows the
 portlets infrastructure to determine the parent of the current object (or at
 least, the parent for portlet composition purposes). It also returns a list of
@@ -124,7 +124,7 @@ the IPortletRetriever which categories it should consider, and which keys (e.g.
 user id, group id, content type name) to use to find the portlets that should be
 shown in each category.
 
-This retrieval of portlets from categories can either happen in "placeful" or 
+This retrieval of portlets from categories can either happen in "placeful" or
 "placeless mode", the difference being that placeful retrievals depend on the
 specific context, whereas placeless retrievals do not. In this case, the
 content-type category is placeless.
@@ -136,7 +136,7 @@ the order in which portlets are rendered.
   >>> from plone.portlets.constants import USER_CATEGORY
   >>> from plone.portlets.constants import GROUP_CATEGORY
   >>> from plone.portlets.constants import CONTENT_TYPE_CATEGORY
-  
+
   >>> class TestPortletContext(object):
   ...     implements(IPortletContext)
   ...     adapts(Interface)
@@ -161,17 +161,17 @@ the order in which portlets are rendered.
   ...         cats.append((USER_CATEGORY, __current_user__.id,))
   ...         cats.extend([(GROUP_CATEGORY, i.id,) for i in __current_user__.groups])
   ...         return cats
-  
+
   >>> provideAdapter(TestPortletContext)
-  
-We create the root of a sample content hierarchy as well, to be used later. We 
-register new objects with our contrived UID registry, so that the generic 
+
+We create the root of a sample content hierarchy as well, to be used later. We
+register new objects with our contrived UID registry, so that the generic
 portlet context will work for all of them.
-  
+
   >>> class ITestDocument(IContained):
   ...     text = schema.TextLine(title=u"Text to render")
   >>> ITestDocument._content_iface = True
-  
+
   >>> class TestDocument(object):
   ...     implements(ITestDocument)
   ...
@@ -179,28 +179,28 @@ portlet context will work for all of them.
   ...         self.__name__ = None
   ...         self.__parent__ = None
   ...         self.text = text
-  
+
   >>> rootFolder =  rootFolder()
   >>> __uids__[id(rootFolder)] = rootFolder
-  
-We then turn our root folder into a site, so that we can make local 
+
+We then turn our root folder into a site, so that we can make local
 registrations on it.
 
   >>> from zope.location.interfaces import ISite
   >>> from zope.component.persistentregistry import PersistentComponents
   >>> from zope.component.globalregistry import base as siteManagerBase
   >>> from zope.component import getSiteManager
-  
+
   >>> sm = PersistentComponents()
   >>> sm.__bases__ = (siteManagerBase,)
   >>> rootFolder.setSiteManager(sm)
   >>> ISite.providedBy(rootFolder)
   True
-  
+
   >>> from zope.site.hooks import setSite, setHooks
   >>> setSite(rootFolder)
   >>> setHooks()
-  
+
 Registering portlet managers
 ----------------------------
 
@@ -211,9 +211,9 @@ expression to work.
 
   >>> from plone.portlets.interfaces import IPortletManager
   >>> from plone.portlets.manager import PortletManager
-  
+
   >>> sm = getSiteManager(rootFolder)
-  
+
   >>> sm.registerUtility(component=PortletManager(),
   ...                    provided=IPortletManager,
   ...                    name='columns.left')
@@ -221,7 +221,7 @@ expression to work.
   ...                    provided=IPortletManager,
   ...                    name='columns.right')
 
-  
+
 We should now be able to get this via a provider: expression:
 
   >>> import os, tempfile
@@ -239,7 +239,7 @@ We should now be able to get this via a provider: expression:
   ...   </body>
   ... </html>
   ... """)
-  
+
 We register the template as a view for all objects.
 
   >>> from zope.publisher.interfaces.browser import IBrowserPage
@@ -277,32 +277,32 @@ For our memoised views to work, we need to make the request annotatable
       </div>
     </body>
   </html>
-  
+
 In fact, the renderer could've told us so:
 
   >>> from zope.publisher.interfaces.browser import IBrowserView
   >>> renderer = getMultiAdapter((doc1, TestRequest(), view), name='columns.left')
   >>> renderer.visible
   False
-  
+
 Creating portlets
 -----------------
 
 Portlets consist of a data provider (if necessary), a persistent assignment
 object (that "instantiates" the portlet in a given portlet manager), and a
-renderer. 
+renderer.
 
 Recall from the beginning of this document that the relationship
 between data providers and assignments are typically "specific-specific" or
-"general-general". We will create a login box portlet as an example of a 
+"general-general". We will create a login box portlet as an example of a
 "specific-specific" portlet (where the assignment type is specific to the
-portlet) and a portlet for showing the text of a TestDocument as defined above 
-as an example of a "generic-generic" portlet (where the assignment type is 
+portlet) and a portlet for showing the text of a TestDocument as defined above
+as an example of a "generic-generic" portlet (where the assignment type is
 generic for any content object in this test environment). Renderers are always
 specific, of course - the way in which you render a document will be different
 from the way you render an image.
 
-Let's begin with the login portlet. Here, we keep the data provider and 
+Let's begin with the login portlet. Here, we keep the data provider and
 assignment aspects in the same object, since there is no need to reference an
 external object.
 
@@ -312,7 +312,7 @@ external object.
   >>> from plone.portlets.interfaces import IPortletManager
   >>> from persistent import Persistent
   >>> from zope.container.contained import Contained
-  
+
   >>> class ILoginPortlet(IPortletDataProvider):
   ...   pass
 
@@ -326,12 +326,12 @@ external object.
   ...     @property
   ...     def data(self):
   ...         return self
-  
+
   >>> class LoginPortletRenderer(object):
   ...     implements(IPortletRenderer)
-  ...     adapts(Interface, IBrowserRequest, IBrowserView, 
+  ...     adapts(Interface, IBrowserRequest, IBrowserView,
   ...             IPortletManager, ILoginPortlet)
-  ... 
+  ...
   ...     def __init__(self, context, request, view, manager, data):
   ...         self.data = data
   ...         self.available = True
@@ -342,11 +342,11 @@ external object.
   ...     def render(self, *args, **kwargs):
   ...         return r'<form action="/login">(test)</form>'
   >>> provideAdapter(LoginPortletRenderer)
-  
+
 Note that in a real-world application, it may be necessary to add security
 assertions to the LoginPortletAssignment class.
-  
-For the document-text portlet, we separate the data provider from the 
+
+For the document-text portlet, we separate the data provider from the
 assignment object. We don't even use IPortletDataProvider in this case,
 as the ITestContent interface is already available.
 
@@ -355,7 +355,7 @@ that the portlet context also relies upon.
 
   >>> class UIDPortletAssignment(Persistent, Contained):
   ...     implements(IPortletAssignment)
-  ...     
+  ...
   ...     def __init__(self, obj):
   ...         self.uid = id(obj)
   ...
@@ -366,12 +366,12 @@ that the portlet context also relies upon.
   ...     @property
   ...     def data(self):
   ...          return __uids__[self.uid]
-  
+
   >>> class DocumentPortletRenderer(object):
   ...     implements(IPortletRenderer)
-  ...     adapts(Interface, IBrowserRequest, IBrowserView, 
+  ...     adapts(Interface, IBrowserRequest, IBrowserView,
   ...             IPortletManager, ITestDocument)
-  ... 
+  ...
   ...     def __init__(self, context, request, view, manager, data):
   ...         self.data = data
   ...         self.available = True
@@ -387,15 +387,15 @@ Assigning portlets to contexts
 ------------------------------
 
 We can now assign portlets to different portlet managers (columns) in different
-contexts, and they will be rendered in the view that references them, as defined 
-above. Portlets can also be assigned to site-wide categories such as 
+contexts, and they will be rendered in the view that references them, as defined
+above. Portlets can also be assigned to site-wide categories such as
 content-type, user, or group. We will see examples of those types of assignments
 later.
 
 Let's assign some portlets in the context of the root folder. Assignment is
 done by adapting an ILocalPortletAssignable and the IPortletManager representing
-a column to IPortletAssignmentMapping. ILocalPortletAssignable in turn is a 
-marker interface that informs us that we can annotate the content object with 
+a column to IPortletAssignmentMapping. ILocalPortletAssignable in turn is a
+marker interface that informs us that we can annotate the content object with
 the portlet assignments.
 
 First, we get the portlet managers for the left and right columns.
@@ -403,19 +403,19 @@ First, we get the portlet managers for the left and right columns.
   >>> from zope.component import getUtility
   >>> left = getUtility(IPortletManager, name='columns.left')
   >>> right = getUtility(IPortletManager, name='columns.right')
-  
-Then, let's mark Folder and TestDocument as being able to have local portlet 
+
+Then, let's mark Folder and TestDocument as being able to have local portlet
 assignments.
 
   >>> from plone.portlets.interfaces import ILocalPortletAssignable
   >>> from zope.interface import classImplements
   >>> classImplements(TestDocument, ILocalPortletAssignable)
   >>> classImplements(Folder, ILocalPortletAssignable)
-  
+
   >>> from plone.portlets.interfaces import IPortletAssignmentMapping
   >>> lpa = LoginPortletAssignment()
   >>> leftAtRoot = getMultiAdapter((rootFolder, left), IPortletAssignmentMapping)
-  
+
 The IPortletAssignmentMapping is a container. In fact, we probably don't have
 a meaningful name for a portlet assignment instance (and we don't much care,
 so long as it is unique), so it provides the IContainerNamesContainer marker.
@@ -427,7 +427,7 @@ for convenience.
   >>> def saveAssignment(mapping, assignment):
   ...     chooser = INameChooser(mapping)
   ...     mapping[chooser.chooseName('', assignment)] = assignment
-  
+
   >>> saveAssignment(leftAtRoot, lpa)
   >>> lpa.__name__ in leftAtRoot
   True
@@ -435,21 +435,21 @@ for convenience.
 Let's assign some more portlets. This time we will use a UID assignment to
 reference two documents that will be rendered with an appropriate document
 portlet renderer.
-  
+
   >>> doc1 = TestDocument(u'Test document one')
   >>> __uids__[id(doc1)] = doc1
   >>> rootFolder['doc1'] = doc1
   >>> dpa1 = UIDPortletAssignment(doc1)
-  
+
   >>> doc2 = TestDocument(u'Test document two')
   >>> __uids__[id(doc2)] = doc2
   >>> rootFolder['doc2'] = doc2
   >>> dpa2 = UIDPortletAssignment(doc2)
-  
+
   >>> rightAtRoot = getMultiAdapter((rootFolder, right), IPortletAssignmentMapping)
   >>> saveAssignment(rightAtRoot, dpa2)
   >>> saveAssignment(rightAtRoot, dpa1)
-  
+
 We can also re-order assignments:
 
   >>> rightKeys = list(rightAtRoot.keys())
@@ -474,7 +474,7 @@ If we now render the view, we should see our newly assigned portlets.
       </div>
     </body>
   </html>
-  
+
 Notice that the login portlet did not get rendered, since its 'available'
 property was false (the current user is not the anonymous user). Let's
 "log out" and verify that it show up.
@@ -493,26 +493,26 @@ property was false (the current user is not the anonymous user). Let's
       </div>
     </body>
   </html>
-  
+
 For the remainder of these tests, we will use a dummy portlet to make test
 writing a bit easier:
 
   >>> class IDummyPortlet(IPortletDataProvider):
   ...   text = schema.TextLine(title=u'Text to render')
-  
+
   >>> class DummyPortlet(Persistent, Contained):
   ...     implements(IPortletAssignment, IDummyPortlet)
-  ...     
+  ...
   ...     def __init__(self, text, available=True):
   ...         self.text = text
   ...         self.available = available
   ...     data = property(lambda self: self)
-  
+
   >>> class DummyPortletRenderer(object):
   ...     implements(IPortletRenderer)
-  ...     adapts(Interface, IBrowserRequest, IBrowserView, 
+  ...     adapts(Interface, IBrowserRequest, IBrowserView,
   ...             IPortletManager, IDummyPortlet)
-  ... 
+  ...
   ...     def __init__(self, context, request, view, manager, data):
   ...         self.data = data
   ...         self.available = True
@@ -523,17 +523,17 @@ writing a bit easier:
   ...     def render(self, *args, **kwargs):
   ...         return r'<div>%s</div>' % (self.data.text,)
   >>> provideAdapter(DummyPortletRenderer)
-  
+
 Let's assign a portlet in a sub-folder of the root folder.
 
   >>> child1 = Folder()
   >>> rootFolder['child1'] = child1
   >>> __uids__[id(child1)] = child1
-  
+
   >>> childPortlet = DummyPortlet('Dummy at child1')
   >>> leftAtChild1 = getMultiAdapter((child1, left), IPortletAssignmentMapping)
   >>> saveAssignment(leftAtChild1, childPortlet)
-  
+
 This assignment does not affect rendering at the root folder:
 
   >>> view = getMultiAdapter((rootFolder, TestRequest()), name='main.html')
@@ -549,7 +549,7 @@ This assignment does not affect rendering at the root folder:
       </div>
     </body>
   </html>
-  
+
 It does, however, affect rendering at 'child1' (and any of its children).
 Notice also that by default, child portlets come before parent portlets.
 
@@ -567,10 +567,10 @@ Notice also that by default, child portlets come before parent portlets.
       </div>
     </body>
   </html>
-  
+
 Assigning portlets to site-wide categories
 -------------------------------------------
-  
+
 We can now assign a portlet to a user. Notice how one user's portlets
 don't interfere with those of another user, and that by default, user portlets
 are listed after contextual portlets (in fact, the default IPortletRetriever
@@ -586,7 +586,7 @@ Thus, we must first create the user category.
 
   >>> from plone.portlets.storage import PortletCategoryMapping
   >>> from plone.portlets.storage import PortletAssignmentMapping
-  
+
 Then we create assignment mappings for each user. These are very much like
 the LocalPortletAssignmentManager we used to assign contextual portlets
 above.
@@ -594,15 +594,15 @@ above.
   >>> left[USER_CATEGORY] = PortletCategoryMapping()
   >>> left[USER_CATEGORY][Anonymous.id] = PortletAssignmentMapping()
   >>> left[USER_CATEGORY][user1.id] = PortletAssignmentMapping()
-  
+
   >>> anonPortlet = DummyPortlet('Dummy for anonymous')
   >>> userPortlet = DummyPortlet('Dummy for user1')
-  
+
   >>> saveAssignment(left[USER_CATEGORY][Anonymous.id], anonPortlet)
   >>> saveAssignment(left[USER_CATEGORY][user1.id], userPortlet)
-  
+
 These will now be rendered as expected.
-  
+
   >>> view = getMultiAdapter((child1, TestRequest()), name='main.html')
   >>> print view().strip()
   <html>
@@ -618,7 +618,7 @@ These will now be rendered as expected.
       </div>
     </body>
   </html>
-  
+
   >>> __current_user__ = user1
   >>> view = getMultiAdapter((child1, TestRequest()), name='main.html')
   >>> print view().strip()
@@ -634,23 +634,23 @@ These will now be rendered as expected.
       </div>
     </body>
   </html>
-  
+
 We can also assign portlets to groups. This is no different to assigning
 portlets to users - we simply use a different category.
 
   >>> group1 = user1.groups[0]
   >>> group2 = user1.groups[1]
-  
+
   >>> left[GROUP_CATEGORY] = PortletCategoryMapping()
   >>> left[GROUP_CATEGORY][group1.id] = PortletAssignmentMapping()
   >>> left[GROUP_CATEGORY][group2.id] = PortletAssignmentMapping()
-  
+
   >>> groupPortlet1 = DummyPortlet('Dummy for group1')
   >>> groupPortlet2 = DummyPortlet('Dummy for group2')
-  
+
   >>> saveAssignment(left[GROUP_CATEGORY][group1.id], groupPortlet1)
   >>> saveAssignment(left[GROUP_CATEGORY][group2.id], groupPortlet2)
-  
+
   >>> view = getMultiAdapter((child1, TestRequest()), name='main.html')
   >>> print view().strip()
   <html>
@@ -667,7 +667,7 @@ portlets to users - we simply use a different category.
       </div>
     </body>
   </html>
-  
+
 Blacklisting portlets
 ---------------------
 
@@ -685,7 +685,7 @@ category) or None (let the parent decide).
   >>> leftAtChild1Manager.setBlacklistStatus(USER_CATEGORY, True)
   >>> leftAtChild1Manager.getBlacklistStatus(USER_CATEGORY)
   True
-  
+
   >>> view = getMultiAdapter((child1, TestRequest()), name='main.html')
   >>> print view().strip()
   <html>
@@ -701,7 +701,7 @@ category) or None (let the parent decide).
       </div>
     </body>
   </html>
-  
+
 The status is inherited from a parent unless a child also sets a status:
 
   >>> leftAtRootManager = getMultiAdapter((rootFolder, left), ILocalPortletAssignmentManager)
@@ -719,7 +719,7 @@ The status is inherited from a parent unless a child also sets a status:
       </div>
     </body>
   </html>
-  
+
   >>> leftAtChild1Manager.setBlacklistStatus(GROUP_CATEGORY, False)
   >>> view = getMultiAdapter((child1, TestRequest()), name='main.html')
   >>> print view().strip()
@@ -736,7 +736,7 @@ The status is inherited from a parent unless a child also sets a status:
       </div>
     </body>
   </html>
-  
+
 When setting the blacklist status of the 'context' category, assignments
 at the particular context will still apply.
 
@@ -756,7 +756,7 @@ at the particular context will still apply.
       </div>
     </body>
   </html>
-  
+
   >>> rightAtChild1 = getMultiAdapter((child1, right), IPortletAssignmentMapping)
   >>> saveAssignment(rightAtChild1, DummyPortlet('Dummy at child 1 right'))
 
@@ -774,14 +774,14 @@ at the particular context will still apply.
       </div>
     </body>
   </html>
-  
+
 If we create a child of child1, it will see that the portlets above child1
 are still blocked, but those from child11 are not blocked.
 
   >>> child11 = Folder()
   >>> child1['child11'] = child11
   >>> __uids__[id(child11)] = child11
-  
+
   >>> view = getMultiAdapter((child11, TestRequest()), name='main.html')
   >>> print view().strip()
   <html>
@@ -796,10 +796,10 @@ are still blocked, but those from child11 are not blocked.
       </div>
     </body>
   </html>
-  
+
   >>> rightAtChild11 = getMultiAdapter((child11, right), IPortletAssignmentMapping)
   >>> saveAssignment(rightAtChild11, DummyPortlet('Dummy at child 11 right'))
-  
+
   >>> view = getMultiAdapter((child11, TestRequest()), name='main.html')
   >>> print view().strip()
   <html>
@@ -815,13 +815,13 @@ are still blocked, but those from child11 are not blocked.
       </div>
     </body>
   </html>
-  
-We'd get the same effect by explicitly not blocking: if child11 had the 
-context category to "always show" (white-listing), it will get the portlets 
+
+We'd get the same effect by explicitly not blocking: if child11 had the
+context category to "always show" (white-listing), it will get the portlets
 from child1, but not those from the root folder. Thus, there is little
 difference between the blocking states 'None' and 'False' for contextual
 portlets. In the UI, a simple True/False or True/None may suffice.
-  
+
   >>> rightAtChild11Manager = getMultiAdapter((child11, right), ILocalPortletAssignmentManager)
   >>> rightAtChild11Manager.setBlacklistStatus(CONTEXT_CATEGORY, False)
   >>> view = getMultiAdapter((child11, TestRequest()), name='main.html')
@@ -839,11 +839,11 @@ portlets. In the UI, a simple True/False or True/None may suffice.
       </div>
     </body>
   </html>
-  
+
 If we wanted to hide the parent portlets here as well, we could explicitly
 block them as well.
-  
-  >>> rightAtChild11Manager = getMultiAdapter((child11, right), ILocalPortletAssignmentManager)  
+
+  >>> rightAtChild11Manager = getMultiAdapter((child11, right), ILocalPortletAssignmentManager)
   >>> rightAtChild11Manager.setBlacklistStatus(CONTEXT_CATEGORY, True)
   >>> view = getMultiAdapter((child11, TestRequest()), name='main.html')
   >>> print view().strip()
@@ -866,7 +866,7 @@ Blocking parent contextual portlets by default
 To create a portlet manager that blocks parent contextual portlets by default
 register an IBlockingPortletManager instead.
 
-  >>> from plone.portlets.interfaces import IBlockingPortletManager 
+  >>> from plone.portlets.interfaces import IBlockingPortletManager
   >>> from zope.interface import alsoProvides
   >>> alsoProvides(right, IBlockingPortletManager)
 
@@ -908,20 +908,20 @@ Consider the case of a "dashboard" where a user can assign personal portlets.
 This may be a special page that is not context-dependent, considering only
 user and group portlets.
 
-The portlet manager renderer will adapt its context and the portlet manager to 
-an IPortletRetreiver in order to get a list of portlets to display. 
-plone.portlets ships with an alternative version of the default 
-IPortletRetriever that ignores contextual portlets. This is registered as an 
+The portlet manager renderer will adapt its context and the portlet manager to
+an IPortletRetreiver in order to get a list of portlets to display.
+plone.portlets ships with an alternative version of the default
+IPortletRetriever that ignores contextual portlets. This is registered as an
 adapter from (Interface, IPlacelessPortletManager). IPlacelessPortletManager in
-turn, is a marker interface that you can apply to a portlet manager to get the 
+turn, is a marker interface that you can apply to a portlet manager to get the
 placeless behaviour.
 
   >>> from plone.portlets.interfaces import IPlacelessPortletManager
-  
+
   >>> sm = getSiteManager(rootFolder)
   >>> dashboardPortletManager = PortletManager()
   >>> directlyProvides(dashboardPortletManager, IPlacelessPortletManager)
-  
+
   >>> sm.registerUtility(component=dashboardPortletManager,
   ...                    provided=IPortletManager,
   ...                    name='columns.dashboard')
@@ -936,7 +936,7 @@ placeless behaviour.
   ...   </body>
   ... </html>
   ... """)
-  
+
   >>> class DashboardPage(BrowserPage):
   ...     adapts(Interface, IBrowserRequest)
   ...     __call__ = ViewPageTemplateFile(dashboardFileName)
@@ -949,32 +949,32 @@ placeless behaviour.
       </div>
     </body>
   </html>
-  
+
 Let's register some portlets for the dashboard.
 
   >>> dashboard = getUtility(IPortletManager, name='columns.dashboard')
-  
+
   >>> dashboard[USER_CATEGORY] = PortletCategoryMapping()
   >>> dashboard[USER_CATEGORY][Anonymous.id] = PortletAssignmentMapping()
   >>> dashboard[USER_CATEGORY][user1.id] = PortletAssignmentMapping()
-  
+
   >>> dashboard[GROUP_CATEGORY] = PortletCategoryMapping()
   >>> dashboard[GROUP_CATEGORY][group1.id] = PortletAssignmentMapping()
   >>> dashboard[GROUP_CATEGORY][group2.id] = PortletAssignmentMapping()
-  
+
   >>> saveAssignment(dashboard[USER_CATEGORY][user1.id], userPortlet)
   >>> saveAssignment(dashboard[GROUP_CATEGORY][group1.id], groupPortlet1)
   >>> saveAssignment(dashboard[GROUP_CATEGORY][group2.id], groupPortlet2)
-  
+
 When we render this, contextual portlets are ignored. Blacklistings also do
 not apply.
-  
+
   >>> dashboardAtChild1Manager = getMultiAdapter((child1, dashboard), ILocalPortletAssignmentManager)
   >>> dashboardAtChild1Manager.setBlacklistStatus(USER_CATEGORY, True)
-  
+
   >>> dashboardAtChild1 = getMultiAdapter((child1, dashboard), IPortletAssignmentMapping)
   >>> saveAssignment(dashboardAtChild1, DummyPortlet('dummy for dashboard in context'))
-  
+
   >>> view = getMultiAdapter((child1, TestRequest()), name='dashboard.html')
   >>> print view().strip()
   <html>
@@ -986,7 +986,7 @@ not apply.
       </div>
     </body>
   </html>
-  
+
 Portlet metadata
 ----------------
 
@@ -998,19 +998,19 @@ the renderer.
 
   >>> class IDataAware(IPortletDataProvider):
   ...   pass
-  
+
   >>> class DataAwarePortlet(Persistent, Contained):
   ...     implements(IPortletAssignment, IDataAware)
-  ...     
+  ...
   ...     def __init__(self, available=True):
   ...         self.available = available
   ...     data = property(lambda self: self)
-  
+
   >>> class DataAwareRenderer(object):
   ...     implements(IPortletRenderer)
-  ...     adapts(Interface, IBrowserRequest, IBrowserView, 
+  ...     adapts(Interface, IBrowserRequest, IBrowserView,
   ...             IPortletManager, IDataAware)
-  ... 
+  ...
   ...     def __init__(self, context, request, view, manager, data):
   ...         self.data = data
   ...         self.available = True
@@ -1023,13 +1023,13 @@ the renderer.
   ...         return "Manager: %s; Category: %s; Key: %s; Name: %s" % (md['manager'], md['category'], md['key'], md['name'],)
 
   >>> provideAdapter(DataAwareRenderer)
-  
+
 Let's assign this in the root folder.
 
   >>> dataPortlet = DataAwarePortlet()
   >>> leftAtRoot = getMultiAdapter((rootFolder, left), IPortletAssignmentMapping)
   >>> saveAssignment(leftAtRoot, dataPortlet)
-  
+
 Let's verify the output
 
   >>> view = getMultiAdapter((rootFolder, TestRequest()), name='main.html')
diff --git a/plone/portlets/TODO.txt b/plone/portlets/TODO.txt
index fa50070..cdf785f 100644
--- a/plone/portlets/TODO.txt
+++ b/plone/portlets/TODO.txt
@@ -3,14 +3,14 @@ plone.portlets to-do
 ====================
 
   o Security
-  
+
     - Determine what security declarations need to go in configure.zcml
 
     - The restrictions on getAddablePortletTypes() is superficial - if you
       construct the right URL, the adding view will accept it.
 
   o Design
-    
+
       -> blacklist specific portlets?
         - this requires assignments to have ids that are unique among all
            acquired portlets
\ No newline at end of file
diff --git a/plone/portlets/configure.zcml b/plone/portlets/configure.zcml
index b0ca1f4..606c281 100644
--- a/plone/portlets/configure.zcml
+++ b/plone/portlets/configure.zcml
@@ -1,14 +1,14 @@
 <configure xmlns="http://namespaces.zope.org/zope">
 
     <include package="zope.annotation" />
-    
+
     <adapter factory=".assignable.localPortletAssignmentMappingAdapter" />
     <adapter factory=".assignable.LocalPortletAssignmentManager" />
     <adapter factory=".assignable.BlockingLocalPortletAssignmentManager" />
 
     <adapter factory=".retriever.PortletRetriever" />
     <adapter factory=".retriever.PlacelessPortletRetriever" />
-    
+
     <adapter factory=".manager.PortletManagerRenderer" />
 
     <adapter factory=".settings.portletAssignmentSettingsFactory"/>
diff --git a/plone/portlets/retriever.py b/plone/portlets/retriever.py
index b3d9d8a..4e165fa 100644
--- a/plone/portlets/retriever.py
+++ b/plone/portlets/retriever.py
@@ -135,7 +135,7 @@ def getPortlets(self):
         for category, key, assignment in categories:
             try:
                 settings = IPortletAssignmentSettings(assignment)
-                if not settings.get('visible', True):   
+                if not settings.get('visible', True):
                     continue
             except TypeError:
                 # Portlet does not exist any longer
diff --git a/plone/portlets/settings.py b/plone/portlets/settings.py
index 28739e8..8eae2a2 100644
--- a/plone/portlets/settings.py
+++ b/plone/portlets/settings.py
@@ -25,7 +25,7 @@ def __getitem__(self, name):
     def get(self, name, default=None):
         return self.data.get(name, default)
 
-        
+
 @adapter(IPortletAssignment)
 @implementer(IPortletAssignmentSettings)
 def portletAssignmentSettingsFactory(context):
@@ -34,5 +34,5 @@ def portletAssignmentSettingsFactory(context):
 
     if settings is None:
         settings = annotations[ASSIGNMENT_SETTINGS_KEY] = PortletAssignmentSettings()
-    
+
     return settings
diff --git a/plone/portlets/uisupport.txt b/plone/portlets/uisupport.txt
index a175219..a42c6ae 100644
--- a/plone/portlets/uisupport.txt
+++ b/plone/portlets/uisupport.txt
@@ -18,47 +18,47 @@ First, we must create a local site manager at a fictional root folder.
 
   >>> from zope.interface import implements, Interface, directlyProvides
   >>> from zope.component import adapts, provideAdapter
-  
+
   >>> from zope.site.folder import rootFolder, Folder
   >>> rootFolder = rootFolder()
-  
+
   >>> from zope.location.interfaces import ISite
   >>> from zope.component.persistentregistry import PersistentComponents
   >>> from zope.component.globalregistry import base as siteManagerBase
   >>> from zope.component import getSiteManager
-  
+
   >>> sm = PersistentComponents()
   >>> sm.__bases__ = (siteManagerBase,)
   >>> rootFolder.setSiteManager(sm)
   >>> ISite.providedBy(rootFolder)
   True
-  
+
   >>> from zope.site.hooks import setSite, setHooks
   >>> setSite(rootFolder)
   >>> setHooks()
-  
+
 Then we create three portlet managers. One portlet manager is given the interface
 IFoo1, and a second is given the interface IFoo2.
-  
+
   >>> from plone.portlets.interfaces import IPortletManager
   >>> from plone.portlets.manager import PortletManager
-  
+
   >>> class IFoo1(IPortletManager):
   ...     pass
-  
+
   >>> left = PortletManager()
   >>> directlyProvides(left, IFoo1)
-  
+
   >>> class IFoo2(IPortletManager):
   ...     pass
-  
+
   >>> right = PortletManager()
   >>> directlyProvides(right, IFoo2)
-  
+
   >>> middle = PortletManager()
-  
+
 Ordinarily, we would register these with our local site manager. See README.txt.
-  
+
 No portlet registrations have been made yet, so no portlets are considered
 addable.
 
@@ -68,17 +68,17 @@ addable.
   []
   >>> middle.getAddablePortletTypes()
   []
-  
+
 We now want to register some fictional portlet types. For the purposes of
 demonstration, we don't actually need to create the portlet types - see
 README.txt for the full story. We will instead just create the portlet
 registrations for these fictional portlets, using a utility method.
 
   >>> from plone.portlets import utils
-  
+
   >>> utils.registerPortletType(rootFolder, title='Portlet A',
   ...   description='Portlet number one', addview='portlets.a')
-  
+
 This portlet will be addable anywhere.
 
   >>> [portlet.addview for portlet in left.getAddablePortletTypes()]
@@ -87,13 +87,13 @@ This portlet will be addable anywhere.
   ['portlets.a']
   >>> [portlet.addview for portlet in middle.getAddablePortletTypes()]
   ['portlets.a']
- 
+
 The second portlet type is applicable only to portlet managers providing IFoo1:
 
   >>> utils.registerPortletType(rootFolder, title='Portlet B',
   ...   description='Portlet number two', addview='portlets.b',
   ...   for_=[IFoo1])
-  
+
   >>> portlets = left.getAddablePortletTypes()
   >>> portlets.sort(lambda x,y: cmp(x.addview, y.addview))
   >>> [portlet.addview for portlet in portlets]
@@ -101,25 +101,25 @@ The second portlet type is applicable only to portlet managers providing IFoo1:
 
   >>> [portlet.addview for portlet in right.getAddablePortletTypes()]
   ['portlets.a']
-  
+
   >>> [portlet.addview for portlet in middle.getAddablePortletTypes()]
-  ['portlets.a'] 
+  ['portlets.a']
 
 The third portlet type is applicable only to portlet managers providing IFoo1 or IFoo2:
-  
+
   >>> utils.registerPortletType(rootFolder, title='Portlet C',
   ...   description='Portlet number three', addview='portlets.c',
   ...   for_=[IFoo1, IFoo2])
-  
+
   >>> portlets = left.getAddablePortletTypes()
   >>> portlets.sort(lambda x,y: cmp(x.addview, y.addview))
   >>> [portlet.addview for portlet in portlets]
   ['portlets.a', 'portlets.b', 'portlets.c']
-  
+
   >>> portlets = right.getAddablePortletTypes()
   >>> portlets.sort(lambda x,y: cmp(x.addview, y.addview))
   >>> [portlet.addview for portlet in portlets]
   ['portlets.a', 'portlets.c']
-  
+
   >>> [portlet.addview for portlet in middle.getAddablePortletTypes()]
   ['portlets.a']
diff --git a/plone/portlets/utils.txt b/plone/portlets/utils.txt
index 324a23b..ccabb9c 100644
--- a/plone/portlets/utils.txt
+++ b/plone/portlets/utils.txt
@@ -3,7 +3,7 @@ Portlet utils
 =============
 
 The portlets need a hash that can play as an id in the html
-page. For this, a pair of symetric hash and unhash functions 
+page. For this, a pair of symetric hash and unhash functions
 is provided.
 
   >>> from plone.portlets.utils import hashPortletInfo, unhashPortletInfo
@@ -42,7 +42,7 @@ html id. We should only allow the characters a-zA-Z0-9 . (We
 could actually allow -, but it's even better not to.)
 
 For the sake of the example, we put stranger characters into
-the dictionary, mainly /-+_@ should be tested. 
+the dictionary, mainly /-+_@ should be tested.
 
   >>> info = dict(
   ...     manager = 'plone.leftcolumn',




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


More information about the Testbot mailing list