[Patches] [ python-Patches-659834 ] Check for readline 2.2 features
SourceForge.net
noreply@sourceforge.net
Sat, 29 Mar 2003 17:13:44 -0800
Patches item #659834, was opened at 2002-12-30 02:22
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=659834&group_id=5470
Category: Build
Group: Python 2.2.x
Status: Closed
Resolution: Accepted
Priority: 5
Submitted By: Magnus Lie Hetland (mlh)
Assigned to: Neal Norwitz (nnorwitz)
Summary: Check for readline 2.2 features
Initial Comment:
This patch adds a snippet to configure.in,
to check whether
rl_completion_append_character
(which is used in Python
2.3) is available.
rl_prep_terminal is assumed to co-exist
with rl_completion_append_character.
It is assumed that
HAVE_RL_COMPLETION_APPEND_CHARACTER will be
used in readline.c to make it compatible with older versions of the
readline library.
----------------------------------------------------------------------
>Comment By: Magnus Lie Hetland (mlh)
Date: 2003-03-30 03:13
Message:
Logged In: YES
user_id=20535
I've now tested it with 2.2.3 (using the 2.2 maintenance branch,
which
had the revision numbers you cited) and it works nicely.
That is, my
old readline (readline 2.2, I think, although I couldn't
find the version
number this time around -- at least it doesn't
have the completer
character functionality) works. There is one thing I find a bit odd, though...
With the 2.3 version of this check, the following ends up in
pyconfig.h:
/* Define if you have readline 2.2 */
/* #undef
HAVE_RL_COMPLETION_APPEND_CHARACTER
*/
However, it isn't there when I use the 2.2 branch version. I guess
it shouldn't matter either way (it's uncommented anyway), but it seems
that the two versions behave differently, though... But since it all works,
it's a bit hard to find out what's "wrong", if anything...
Anyway, the
(tentative) verdict from me is that it works.
And just a final note:
This check is really sort of a "band aid" solution, since the behaviour of the
completer will differ, based on which readline version you have. Making
the default the same for readline 2.2 and readline 4.* and making it
configurable from Python for the newer versions might be better...
Although possibly not important enough to warrant the work.
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2003-03-29 23:40
Message:
Logged In: YES
user_id=33168
Magnus, it would be great if you could test 2.2.3 from CVS
too. I have checked in a change that builds and works with
newer versions of readline. I don't have readline v2.2.
Checked in as:
* configure 1.279.6.19
* configure.in 1.288.6.19
* Modules/readline.c 2.41.6.7
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2003-02-12 23:16
Message:
Logged In: YES
user_id=6380
I need a volunteer to backport this to 2.2 who can run an
older version of autoconf; the autoconf that I have
installed is too new to process the 2.2 configure.in file.
(The 2.3 version is already checked in.)
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2002-12-30 17:27
Message:
Logged In: YES
user_id=6380
Checked in. Thanks!
Hm, this should be backported to 2.2.3 too! So I'll keep it
open.
----------------------------------------------------------------------
Comment By: Magnus Lie Hetland (mlh)
Date: 2002-12-30 03:11
Message:
Logged In: YES
user_id=20535
New patch for configure.in (added a comment) and a patch
for
readline.c that uses
HAVE_RL_COMPLETION_APPEND_CHARACTER.
Tested
on Gentoo Linux with new readline (the new completion
behaviour
was preserved) and on Solaris with old readline (now compiles, with old
completion behaviour in place).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=659834&group_id=5470