SyntaxError with Python 2.4

Bug #392493 reported by Andrea Corbellini
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Terminator
Fix Released
Critical
Andrea Corbellini

Bug Description

I can't run nor install Terminator with Python 2.4 because of the following error:

Compiling /usr/lib/python2.4/site-packages/terminatorlib/terminator.py ...
  File "/usr/lib/python2.4/site-packages/terminatorlib/terminator.py", line 42
    class TerminatorWindowTitle():
                                ^
SyntaxError: invalid syntax

I'm providing the easy fix for this, but I would like to have it cherrypicked in version 0.13 because now I can't finish the upgrade from the PPA and so my favourite terminal emulator is now broken.

Revision history for this message
Chris Jones (cmsj) wrote :

I'm seriously considering making the package ignore python 2.4 on the basis that I would prefer to keep the code as it is and I never do any testing with py24.

Changed in terminator:
assignee: nobody → Chris Jones (cmsj)
importance: Undecided → Critical
status: New → Triaged
Revision history for this message
snesreviews (fquinn) wrote :

Hi Chris, I run python 2.4 (default with RH 5.1) and everything works fine after this change. I tried upgrading my version of python before applying this change but it's a seriously awkward and non-standard process so I would prefer to avoid this where possible! In the end, for this to work, I would have to upgrade my entire glib distro, as well as several python packages which don't come with the default. Please don't drop 2.4 support!

Revision history for this message
Chris Jones (cmsj) wrote :

looking at this, we don't actually need the class to be new-style, so the original fix should be ok and python2.4 compatibility is preserved.

Changed in terminator:
assignee: Chris Jones (cmsj) → Andrea Corbellini (andrea-bs)
status: Triaged → Fix Committed
Revision history for this message
Andrea Corbellini (andrea.corbellini) wrote :

New style classes can be used with Python 2.4. The only thing to do is to inherit from ``object``:

    class NewStyleClass(object):
        # Some code...

Revision history for this message
Chris Jones (cmsj) wrote :

Andrea: Sure, I nearly went for that option, but given that that class doesn't really need any new-style features, I figured it would be just as easy to revert it to old-style.

Revision history for this message
Luis de Bethencourt Guimerá (luisbg) wrote :

I don't see this fix merged into the 0.13 tarball. Will this tarball be updated?

Revision history for this message
Chris Jones (cmsj) wrote :

Luis: I tend to think that updating releases is a bad idea, but I appreciate that I have failed to create a newer release since 0.13, so I will try to get a 0.14 release out shortly.

Chris Jones (cmsj)
Changed in terminator:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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