#9086 closed defect (fixed)
not python2.6 compatible - not stable in trac0.12.2
Reported by: | anonymous | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | StractisticsPlugin |
Severity: | normal | Keywords: | trac0.12 python2.6 simplejson json |
Cc: | jan.kowalleck@…, kstyanos@… | Trac Release: | 0.12 |
Description
you are writing "If your python < 2.6, it requires simplejson" - but the source you are offering requires simplejson anyway, undepending any version of pyton.
you are writing about compatibility to trac0.12 on the projects site "2011-01-10: Trac 0.11 and 0.12 (trunk) compatible versions are now available. The Trac 0.10 version is no longer supported. " - this is not given; the plugin runs unstable and causes Internal Server Error from time to time or even "No handler matched request to /stractistics"
i took http://trac-hacks.org/changeset/latest/stractisticsplugin?old_path=/&filename=stractisticsplugin&format=zip as you wrote on the project's page, and compiled the trunk to an .egg to get this run in trac0.12.2 i made some changes to the trunc/stractistics/web_ui.py :
### this is line 33 # from http://stackoverflow.com/questions/712791/json-and-simplejson-module-differences-in-python try: import simplejson as json except ImportError: import json # changed any "simplejson" in this file to "json"
i installed as a plugin into the trac-folder running python 2.6
Attachments (0)
Change History (6)
comment:1 Changed 12 years ago by
Cc: | kstyanos@… added |
---|---|
Owner: | changed from dagomez to Ryan J Ollos |
Status: | new → assigned |
comment:2 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 Changed 12 years ago by
Please report back if you are able to test the latest version of the trunk. Thanks!
comment:5 Changed 12 years ago by
The simplejson
/json
fix is the same as that used in tracworkflowadminplugin/0.12/tracworkflowadmin/web_ui.py@11594. I think this is a good pattern to follow.
try: import json except ImportError: import simplejson as json
comment:6 Changed 12 years ago by
Keywords: | simplejson json added |
---|
Yes, the fix you propose is correct. I will commit the change shortly.