Edgewall Software
Modify

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#3351 closed defect (fixed)

trac 0.9.5 not worked with python 2.5b1

Reported by: anonymous Owned by: Matthew Good
Priority: lowest Milestone: 0.9.7
Component: general Version: 0.9.5
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:

Description (last modified by Christian Boos)

su-3.00# trac-admin
Traceback (most recent call last):
  File "/usr/local/bin/trac-admin", line 21, in <module>
    from trac.scripts.admin import run
  File "/usr/local/lib/python2.5/site-packages/trac/scripts/admin.py", line 17
    from __future__ import generators
SyntaxError: from __future__ imports must occur at the beginning of the file

Attachments (0)

Change History (7)

comment:1 by Christian Boos, 14 years ago

Description: modified (diff)
Milestone: 0.9.6
Owner: changed from Jonas Borgström to Christian Boos
Priority: normallowest
Severity: normalminor

If you're willing to test the bleeding edge Python version, you should also have little problems trying out the latest of Trac (0.10dev), which is quite stable now (at least r3502, before the last bunch of Mimeview related refactorings).

comment:2 by Christopher Lenz, 14 years ago

Milestone: 0.9.7

#3377 has been marked as duplicate of this ticket.

comment:3 by kismet.sl@…, 14 years ago

On ticket #3377 cmlenz reports that the bug has been fixed on the trunk source, but looking by browse source to r3520 (that's the latest at the moment of writing) I found that both:

  • trunk
  • branches/0.9-stable

suffer from the reported bug

Stefano "Kismet" Lenzi

comment:4 by Christopher Lenz, 14 years ago

There are no __future__ statements in trunk AFAICT, so this doesn't apply to trunk. And as cboos said, we're not likely to fix this on 0.9-stable because you're more likely to upgrade Trac (pretty simple) than Python (not so much).

comment:5 by kismet.sl@…, 14 years ago

OK, I agree with you to not fix it for 0.9.X but I think that new release ( 0.10 and so on ) will need that easy fix.

Anyway, the problem is not releate to __future__ but as you can see to the patch that I have attached to #3377 the error is generated by the line 15 of file trac/scripts/admin.py that is:

__copyright__ = 'Copyright (c) 2003-2006 Edgewall Software'

Let me know what you think

Stefano "Kismet" Lenzi

in reply to:  5 comment:6 by Matthew Good, 14 years ago

Owner: changed from Christian Boos to Matthew Good
Status: newassigned

Replying to kismet.sl@gmail.com:

Anyway, the problem is not releate to __future__ but as you can see to the patch that I have attached to #3377 the error is generated by the line 15 of file trac/scripts/admin.py that is:

(summarizing our discussion on IRC): This is specific to importing from __future__ since it's a special module used to change the behavior of the Python parser. So, since it will affect the parsing of the rest of the module, the __future__ imports need to occur before other code.

This fix is so trivial I'll go ahead and commit it, but I think cboos and cmlenz are right that if there's much work needed to make Trac 0.9.x compatible with Python 2.5 it's not really worth it since 0.10 should be done before the Python release is finalized.

comment:7 by Matthew Good, 14 years ago

Resolution: fixed
Status: assignedclosed

Fixed in [3521].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Matthew Good.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from Matthew Good 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.