[Checkins] SVN: z3c.table/branches/lazyvalues2/ use factory from z3c.batching

Godefroid Chapelle gotcha at bubblenet.be
Fri Aug 20 04:11:32 EDT 2010


Log message for revision 115822:
  use factory from z3c.batching
  
  fix wrong merge of CHANGES.TXT
  some pep8
  

Changed:
  U   z3c.table/branches/lazyvalues2/CHANGES.txt
  U   z3c.table/branches/lazyvalues2/TODO.txt
  U   z3c.table/branches/lazyvalues2/setup.py
  U   z3c.table/branches/lazyvalues2/src/z3c/table/configure.zcml
  U   z3c.table/branches/lazyvalues2/src/z3c/table/table.py

-=-
Modified: z3c.table/branches/lazyvalues2/CHANGES.txt
===================================================================
--- z3c.table/branches/lazyvalues2/CHANGES.txt	2010-08-20 08:09:47 UTC (rev 115821)
+++ z3c.table/branches/lazyvalues2/CHANGES.txt	2010-08-20 08:11:32 UTC (rev 115822)
@@ -2,24 +2,12 @@
 CHANGES
 =======
 
-0.9.1 (unreleased)
+0.10.0 (unreleased)
 ------------------
 
-- Nothing changed yet.
+- Use a batch factory instead of instantiating ``z3c.batching.Batch`` class directly,
+  (``z3c.batching.Batch`` registered as default factory in ``z3c.batching==1.2.0``)
 
-
-0.9.0 (2010-08-09)
-------------------
-
-- Added ``EMailColumn`` which can be used to display mailto links.
-
-- Fixed the default BatchProvider not to lose table sorting query arguments
-  from the generated links; now batching and sorting play with each other
-  nicely.
-
-- Split single doctest file (README.txt) into different files
->>>>>>> .merge-right.r115818
-
 - ``IValues`` conform to ``len`` protocol. ``table.Table`` has new
   ``allRowsCount`` attribute that surfaces the total number of rows.
 
@@ -31,9 +19,19 @@
 
 - Add tests that verify interfaces for classes in ``value.py``
 
-- Split single doctest file (``README.txt``) into different files
 
+0.9.0 (2010-08-09)
+------------------
 
+- Added ``EMailColumn`` which can be used to display mailto links.
+
+- Fixed the default BatchProvider not to lose table sorting query arguments
+  from the generated links; now batching and sorting play with each other
+  nicely.
+
+- Split single doctest file (README.txt) into different files
+
+
 0.8.1 (2010-07-31)
 ------------------
 

Modified: z3c.table/branches/lazyvalues2/TODO.txt
===================================================================
--- z3c.table/branches/lazyvalues2/TODO.txt	2010-08-20 08:09:47 UTC (rev 115821)
+++ z3c.table/branches/lazyvalues2/TODO.txt	2010-08-20 08:11:32 UTC (rev 115822)
@@ -11,9 +11,6 @@
 lazyvalues
 ----------
 
-- instead of instantiating z3c.batching.Batch class directly,
-  use a Batch factory; register z3c.batching.Batch as default class
-
 - in z3c.batching, write other batch class that converts 'user side batchstart' 
   to 'table side batchstart' to play well with subset of values computed with
   LIMIT and OFFSET from RDB.

Modified: z3c.table/branches/lazyvalues2/setup.py
===================================================================
--- z3c.table/branches/lazyvalues2/setup.py	2010-08-20 08:09:47 UTC (rev 115821)
+++ z3c.table/branches/lazyvalues2/setup.py	2010-08-20 08:11:32 UTC (rev 115822)
@@ -23,10 +23,10 @@
 
 setup(
     name='z3c.table',
-    version='0.9.1dev',
-    author = "Stephan Richter, Roger Ineichen and the Zope Community",
-    author_email = "zope-dev at zope.org",
-    description = "Modular table rendering implementation for Zope3",
+    version='0.10.0dev',
+    author="Stephan Richter, Roger Ineichen and the Zope Community",
+    author_email="zope-dev at zope.org",
+    description="Modular table rendering implementation for Zope3",
     long_description=(
         read('README.txt')
         + '\n\n' +
@@ -71,7 +71,7 @@
         ),
     install_requires=[
         'setuptools',
-        'z3c.batching>=1.1.0',
+        'z3c.batching>=1.2.0',
         'zope.component',
         'zope.contentprovider',
         'zope.dublincore',

Modified: z3c.table/branches/lazyvalues2/src/z3c/table/configure.zcml
===================================================================
--- z3c.table/branches/lazyvalues2/src/z3c/table/configure.zcml	2010-08-20 08:09:47 UTC (rev 115821)
+++ z3c.table/branches/lazyvalues2/src/z3c/table/configure.zcml	2010-08-20 08:11:32 UTC (rev 115822)
@@ -2,6 +2,8 @@
     xmlns="http://namespaces.zope.org/zope"
     i18n_domain="z3c">
 
+  <include package="z3c.batching" />
+
   <!-- IValues-->
   <adapter
       factory=".value.ValuesForContainer"

Modified: z3c.table/branches/lazyvalues2/src/z3c/table/table.py
===================================================================
--- z3c.table/branches/lazyvalues2/src/z3c/table/table.py	2010-08-20 08:09:47 UTC (rev 115821)
+++ z3c.table/branches/lazyvalues2/src/z3c/table/table.py	2010-08-20 08:11:32 UTC (rev 115822)
@@ -20,10 +20,10 @@
 
 import zope.interface
 import zope.component
+from zope.component import createObject
 import zope.location
 
 from z3c.batching.interfaces import IBatch
-from z3c.batching.batch import Batch
 from z3c.table import interfaces
 from z3c.table import column
 
@@ -223,8 +223,8 @@
 
     def batchRows(self):
         if len(self.rows) > self.startBatchingAt:
-            self.rows = Batch(self.rows, start=self.batchStart,
-                size=self.batchSize)
+            self.rows = createObject("z3c.batching.batch", self.rows,
+                start=self.batchStart, size=self.batchSize)
 
     def updateBatch(self):
         if IBatch.providedBy(self.rows):



More information about the checkins mailing list