Edgewall Software
Modify

Opened 13 years ago

Closed 13 years ago

#6611 closed defect (fixed)

Version information nor available for older mod_python

Reported by: tjb@… Owned by: Christopher Lenz
Priority: normal Milestone: 0.11
Component: web frontend/mod_python Version: devel
Severity: critical Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

After updating our trac installation to changeset:6378, trac ceased to work for us. The apache log showed a mod_python error, along the lines of:

ImportError: Cannot import name version

Our environment is Suse Enterprise Linux 9, Apache 2.0.49, mod_python 3.1.3

Looking for help with mod_python shows that 'version' is only available form mod_python 3.2

I have reverted to a previous trac version (r6372), and all is OK.

Attachments (0)

Change History (4)

comment:1 by osimons, 13 years ago

Milestone: 0.11
Severity: normalcritical

A quick, simple fix (ignoring details about older versions):

  • trac/web/modpython_frontend.py

     
    2020import pkg_resources
    2121import urllib
    2222
    23 from mod_python import apache, version
     23from mod_python import apache
     24try:
     25    from mod_python import version
     26except:
     27    version = "< 3.2"
    2428
    2529from trac import __version__ as VERSION
    2630from trac.web.main import dispatch_request

comment:2 by Christian Boos, 13 years ago

Ok for the suggested fix. The important thing here is that we know whether people are using the recommended version (3.3.1) or an older one.

comment:3 by Christian Boos, 13 years ago

(oh, and I think it's better if it would be except ImportError: instead of just except:)

in reply to:  3 comment:4 by osimons, 13 years ago

Resolution: fixed
Status: newclosed

Replying to cboos:

(oh, and I think it's better if it would be except ImportError: instead of just except:)

Good point. Added and applied in [6382].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.