# Ticket #8803 (closed defect: duplicate)

Opened 2 years ago

## TracDiscussion no longer works with Python2.4

Reported by: Assigned to: tgdrozda@gmail.com rjollos normal DiscussionPlugin normal discussion, python2.4, 0.11, Trac 12.2 0.12

I would like to enable Discussion plugin 0.11 (from svn) for Trac 12.2 on my enterprise RHEL 5.4 system running python2.4. However, it appears that several lines of python 2.5 code (if oneliners for example) break python 2.4 compatibility. I noticed that there was a python2.4 patch few revisions back, so I tried to check out SVN r9590, apply the patch, and install the plugin. This did not work and Trac kept issuing a WARNING in the log:

Component <tracdiscussion.init.DiscussionInit object at 0x2ade4de3d7d0> requires environment upgrade.


Running trac-admin ... upgrade did not solve the issue, even though permissions were set correctly. I am currently stuck.

Does anyone maintain a more current python2.4 patch?

It is a shame that this valuable plugin does not maintain compatibility with widely used (especially on older and enterprise systems) python2.4 for reason no other than to save a few lines of code.

## Change History

### 05/16/11 16:34:56 changed by tgdrozda@gmail.com

• owner set to Blackhex.
• component changed from SELECT A HACK to DiscussionPlugin.

Clarification: "I tried to check out SVN r9590, apply the patch, and install the plugin. This did not work." Reverting SVN to r9590 of worked and applying the patch and building with python2.4 also worked. However, when loading this build in Trac 12.2 I got the Trac WARNING in the log: Component <tracdiscussion.init.DiscussionInit?? object at 0x2ade4de3d7d0> requires environment upgrade. Running "trac-admin ... upgrade" did not solve the issue. This command would perform the upgrade unsucessfully and I would get the "perform upgrade" page on the Trac website.

### 05/16/11 16:44:40 changed by Blackhex

• status changed from new to assigned.

Thank you for your interest in the plugin. I'd take a look at this issue but currently I'm pretty occupied. Furthermore, finishing TagsPlugin support and fixing other bugs is more important for me. I can't promise you when I'll get to this issue.

### 05/17/11 01:45:47 changed by tgdrozda@gmail.com

Thanks Blackhex, Just curious ... are you aware of any technical reasons to utilize python2.5 constructs in your plugin. If not, I might give writing a patch a shot.

### (follow-up: ↓ 5 ) 05/17/11 02:38:26 changed by rjollos

• description changed.

I sympathize with RHEL users that it still runs Python 2.4, but note that Trac 0.13 will only support Python 2.5 and later, so we are moving to a stage that will force RHEL users to upgrade or install Python 2.5 themselves.

### (in reply to: ↑ 4 ; follow-up: ↓ 7 ) 05/17/11 02:39:47 changed by rjollos

I sympathize with RHEL users that it still runs Python 2.4, but note that Trac 0.13 will only support Python 2.5 and later,

Reference: t:TracInstall#MandatoryDependencies

### 05/17/11 08:40:20 changed by Blackhex

Maintaining Python 2.4 compatibility is not an issue here. The problem is that on all of my system I've Python 2.6 and 2.7 so I'm not much able to test it with Python 2.4 unless I prepare some virtual environment or machine with Python 2.4 which is something I want to avoid.

### (in reply to: ↑ 5 ; follow-up: ↓ 9 ) 05/17/11 13:54:19 changed by anonymous

I sympathize with RHEL users that it still runs Python 2.4, but note that Trac 0.13 will only support Python 2.5 and later,

Reference: t:TracInstall#MandatoryDependencies

In the reference you provide the dependencies for Trac 0.12 are python >=2.4 and <3.0. So, I do satisfy Trac 0.12.2 dependencies with python2.4 on my RHEL. While, I agree that later releases of Trac will use python>=2.5 (as Blackhex points out) the current stable release of Trac 0.12.2 is compatible with python2.4. In my experience many Trac environments are still deployed under enterprise systems (which by design lag in development by 3 years or so). For example my RHEL uses kernel 2.6.18, whereas my Debian uses 2.6.32. I am sure that next RHEL6 will use python2.5 or 2.6, but until then I have to work with 2.4. Thanks for your comments.

### 09/26/12 03:46:46 changed by rjollos

• owner changed from Blackhex to rjollos.
• status changed from assigned to new.
• description changed.

### (in reply to: ↑ 7 ) 09/26/12 03:51:01 changed by rjollos

• status changed from new to closed.
• resolution set to duplicate.

In the reference you provide the dependencies for Trac 0.12 are python >=2.4 and <3.0. So, I do satisfy Trac 0.12.2 dependencies with python2.4 on my RHEL. While, I agree that later releases of Trac will use python>=2.5 (as Blackhex points out) the current stable release of Trac 0.12.2 is compatible with python2.4. In my experience many Trac environments are still deployed under enterprise systems (which by design lag in development by 3 years or so). For example my RHEL uses kernel 2.6.18, whereas my Debian uses 2.6.32. I am sure that next RHEL6 will use python2.5 or 2.6, but until then I have to work with 2.4. Thanks for your comments.

I agree that Python 2.4 compatibility is still desirable, and it is something that I've aimed for with all the plugins I maintain. My point was just that you'll likely see support for Python 2.4 getting less and less, in general, due to Trac 1.0 requiring Python 2.5, in the same way that you'll see plugin support getting less and less for Trac 0.11 and 0.12.

If you generate a patch, please attach it to #8276. Thanks.

### 09/26/12 03:51:35 changed by rjollos

(In [12057]) Fixes #9963, Refs #9800, #8276, #8803, #9146: Added check in setup.py for minimum required Python version. Python 2.5 is currently required. Later, we'll aim to restore full Python 2.4 compatibility.

### Add/Change #8803 (TracDiscussion no longer works with Python2.4)

Change Properties