[Framework-Team] Final decision on PLIP 9327 (Unified interface for lists of content)

Laurence Rowe l at lrowe.co.uk
Fri Feb 4 19:32:16 UTC 2011


On 4 February 2011 17:45, Geir Bækholt <plone at baekholt.com> wrote:
> On 20-01-2011 16:57, Eric Steele wrote:
>>
>> I'd like to get a final consensus on whether or not PLIP 9327 will be
>> included in 4.1. From discussion last week, several of you wanted to hold
>> out until we knew whether collections and search results would be in. At
>> this point, it looks like those two will be pushed off for 4.2.
>
> Just for the record of this thread: I spoke to Eric and the final decision
> is to postpone #9327 until we have code actually using it in Plone.
>
> I think this is fair and sensible.
>
> I will proceed with making a release on pypi. Then work it into a template
> refactoring i am starting - hopefully for 4.2

Great, I'm hoping to use it as soon as possible. A couple of comments
from looking at it:

* The review_state() as a metho looks out of place.

* We need some way to get the object. There is the realobject
property/attribute, but that doesn't fit the pattern of the other
methods. Maybe this should be getObject()?

I've added plone.uuid support now.

But we do have some failing tests. I'm assuming these are down to
Hanno's ZCatalog changes:

Error in test test_batching_folder_contents_2
(plone.app.contentlisting.tests.test_integration_unit.TestFolderContents)
Traceback (most recent call last):
  File "/data/buildout/eggs/unittest2-0.5.1-py2.6.egg/unittest2/case.py",
line 343, in run
    testMethod()
  File "/data/devel/soschildren/ourafrica/develop/plone.app.contentlisting/plone/app/contentlisting/tests/test_integration_unit.py",
line 268, in test_batching_folder_contents_2
    self.assertEqual(folderlisting[0].getId(), new_id2)
  File "/data/devel/soschildren/ourafrica/develop/plone.app.contentlisting/plone/app/contentlisting/contentlisting.py",
line 19, in __getitem__
    return IContentListingObject(self._basesequence[index])
  File "/data/buildout/eggs/Zope2-2.13.2-py2.6.egg/ZTUtils/Batch.py",
line 87, in __getitem__
    return self._sequence[index+self.first]
  File "/data/devel/soschildren/ourafrica/develop/plone.app.contentlisting/plone/app/contentlisting/contentlisting.py",
line 19, in __getitem__
    return IContentListingObject(self._basesequence[index])
  File "/data/devel/soschildren/ourafrica/develop/Products.ZCatalog/src/Products/ZCatalog/Lazy.py",
line 187, in __getitem__
    value = data[index] = self._func(self._seq[index])
  File "/data/devel/soschildren/ourafrica/develop/Products.ZCatalog/src/Products/ZCatalog/Lazy.py",
line 304, in __getitem__
    return self._seq[index][1]
IndexError: list index out of range



Error in test test_search_with_batching_2
(plone.app.contentlisting.tests.test_integration_unit.TestSearch)
Traceback (most recent call last):
  File "/data/buildout/eggs/unittest2-0.5.1-py2.6.egg/unittest2/case.py",
line 343, in run
    testMethod()
  File "/data/devel/soschildren/ourafrica/develop/plone.app.contentlisting/plone/app/contentlisting/tests/test_integration_unit.py",
line 312, in test_search_with_batching_2
    firstbatchitem = searchresultslist[0].getId()
  File "/data/devel/soschildren/ourafrica/develop/plone.app.contentlisting/plone/app/contentlisting/contentlisting.py",
line 19, in __getitem__
    return IContentListingObject(self._basesequence[index])
  File "/data/buildout/eggs/Zope2-2.13.2-py2.6.egg/ZTUtils/Batch.py",
line 87, in __getitem__
    return self._sequence[index+self.first]
  File "/data/devel/soschildren/ourafrica/develop/plone.app.contentlisting/plone/app/contentlisting/contentlisting.py",
line 19, in __getitem__
    return IContentListingObject(self._basesequence[index])
  File "/data/devel/soschildren/ourafrica/develop/Products.ZCatalog/src/Products/ZCatalog/Lazy.py",
line 187, in __getitem__
    value = data[index] = self._func(self._seq[index])
IndexError: list index out of range

  Ran 47 tests with 0 failures and 2 errors in 11.990 seconds.


Laurence



More information about the Framework-Team mailing list