Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#9086 closed defect (fixed)

not python2.6 compatible - not stable in trac0.12.2

Reported by: anonymous Owned by: rjollos
Priority: normal Component: StractisticsPlugin
Severity: normal Keywords: trac0.12 python2.6 simplejson json
Cc: jan.kowalleck@…, kstyanos@… Trac Release: 0.12


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 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/ :

### this is line 33
# from
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 3 years ago by rjollos

  • Cc kstyanos@… added
  • Owner changed from dagomez to rjollos
  • Status changed from new to assigned

Yes, the fix you propose is correct. I will commit the change shortly.

comment:2 Changed 3 years ago by rjollos

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [11967]) Fixes #9086:

  • JSON package is used when available (Python 2.6+), otherwise SimpleJSON is used.
  • Removed unused imports.
  • Added a changelog.
  • Modified package entry point.
  • Converted tabs to spaces. The source code consistently uses spaces now.

comment:3 Changed 3 years ago by rjollos

Please report back if you are able to test the latest version of the trunk. Thanks!

comment:4 Changed 3 years ago by rjollos

#10290 closed as a duplicate.

comment:5 Changed 3 years ago by rjollos

The simplejson/json fix is the same as that used in tracworkflowadminplugin/0.12/tracworkflowadmin/ I think this is a good pattern to follow.

    import json 
except ImportError: 
    import simplejson as json 

comment:6 Changed 3 years ago by rjollos

  • Keywords simplejson json added

Add Comment

Modify Ticket

as closed The owner will remain rjollos.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.