Package: cheetah
Version: 2.4.3
Severity: important
Tags: patch

Cheetah 2.4.3 needs a patch for Python 2.7 compatibility.  We've
applied the following patch to the Ubuntu version, and it was derived
from the patch applied in Fedora.  Also, 02_clean_modules.patch and
03_python-2.6-warning-fix.patch are no longer necessary.


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -uNr Cheetah-2.4.2.1.orig/cheetah/Template.py Cheetah-2.4.2.1/cheetah/Template.py
--- Cheetah-2.4.2.1.orig/cheetah/Template.py	2010-02-07 23:17:23.000000000 -0500
+++ Cheetah-2.4.2.1/cheetah/Template.py	2010-10-18 14:06:54.439935114 -0400
@@ -32,7 +32,7 @@
 
 filetype = None
 
-if isinstance(sys.version_info, tuple):
+if isinstance(sys.version_info[:], tuple):
     # Python 2.xx
     filetype = types.FileType
     def createMethod(func, cls):
diff -uNr Cheetah-2.4.2.1.orig/cheetah/Tests/SyntaxAndOutput.py Cheetah-2.4.2.1/cheetah/Tests/SyntaxAndOutput.py
--- Cheetah-2.4.2.1.orig/cheetah/Tests/SyntaxAndOutput.py	2010-10-18 15:00:44.668935001 -0400
+++ Cheetah-2.4.2.1/cheetah/Tests/SyntaxAndOutput.py	2010-10-18 14:43:56.500934997 -0400
@@ -847,17 +847,17 @@
     def test10(self):
         r"""func placeholder - with ('''\nstring\n''')"""
         self.verify("$aFunc('''\naoeu\n''')",
-                    "\naoeu\n")
+                    "\naoeu\n", convertEOLs=False)
 
     def test11(self):
         r"""func placeholder - with ('''\nstring'\n''')"""
         self.verify("$aFunc('''\naoeu'\n''')",
-                    "\naoeu'\n")
+                    "\naoeu'\n", convertEOLs=False)
 
     def test12(self):
         r'''func placeholder - with ("""\nstring\n""")'''
         self.verify('$aFunc("""\naoeu\n""")',
-                    "\naoeu\n")
+                    "\naoeu\n", convertEOLs=False)
 
     def test13(self):
         """func placeholder - with (string*int)"""

Reply via email to