ISFDB talk:Personal Linux Website

Jump to navigation Jump to search

How hard is the dependency on Python 2.5.4 versus later Python 2.x.y versions?

Finally decided to try getting the full version of ISFDB (rather than just the DB) running locally, but I'm having a bit of pain getting Python 2.5.4 working. The platform I'm using is Fedora 26, which itself is pretty crusty these days, but ships with Python 2.7.15 (and Python 3.6.5, but lets not go there just yet...).

As far as I can see, does not provide binaries for Linux, and nor can I see any pre-built packages in the Fedora or third-party repositories. Building from source seems to have problems that aren't immediately obvious, seemingly related to SSL/crypto library versions.

Perhaps this issue can be resolved without too much more effort, but I've only gotten to this point after a fair bit of yak-shaving already, and I'm not sure much more pain I care to put myself through - especially if it might turn out to be unnecessary, and 2.7.x works OK?

I did actually migrate some code from Python 2.5 to Python 2.7 a few years ago, and my vague recollection is that the language version issues were trivial to non-existent, and all the pain points were due to changes in the underlying platform (Google App Engine) and its APIs.

NB: I'm not asking for help in getting this working in my environment, and I appreciate that no-one's going to upgrade the live site and dev practices without proper investigation and testing, but I'm just wondering how much of that might already have been done?

ErsatzCulture 12:52, 30 September 2019 (EDT)

I am afraid I don't know the answer. When I took over development in 2009, I tried Python 2.6 and it didn't work. I didn't dig too deep and I don't remember the details, only the outcome. It's entirely possible that the problems were minor and I simply didn't know enough about Python to fix them.
The upgrade to 2.7 (SR 142) has been on my list of things to do for a long time, but there have always been higher priority issues to tackle. Perhaps now that we have multiple editors and moderators working on Fixer (our data acquisition robot), I will have more time to work on it. Ahasuerus 19:55, 30 September 2019 (EDT)
OK, I'll give it a go with 2.7 later - worst case, I'll try to either fix the issues I see and/or document them on that ticket. ErsatzCulture 05:35, 1 October 2019 (EDT)
Thanks! Ahasuerus 10:54, 1 October 2019 (EDT)
So, I just got around to installing the s/w on my machine running Python 2.7.15 and ..... everything seems to be working with no issues? I've clicked around on a handful of random pages, and done a couple of test edits (nice to finally see the mod view of things :-) and they were all fine. ErsatzCulture 08:04, 2 October 2019 (EDT)
That's great news! So much of the software has changed since 2009 that it's possible that whatever incompatibilities existed at the time have been refactored away. It's also possible that Python 2.7.x was made more backward compatible than 2.6.x since it was going to be the "end of the line" for Python 2.x. Then again, perhaps I simply messed up when I tried 2.6 in 2009 since I was very new to Python at the time. Ahasuerus 12:02, 2 October 2019 (EDT)
In fact, it was a bit surprised to see the stats pages pages I tried showing data; I assumed they'd be blank or show errors given that I haven't run the cron jobs. (Without looking at the code I'm guessing they maybe generate the data on demand and cache it for 24 hours?) ErsatzCulture 08:04, 2 October 2019 (EDT)
Pretty much. The nightly cron job rebuilds a bunch of stats and "cleanup reports" tables, which the publicly available backup files include. They also include purged versions of user tables so you don't get errors. It's pretty much a complete package except for the Wiki tables, some security tables and the monster table where all submissions going back to 2006 are stored. Ahasuerus 12:02, 2 October 2019 (EDT)
I've checked the Apache logs, but there are no errors or warnings there. Am I missing something obvious, or are there any particular places I should be looking at for errors? (Glancing at access timestamps in /var/www/cgi-bin/*.cgi, it looks like I've only tried ~20 scripts/pages out of 77 so far.) ErsatzCulture 08:04, 2 October 2019 (EDT)
Nothing comes to mind at the moment. Of course, we'll need to test all submission types (see "SUBMAP" in common/, run the nightly process, etc before we can be sure, but it sounds promising. Many thanks! Ahasuerus 12:02, 2 October 2019 (EDT)