rpms/TurboGears/devel TurboGears-1.0.3.2-paginate.patch, NONE, 1.1 TurboGears.spec, 1.26, 1.27

Luke Macken (lmacken) fedora-extras-commits at redhat.com
Sat Dec 15 22:37:40 UTC 2007


Author: lmacken

Update of /cvs/pkgs/rpms/TurboGears/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30584

Modified Files:
	TurboGears.spec 
Added Files:
	TurboGears-1.0.3.2-paginate.patch 
Log Message:
* Sat Dec 15 2007 Luke Macken <lmacken at redhat.com> 1.0.3.2-7
- Add TurboGears-1.0.3.2-paginate.patch backported from upstream
  http://trac.turbogears.org/ticket/1629



TurboGears-1.0.3.2-paginate.patch:

--- NEW FILE TurboGears-1.0.3.2-paginate.patch ---
--- CHANGELOG.txt.orig	2007-12-15 17:27:10.000000000 -0500
+++ CHANGELOG.txt	2007-12-15 17:26:49.000000000 -0500
@@ -1,6 +1,28 @@
 TurboGears Changelog
 ====================
 
+1.0.4 Backports (December 15, 2007):
+------------------------------------
+
+Changes
+~~~~~~~
+
+* Pagination can be disabled by using ``allow_limit_override`` and.
+  ``tg_paginate_limit=0``, allowing all results been returned on one single.
+  page (#1629).
+
+Fixes
+~~~~~
+
+* Paginate does a better handling of zeroed limit, avoiding ZeroDivisionError
+  exception (#1629).
+
+Contributors
+~~~~~~~~~~~~
+
+Toshio Kuratomi
+
+
 1.0.3.2 (July 20, 2007):
 ------------------------
 *Changes*
--- turbogears/paginate.py.orig	2007-12-15 17:20:54.000000000 -0500
+++ turbogears/paginate.py	2007-12-15 17:24:27.000000000 -0500
@@ -147,6 +147,9 @@
                     'Variable is not a list or SelectResults or Query (%s)' % type(
                             var_data))
 
+            # If limit is zero then return all our rows
+            if not limit_:
+                limit_ = row_count or 1
             offset = (page-1) * limit_
             page_count = int(ceil(float(row_count)/limit_))
 


Index: TurboGears.spec
===================================================================
RCS file: /cvs/pkgs/rpms/TurboGears/devel/TurboGears.spec,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- TurboGears.spec	27 Oct 2007 22:36:52 -0000	1.26
+++ TurboGears.spec	15 Dec 2007 22:37:00 -0000	1.27
@@ -3,7 +3,7 @@
 
 Name:           TurboGears
 Version:        1.0.3.2
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        Back-to-front web development in Python
 
 Group:          Development/Languages
@@ -11,15 +11,11 @@
 URL:            http://www.turbogears.org
 Source0:        http://files.turbogears.org/eggs/%{name}-%{version}.tar.gz
 Patch0:         %{name}-%{version}-setuptools.patch
+Patch1:         %{name}-%{version}-paginate.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 
-BuildRequires: python-devel
-%if 0%{?fedora} >= 8
-BuildRequires: python-setuptools-devel
-%else
-BuildRequires: python-setuptools
-%endif
+BuildRequires: python-devel python-setuptools-devel
 
 # ElementTree is part of python 2.5 on FC7+
 %if 0%{?fedora} <= 6
@@ -70,6 +66,7 @@
 %prep
 %setup -q
 %patch0 -b .setuptools
+%patch1 -b .paginate
 
 
 %build
@@ -91,6 +88,10 @@
 %{python_sitelib}/turbogears/
 
 %changelog
+* Sat Dec 15 2007 Luke Macken <lmacken at redhat.com> 1.0.3.2-7
+- Add TurboGears-1.0.3.2-paginate.patch backported from upstream
+  http://trac.turbogears.org/ticket/1629
+
 * Sat Oct 27 2007 Luke Macken <lmacken at redhat.com> 1.0.3.2-6
 - Remove python-TestGears requirement, as this functionality
   has been replaced by nose.




More information about the fedora-extras-commits mailing list