#8276 closed enhancement (fixed)
PATCH: Python 2.4 compatibility.
Reported by: | Owned by: | Radek Bartoň | |
---|---|---|---|
Priority: | low | Component: | DiscussionPlugin |
Severity: | normal | Keywords: | patch |
Cc: | Trac Release: | 0.11 |
Description (last modified by )
On build or install (python setup.py bdist_eng) I get the following error for a number of items. Start of log snippet
byte-compiling build/bdist.linux-x86_64/egg/tracdiscussion/api.py to api.pyc File "build/bdist.linux-x86_64/egg/tracdiscussion/api.py", line 1334 'where' : 'WHERE ' + where if where else ''} ^ SyntaxError: invalid syntax
Running this on RHEL 3.4 x64 with python 2.4 - revision 9598.
Attachments (4)
Change History (20)
Changed 14 years ago by
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Thank you for pointing this out. I'll mention it on the wiki page rather than fixing it. BTW: Attaching a patch would be more appreciated by potential users that has to use older Python versions.
comment:3 follow-up: 4 Changed 14 years ago by
Updated api.py is attached to this ticket. I'm not a python guru (I'm more a java guy) so I'm sure this is a more elegant way to fix but the api.py file attached to this ticket was compiled and runs on python 2.4. I'm note a registered user so can't create a proper patch.
comment:4 Changed 14 years ago by
Replying to anonymous:
I'm note a registered user so can't create a proper patch.
Registration is not required to checkout a project branch. You can then use svn diff
and output to a file.
comment:5 Changed 14 years ago by
Just realized that. Will upload one. Look for run_on_python_24.patch attached to this ticket.
Changed 14 years ago by
Attachment: | run_on_python_24.patch added |
---|
Patch to allow plugin to run on Python version 2.4
comment:6 Changed 14 years ago by
Keywords: | patch added |
---|---|
Priority: | normal → low |
Resolution: | wontfix |
Status: | closed → reopened |
Summary: | Compile Error of api.py for 0.11 → PATCH: Python 2.4 compatibility. |
Type: | defect → enhancement |
Thank you.
comment:7 follow-up: 8 Changed 13 years ago by
I am using the following patches for Python 2.4 compatibility:
trac-discussion-plugin/trac-discussion-plugin.no-ifelse-api-01.patch trac-discussion-plugin/trac-discussion-plugin.no-ifelse-timeline-01.patch
Prebuilt packages for CentOS-5 / RHEL5 can be downloaded from the Open Build Service at https://build.opensuse.org/package/show?package=trac-discussion-plugin&project=home%3Aguidod%3Atrac12
Changed 13 years ago by
Attachment: | trac-discussion-plugin.no-ifelse-api-01.patch added |
---|
Changed 13 years ago by
Attachment: | trac-discussion-plugin.no-ifelse-timeline-01.patch added |
---|
comment:8 Changed 13 years ago by
Replying to guidod:
I am using the following patches for Python 2.4 compatibility:
trac-discussion-plugin/trac-discussion-plugin.no-ifelse-api-01.patch trac-discussion-plugin/trac-discussion-plugin.no-ifelse-timeline-01.patch
Prebuilt packages for CentOS-5 / RHEL5 can be downloaded from the Open Build Service at https://build.opensuse.org/package/show?package=trac-discussion-plugin&project=home%3Aguidod%3Atrac12
Unfortunately, there is more python2.5 style code in the plugin. Here is an example error message with the line number:
TemplateSyntaxError: invalid syntax (/usr/lib/python2.4/site-packages/tracdiscussion/templates/discussion-macros.html, line 55)
comment:9 Changed 13 years ago by
Description: | modified (diff) |
---|
comment:12 follow-up: 13 Changed 12 years ago by
comment:13 Changed 11 years ago by
comment:14 Changed 11 years ago by
Trying to pull changes from the resource advertised by guidod I see, that trac-discussion-plugin.no-ifelse-timeline-01.patch
changes is essentially what I've already spotted and fixed in [13882] before.
However the more extensive trac-discussion-plugin.no-ifelse-api-01.patch
changeset is still a very valuable contribution.
comment:16 Changed 11 years ago by
Since I failed to do a manual full install of Python2.4 (couldn't fix missing zlib
) I could only do a load test for all modules. Please re-open this ticket in case we need more things to get fixed.
Realized this problem was due to use of python 2.5 inline conditionals. Suggest the docs get updated to indicate python 2.5 is a prereq or use the api.py I've addition.