rpms/TurboGears/F-8 TurboGears-1.0.3.2-paginate.patch, NONE, 1.1 TurboGears.spec, 1.25, 1.26

Luke Macken (lmacken) fedora-extras-commits at redhat.com
Tue Dec 18 15:20:56 UTC 2007


Author: lmacken

Update of /cvs/pkgs/rpms/TurboGears/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11559

Modified Files:
	TurboGears.spec 
Added Files:
	TurboGears-1.0.3.2-paginate.patch 
Log Message:
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/F-8/TurboGears.spec,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- TurboGears.spec	8 Oct 2007 18:35:47 -0000	1.25
+++ TurboGears.spec	18 Dec 2007 15:20:12 -0000	1.26
@@ -3,7 +3,7 @@
 
 Name:           TurboGears
 Version:        1.0.3.2
-Release:        5%{?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
@@ -51,7 +47,6 @@
 Requires:       python-ruledispatch
 Requires:       python-nose >= 0.9.1
 Requires:       python-psycopg2
-Requires:       python-TestGears
 Requires:       python-decoratortools >= 1.4
 
 %description
@@ -71,6 +66,7 @@
 %prep
 %setup -q
 %patch0 -b .setuptools
+%patch1 -b .paginate
 
 
 %build
@@ -92,6 +88,14 @@
 %{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.
+
 * Mon Oct 8 2007 Toshio Kuratomi <a.badger at gmail.com> 1.0.3.2-5
 - Update patch so that quickstart template pulls in the proper sqlalchemy
   when tg-admin quickstart -s is run.




More information about the fedora-extras-commits mailing list