rpms/python-genshi/devel python-genshi-0.5.1-length_hint.patch, NONE, 1.1 python-genshi.spec, 1.13, 1.14

Luke Macken lmacken at fedoraproject.org
Fri Sep 11 20:44:02 UTC 2009


Author: lmacken

Update of /cvs/pkgs/rpms/python-genshi/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15483

Modified Files:
	python-genshi.spec 
Added Files:
	python-genshi-0.5.1-length_hint.patch 
Log Message:
Add a patch to work around some recent Python2.6.2 behavior


python-genshi-0.5.1-length_hint.patch:
 eval.py |    5 +++++
 1 file changed, 5 insertions(+)

--- NEW FILE python-genshi-0.5.1-length_hint.patch ---
--- genshi/template/eval.py.orig	2009-09-11 16:21:30.104413211 -0400
+++ genshi/template/eval.py	2009-09-11 16:25:03.309414651 -0400
@@ -279,6 +279,11 @@
         raise UndefinedError(self._name, self._owner)
     __call__ = __getattr__ = __getitem__ = _die
 
+    # Hack around some behavior introduced after Python2.6.
+    # http://bugs.python.org/issue1242657
+    # http://svn.python.org/view/python/trunk/Lib/test/test_iterlen.py?r1=69227&r2=69226&pathrev=69227
+    __length_hint__ = lambda: 0
+
 
 class LookupBase(object):
     """Abstract base class for variable lookup implementations."""


Index: python-genshi.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python-genshi/devel/python-genshi.spec,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -p -r1.13 -r1.14
--- python-genshi.spec	26 Jul 2009 20:25:22 -0000	1.13
+++ python-genshi.spec	11 Sep 2009 20:44:02 -0000	1.14
@@ -2,7 +2,7 @@
 
 Name:           python-genshi
 Version:        0.5.1
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        Toolkit for stream-based generation of output for the web
 
 Group:          Development/Languages
@@ -10,6 +10,7 @@ License:        BSD
 URL:            http://genshi.edgewall.org/
 
 Source0:        http://ftp.edgewall.com/pub/genshi/Genshi-%{version}.tar.bz2
+Patch0:         %{name}-%{version}-length_hint.patch
 Patch1:		0001-Ported-913-927-and-928-to-the-0.5.x-branch.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -27,6 +28,7 @@ a template language, which is heavily in
 
 %prep
 %setup0 -q -n Genshi-%{version}
+%patch0 -p0 -b .length_hint
 %patch1 -p1
 
 find examples -type f | xargs chmod a-x
@@ -50,6 +52,9 @@ rm -rf %{buildroot}
 %{python_sitearch}/*
 
 %changelog
+* Fri Sep 11 2009 Luke Macken <lmacken at redhat.com> - 0.5.1-7
+- Add a patch to work around some recent Python2.6.2 behavior
+
 * Sun Jul 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.5.1-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 




More information about the fedora-extras-commits mailing list