Submitted by : betabug at: 2007-09-02T03:42:07-07:00 (13 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

Apparently sorted() is a builtin starting from Python 2.4 only. When trying to "save" an edit on Zope 2.8 with Zwiki 0.60 RC 1, I get the following traceback:

File "/Users/betabug/zope/turtle/Products/ZWiki/", line 313, in edit
  subtopics=subtopics) # creating a page
File "/Users/betabug/zope/turtle/Products/ZWiki/", line 110, in create
File "/Users/betabug/zope/turtle/Products/ZWiki/", line 167, in ensureMyRevisionNumberIsLatest
  oldrevs = self.oldRevisionNumbers()
File "/Users/betabug/zope/turtle/Products/ZWiki/", line 133, in oldRevisionNumbers
  return sorted([r.revisionNumber() for r in self.oldRevisions()])
NameError: global name 'sorted' is not defined

Relevant links:

NameError?: sorted on Zope 2.8 (due to Python 2.3.5) --betabug, Sun, 02 Sep 2007 08:42:59 -0700 reply

Moving the test / workaround if not safe_hasattr(__builtins__,'sorted'): to helps. Is there something else that needs it in or should there be some kind of import into

Is Zope 2.8 still supported? It seems that the tests don't run either. Delete that, they never did, but Zwiki of course works with 2.8 just fine.

fixed in darcs --simon, Wed, 05 Sep 2007 11:03:00 -0700 reply

Severity: normal => serious Status: open => closed

Should be fine, but confirmation would be great.

fix works for me --betabug, Thu, 06 Sep 2007 10:19:42 -0700 reply

The fix works fine here on my Zope 2.8 test instance.