From: Olly B. <ol...@su...> - 2011-12-05 09:51:32
|
On 2011-11-29, William S Fulton <ws...@fu...> wrote: > On 29/11/11 05:31, ol...@us... wrote: >> - PyErr_SetString(errtype, (char *) msg); >> + PyErr_SetString(errtype, msg); > > I think these casts are needed for older versions of python which had > the methods declared as taking char * instead of const char *. Can > someone please check who has some of the older versions of python > installed, so we can determine which versions will break and so we can > decide if we should deliberately break these older versions, especially > as this patch just removes some warnings using some additional gcc > warnings. Similarly for the recent perl changes Olly put in from a > similar Debian bug report. I checked in both cases before making the changes (by looking at documentation and/or headers for older releases), and they should work for all versions the SWIG documentation suggests might work (i.e. Python >= 2.0, Perl >= 5.6). Personally I think we should set more realistic minimum versions (the last Python 2.0.x release was more than 10 years ago; the last Perl 5.6.x release was more than 8 years ago). I don't think it is realistic to expect developers to test with these versions - you'd need to build from source on a modern Linux distro, which is pain to start with, and you're likely to need to patch the source to get it to build which is more of a pain (at least this was my experience with old Perl versions last time this issue came up). The alternative is to install an entire obsolete OS version... But users really won't be trying to use these versions anyway, for much the same reasons. We have a backlog of things which need doing, and it's better to focus limited developer time on better support for current versions. Here are the versions of a few of the languages SWIG has backends for in the oldest supported release of each of the longer-lived Linux distros: Debian Ubuntu oldstable 8.04 LTS RHEL 4 RHEL 5 2009-02-14 2008-04-24 2005-02-14 2007-03-15 Perl 5.10.0 5.8.8 5.8.5 5.8.8 Python 2.5.2 2.5.2 2.3.4 2.4.3 PHP 5.2.6 5.2.4 4.3.9 5.1.6 Ruby 1.8.7 1.8.6 1.8.1 1.8.5 We dropped PHP4 support some time ago (it's had no security support for over 3 years, which is a particular concern for a web programming language with a patchy security track record), but for PHP5 it's pretty clear that PHP 5.0 is no longer of interest, while Perl 5.8, Python 2.3, and Ruby 1.8 are conservative choices for minimum versions to support. Cheers, Olly |