Modify

Opened 3 years ago

Closed 22 months ago

Last modified 22 months ago

#9146 closed defect (duplicate)

Cannot install the plugin in Trac-0.11.8dev_r10236-py2.4

Reported by: jackie.OpenSource@… Owned by: Blackhex
Priority: high Component: DiscussionPlugin
Severity: critical Keywords:
Cc: Trac Release: 0.11

Description (last modified by osimons)

[root@localhost]# python setup.py bdist_egg
running bdist_egg
running egg_info
writing requirements to TracDiscussion.egg-info/requires.txt
writing TracDiscussion.egg-info/PKG-INFO
writing top-level names to TracDiscussion.egg-info/top_level.txt
writing dependency_links to TracDiscussion.egg-info/dependency_links.txt
writing entry points to TracDiscussion.egg-info/entry_points.txt
writing manifest file 'TracDiscussion.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/tracdiscussion
copying build/lib/tracdiscussion/init.py -> build/bdist.linux-x86_64/egg/tracdiscussion
copying build/lib/tracdiscussion/notification.py -> build/bdist.linux-x86_64/egg/tracdiscussion
copying build/lib/tracdiscussion/core.py -> build/bdist.linux-x86_64/egg/tracdiscussion
copying build/lib/tracdiscussion/wiki.py -> build/bdist.linux-x86_64/egg/tracdiscussion
copying build/lib/tracdiscussion/__init__.py -> build/bdist.linux-x86_64/egg/tracdiscussion
creating build/bdist.linux-x86_64/egg/tracdiscussion/htdocs
creating build/bdist.linux-x86_64/egg/tracdiscussion/htdocs/js
copying build/lib/tracdiscussion/htdocs/js/discussion.js -> build/bdist.linux-x86_64/egg/tracdiscussion/htdocs/js
copying build/lib/tracdiscussion/htdocs/unsolved.png -> build/bdist.linux-x86_64/egg/tracdiscussion/htdocs
creating build/bdist.linux-x86_64/egg/tracdiscussion/htdocs/css
copying build/lib/tracdiscussion/htdocs/css/admin.css -> build/bdist.linux-x86_64/egg/tracdiscussion/htdocs/css
copying build/lib/tracdiscussion/htdocs/css/discussion.css -> build/bdist.linux-x86_64/egg/tracdiscussion/htdocs/css
copying build/lib/tracdiscussion/htdocs/solved.png -> build/bdist.linux-x86_64/egg/tracdiscussion/htdocs
copying build/lib/tracdiscussion/admin.py -> build/bdist.linux-x86_64/egg/tracdiscussion
creating build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/message-list.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/discussion-header.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/topic-list-compact.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/discussion-macros.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/topic.rss -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/wiki-discussion-header.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/wiki-discussion-denied.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/topic-invite-body.txt -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/admin-forum-list.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/topic-edit-attribute.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/wiki-discussion-missing.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/topic-unsubscribe.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/topic-subscribe.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/message-notify-body.txt -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/forum-invite-subject.txt -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/topic-notify-body.txt -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/topic-invite-subject.txt -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/message-notify-subject.txt -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/forum-invite-body.txt -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/discussion-footer.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/topic-add.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/forum-list.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/topic-move.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/topic-notify-subject.txt -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/forum-add.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/forum-unsubscribe.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/wiki-discussion-footer.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/forum.rss -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/topic-list-classic.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/wiki-message-list.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/forum-subscribe.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/topic-list.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/templates/admin-group-list.html -> build/bdist.linux-x86_64/egg/tracdiscussion/templates
copying build/lib/tracdiscussion/search.py -> build/bdist.linux-x86_64/egg/tracdiscussion
copying build/lib/tracdiscussion/ajax.py -> build/bdist.linux-x86_64/egg/tracdiscussion
copying build/lib/tracdiscussion/spamfilter.py -> build/bdist.linux-x86_64/egg/tracdiscussion
creating build/bdist.linux-x86_64/egg/tracdiscussion/db
copying build/lib/tracdiscussion/db/db5.py -> build/bdist.linux-x86_64/egg/tracdiscussion/db
copying build/lib/tracdiscussion/db/__init__.py -> build/bdist.linux-x86_64/egg/tracdiscussion/db
copying build/lib/tracdiscussion/db/db1.py -> build/bdist.linux-x86_64/egg/tracdiscussion/db
copying build/lib/tracdiscussion/db/db4.py -> build/bdist.linux-x86_64/egg/tracdiscussion/db
copying build/lib/tracdiscussion/db/db3.py -> build/bdist.linux-x86_64/egg/tracdiscussion/db
copying build/lib/tracdiscussion/db/db2.py -> build/bdist.linux-x86_64/egg/tracdiscussion/db
copying build/lib/tracdiscussion/tags.py -> build/bdist.linux-x86_64/egg/tracdiscussion
copying build/lib/tracdiscussion/api.py -> build/bdist.linux-x86_64/egg/tracdiscussion
copying build/lib/tracdiscussion/timeline.py -> build/bdist.linux-x86_64/egg/tracdiscussion
byte-compiling build/bdist.linux-x86_64/egg/tracdiscussion/init.py to init.pyc
byte-compiling build/bdist.linux-x86_64/egg/tracdiscussion/notification.py to notification.pyc
byte-compiling build/bdist.linux-x86_64/egg/tracdiscussion/core.py to core.pyc
byte-compiling build/bdist.linux-x86_64/egg/tracdiscussion/wiki.py to wiki.pyc
byte-compiling build/bdist.linux-x86_64/egg/tracdiscussion/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/tracdiscussion/admin.py to admin.pyc
byte-compiling build/bdist.linux-x86_64/egg/tracdiscussion/search.py to search.pyc
byte-compiling build/bdist.linux-x86_64/egg/tracdiscussion/ajax.py to ajax.pyc
byte-compiling build/bdist.linux-x86_64/egg/tracdiscussion/spamfilter.py to spamfilter.pyc
byte-compiling build/bdist.linux-x86_64/egg/tracdiscussion/db/db5.py to db5.pyc
byte-compiling build/bdist.linux-x86_64/egg/tracdiscussion/db/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/tracdiscussion/db/db1.py to db1.pyc
byte-compiling build/bdist.linux-x86_64/egg/tracdiscussion/db/db4.py to db4.pyc
byte-compiling build/bdist.linux-x86_64/egg/tracdiscussion/db/db3.py to db3.pyc
byte-compiling build/bdist.linux-x86_64/egg/tracdiscussion/db/db2.py to db2.pyc
byte-compiling build/bdist.linux-x86_64/egg/tracdiscussion/tags.py to tags.pyc
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 1120
    value = 1 if value in ('true', 'yes', True) else 0;
               ^
SyntaxError: invalid syntax
byte-compiling build/bdist.linux-x86_64/egg/tracdiscussion/timeline.py to timeline.pyc
  File "build/bdist.linux-x86_64/egg/tracdiscussion/timeline.py", line 70
    yield ('discussion solved' if 'solved' in topic['status']
                                ^
SyntaxError: invalid syntax
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying TracDiscussion.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying TracDiscussion.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying TracDiscussion.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying TracDiscussion.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying TracDiscussion.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying TracDiscussion.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/TracDiscussion-0.8_r9877-py2.4.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
[root@localhost]# 

Attachments (0)

Change History (4)

comment:1 Changed 3 years ago by osimons

  • Description modified (diff)

The x if y else z syntax is a feature of Python 2.5. Trac 0.11 require Python >= 2.3, while Trac 0.12 require Python >= 2.4. The syntax should not be used for any plugin version or branch that still target these two major versions.

The old equivalent is:

value = value in ('true', 'yes', True) and 1 or 0

Log shows 2 places using this syntax, but the second line is not complete so I cannot offer an alternative for that. Obviously same problem though.

comment:2 Changed 2 years ago by rjollos

Of relevance to this ticket, I created #9963 after this mailing list post.

comment:3 Changed 22 months ago by rjollos

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #8276. osimons, thank you for the hints.

comment:4 Changed 22 months ago by rjollos

(In [12057]) Fixes #9963, Refs #9800, #8276, #8803, #9146: Added check in setup.py for minimum required Python version. Python 2.5 is currently required. Later, we'll aim to restore full Python 2.4 compatibility.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from Blackhex. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.