The Samba-Bugzilla – Bug 9494
epilog not available in OptionParser in Python 2.4
Last modified: 2013-11-02 02:58:16 UTC
in 8d4943dcf943dc83b9b663d3d025fb1a8dbcba86, the epilog argument is now specified to OptionParser. This argument is not available in Python 2.4.
Let's see how this pans out in terms of how many users complain. I guess we could write a wrapper that catches the (from memory TypeError) exception python 2.4 generates, and tries again without epilog, but if we can move our minimum python up to 2.5 it would make a lot of things simpler.
*** Bug 9417 has been marked as a duplicate of this bug. ***
I think the only reason to keep Python 2.4 compatibility is that it is the default for RHEL 5. But also in that case Python 2.6 is available as an optional package.
Also if we bump up to 2.5 we could get rid of plenty of duplicated boilerplate code.
* Required for Python <= 2.4
/* There's no Py_ssize_t in 2.4, apparently */
#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 5
typedef int Py_ssize_t;
typedef inquiry lenfunc;
typedef intargfunc ssizeargfunc;
* The following shouldn't be even required for Python 2.4 (only < 2.4)
#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
I think we decided to drop python2.4 support?
We did. Python 2.6 is available as an optional extra for the one platform people who raised this issue had, which was RHEL5 and derivatives.