= Description = On Solaris on Sparc you can have a usec value too long to be converted from a long to an int. The macro {{{RecentChanges}}} in v1.3.1 tries to cast a usec value to int at one point; removing the cast seems to fix it. /!\ The real fix is ''not'' to remove int() but to change it to long(). This is only needed if you run on Python 2.2. It works "as is" on Python >= 2.3. == Steps to reproduce == ## Describe the steps needed to reproduce the bug. If we can't reproduce it, we probably can't fix it. 1. install a fresh 1.3.1 on a Solaris/Sparc server 1. create a new instance 1. go to the {{{RecentChanges}}} page 1. get a backtrace pointing to an overflow error while converting int to long at line 86 of {{{$PREFIX/lib/pythonX.Y/site-packages/MoinMoin/macro/RecentChanges.py}}} == Example == ##Add URL that show the bug, screenshot or test wiki markup that fail... ##URL: ##attachment:screenshot.png ##{{{ ##Example wiki markup that fail ##}}} {{{ [[RecentChanges]] }}} == Details == ## if the bug is in this wiki, just kill the table and write: This Wiki. ## Describe your environment ## example: moin 1.3.0, Mac OS X 10.3.3, Python 2.3.0, Apache 2.0.48 with mod_python 3.1.2b, using SSL and Authentication || '''!MoinMoin Version''' || 1.3.1 || || '''OS and Version''' || Solaris 9 on Sparc || || '''Python Version''' || 2.2.1 || || '''Server Setup''' || Apache 1.3 || || '''Server Details''' || CGI invocation || == Workaround == ## How to deal with the bug until it is fixed Apply the following patch to {{{$PREFIX/lib/pythonX.Y/site-packages/MoinMoin/macro/RecentChanges.py}}}: {{{ @@ -83,7 +83,7 @@ def format_page_edits(macro, lines, book # print time of change d['time_html'] = None if request.cfg.changed_time_fmt: - tdiff = long(tnow - wikiutil.version2timestamp(int(line.ed_time_usecs))) / 60 # has to be long for py 2.2.x + tdiff = long(tnow - wikiutil.version2timestamp(long(line.ed_time_usecs))) / 60 # has to be long for py 2.2.x if tdiff < 1440: d['time_html'] = _("%(hours)dh %(mins)dm ago") % { 'hours': int(tdiff/60), 'mins': tdiff%60} }}} = Discussion = = Plan = ## This part is for Moin``Moin developers: * Priority: * Assigned to: * Status: this is already fixed in tla ---- ## When the bug is fixed, replace the category to Category MoinMoinBugFixed ## If this is not a bug, replace with Category MoinMoinNoBug CategoryMoinMoinBugFixed