Opened 13 years ago
Last modified 10 years ago
#8276 closed enhancement
PATCH: Python 2.4 compatibility. — at Version 9
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.
Change History (13)
Changed 13 years ago by
comment:1 Changed 13 years ago by
comment:2 Changed 13 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 13 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 13 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 13 years ago by
Just realized that. Will upload one. Look for run_on_python_24.patch attached to this ticket.
Changed 13 years ago by
Attachment: | run_on_python_24.patch added |
---|
Patch to allow plugin to run on Python version 2.4
comment:6 Changed 13 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 12 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 12 years ago by
Description: | modified (diff) |
---|
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.