cheetah 2.0.1 is incompatible with python 2.6

Bug #599308 reported by Christian Haugan Toldnes
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
cheetah (Ubuntu)
Fix Released
Medium
Unassigned
Nominated for Lucid by Bryan O'Sullivan
Nominated for Maverick by Bryan O'Sullivan

Bug Description

Source package: cheetah
Distro: Lucid

Current python-cheetah (2.0.1-2ubuntu7) has at least one bug that makes it unable to run on python 2.6:

$ /usr/bin/cheetah fill --oext css default.tmpl
Filling default.tmpl -> default.css
Traceback (most recent call last):
  File "/usr/bin/cheetah", line 3, in <module>
    CheetahWrapper().main()
  File "/usr/lib/pymodules/python2.6/Cheetah/CheetahWrapper.py", line 182, in main
    meth()
  File "/usr/lib/pymodules/python2.6/Cheetah/CheetahWrapper.py", line 244, in fill
    self._compileOrFill()
  File "/usr/lib/pymodules/python2.6/Cheetah/CheetahWrapper.py", line 346, in _compileOrFill
    self._compileOrFillBundle(b)
  File "/usr/lib/pymodules/python2.6/Cheetah/CheetahWrapper.py", line 566, in _compileOrFillBundle
    tclass = TemplateClass.compile(file=src, compilerSettings=compilerSettings)
  File "/usr/lib/pymodules/python2.6/Cheetah/Template.py", line 724, in compile
    settings=(compilerSettings or {}))
  File "/usr/lib/pymodules/python2.6/Cheetah/Compiler.py", line 1596, in __init__
    self._parser = self.parserClass(source, filename=self._filePath, compiler=self)
  File "/usr/lib/pymodules/python2.6/Cheetah/Parser.py", line 1306, in __init__
    self.configureParser()
  File "/usr/lib/pymodules/python2.6/Cheetah/Parser.py", line 1323, in configureParser
    _LowLevelParser.configureParser(self)
  File "/usr/lib/pymodules/python2.6/Cheetah/Parser.py", line 392, in configureParser
    self._makeCheetahVarREs()
  File "/usr/lib/pymodules/python2.6/Cheetah/Parser.py", line 440, in _makeCheetahVarREs
    r'(?P<NOT_SILENT>)' +
  File "/usr/lib/pymodules/python2.6/Cheetah/Parser.py", line 49, in escapeRegexChars
    return escapeRE.sub(r'\\\1' , txt)
TypeError: importHook() takes at most 5 arguments (6 given)

This seems to be fixed in cheetah 2.1.1:
- Applied patch to correct importHook behavior on Python 2.6 (reported/patched by Toshio Ernie Kuratomi <email address hidden>)

However, you probably would want to update to latest, since the python-cheetah package in Ubuntu has stayed the same since hardy....

Revision history for this message
Bryan O'Sullivan (bos-serpentine) wrote :

Debian squeeze is now at 2.4.2, which works just fine.

Revision history for this message
Christian Haugan Toldnes (christian-toldnes) wrote : Re: [Bug 599308] Re: cheetah 2.0.1 is incompatible with python 2.6

Bryan O'Sullivan wrote:
> Debian squeeze is now at 2.4.2, which works just fine.
>
Does this mean that you're going to backport 2.4.2 to 10.04 LTS, or will
LTS stay broken?

c

--
Christian Haugan Toldnes
Leder BAS-teamet, Plattformseksjonen
IT-avdelingen, NTNU
Tel: (735)98054 Mob: 93060023

Forskrift om IT-standarder i offentlig forvaltning:
http://www.lovdata.no/for/sf/fa/xa-20090925-1222.html
Referansekatalog for IT-standarder i offentlig sektor:
http://standard.difi.no/forvaltningsstandarder/referansekatalogen-html-versjon

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Hi Christian, thank you for taking the time to report this bug and help us make Ubuntu better.

We are in the process of upgrading to the 2.4.3 upstream release right now (and hopefully at the same time merging debian's latest changes).

You can track that progress in bug #663343 . I imagine once it is done, this bug can be marked fix released, and 2.4.3 can be backported to at least Lucid.

Changed in cheetah (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cheetah - 3.1.0-2build1

---------------
cheetah (3.1.0-2build1) cosmic; urgency=medium

  * No-change rebuild to build for python3.7.

 -- Matthias Klose <email address hidden> Thu, 28 Jun 2018 06:58:55 +0000

Changed in cheetah (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.