Bug 9494 - epilog not available in OptionParser in Python 2.4
Summary: epilog not available in OptionParser in Python 2.4
Status: RESOLVED WONTFIX
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Python (show other bugs)
Version: 4.0.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
: 9417 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-12-12 00:48 UTC by Jelmer Vernooij
Modified: 2013-11-02 02:58 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jelmer Vernooij 2012-12-12 00:48:07 UTC
in 8d4943dcf943dc83b9b663d3d025fb1a8dbcba86, the epilog argument is now specified to OptionParser. This argument is not available in Python 2.4.
Comment 1 Andrew Bartlett 2012-12-31 05:43:35 UTC
Jelmer,

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.
Comment 2 Andrew Bartlett 2012-12-31 05:50:48 UTC
*** Bug 9417 has been marked as a duplicate of this bug. ***
Comment 3 Matthias Dieter Wallnöfer 2013-02-03 17:28:19 UTC
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;
#endif

* The following shouldn't be even required for Python 2.4 (only < 2.4)

#ifndef Py_RETURN_NONE
#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
#endif
Comment 4 Jelmer Vernooij 2013-11-01 14:38:48 UTC
I think we decided to drop python2.4 support?
Comment 5 Andrew Bartlett 2013-11-02 02:58:16 UTC
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.