Upgrading from 1.4.20 to 2.0 gives error with values stored as long in database

Martin Östlund <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <[email protected]>
Hello,

I have been tasked with upgrading our  old Roundup instance, currently 
running roundup 1.4.20 with python 2.6.6 and postgresql 8.4.20
Im moving this to a new server running python 3.6.8 and postgresql 10.17.

My procedure was that I installed a new server and installed roundup 
1.4.20 with the database from the currently running instance, and 
started working my way through the upgrade documentation at 
https://roundup.sourceforge.io/docs/upgrading.html

Everything in html/, extensions/ and detectors/ are pretty much done, 
but now I stumbled upon a problem I've not been able to find a way to 
solve, so I'm reaching out here to see if you have any clues (I didnt 
find any in the documentation or any other list posts either).

It seems to be a problem with displaying history, for example
/tracker/user7 would give a stacktrace

Templating Error
<class 'SyntaxError'>: invalid syntax (<string>, line 1)
Debugging information follows

1. While evaluating the standard:'context/history' expression on line 180

...

2. A problem occurred in your template "user.item.html".

Redacted stacktrace to last few lines:
   File 
"/usr/local/lib/python3.6/site-packages/roundup/cgi/templating.py", line 
1064, in history
     history = self._klass.history(self._nodeid, skipquiet=(not showall))
   File "/usr/local/lib/python3.6/site-packages/roundup/hyperdb.py", 
line 1237, in history
     for j in self.db.getjournal(self.classname, nodeid):
   File 
"/usr/local/lib/python3.6/site-packages/roundup/backends/rdbms_common.py", 
line 1400, in getjournal
     params = eval_import(params)
   File 
"/usr/local/lib/python3.6/site-packages/roundup/anypy/strings.py", line 
145, in eval_import
     v = eval(s)
   File "<string>", line 1
     ('issue', 5027L, 'assignedto')
                   ^
SyntaxError: invalid syntax

I googled and found out that in python2 long integer literals were 
indicated with an l or L suffix. In Python 3, ints and longs have been 
merged into just int, which functions pretty much like long used to.

I can see in postgresql that I indeed have values stored with L suffix.

Someone on #roundup thought it would be worth to try to use 
roundup-admin -i <tracker dir> exporrtables on v1.6.0 and then same 
with importabbled with 2.0.0, but that gave me the same kind of error 
when trying to import the tables back:

[roundup@intlab ~]$ /usr/local/bin/roundup-admin -i 
/opt/roundup/trackers/cendio-tracker importtables ./export_tables_1.6.0

Traceback (most recent call last):
   File "/usr/local/lib/python3.6/site-packages/roundup/admin.py", line 
1658, in run_command
     ret = function(args[1:])
   File "/usr/local/lib/python3.6/site-packages/roundup/admin.py", line 
1435, in do_importtables
     return self.do_import(args, import_files=False)
   File "/usr/local/lib/python3.6/site-packages/roundup/admin.py", line 
1418, in do_import
     cl.import_journals(reader)
   File "/usr/local/lib/python3.6/site-packages/roundup/hyperdb.py", 
line 1758, in import_journals
     nodeid, jdate, user, action, params = map(eval_import, l)
   File 
"/usr/local/lib/python3.6/site-packages/roundup/anypy/strings.py", line 
145, in eval_import
     v = eval(s)
   File "<string>", line 1
     ('issue', 5008L, 'status')

Has anyone experienced this? Im not really sure what to do from here..?

With best regards,

Martin Östlund



_______________________________________________
Roundup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/roundup-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.