This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Check for readline 2.2 features
Type: Stage:
Components: Build Versions: Python 2.2
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: nnorwitz Nosy List: gvanrossum, mlh, nnorwitz
Priority: normal Keywords: patch

Created on 2002-12-30 01:22 by mlh, last changed 2022-04-10 16:06 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patch.txt mlh, 2002-12-30 01:23
configure_patch.txt mlh, 2002-12-30 02:11
readline_patch.txt mlh, 2002-12-30 02:11
Messages (7)
msg42146 - (view) Author: Magnus Lie Hetland (mlh) Date: 2002-12-30 01:22
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.
msg42147 - (view) Author: Magnus Lie Hetland (mlh) Date: 2002-12-30 02:11
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).
msg42148 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-12-30 16:27
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.
msg42149 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2003-02-12 22:16
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.)
msg42150 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-03-29 22:40
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
msg42151 - (view) Author: Magnus Lie Hetland (mlh) Date: 2003-03-30 01:13
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.
msg42152 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-03-30 19:42
Logged In: YES 
user_id=33168

Hmmm, I didn't realize I had to add
HAVE_RL_COMPLETION_APPEND_CHARACTER manually.

Checked in as: pyconfig.h.in 1.20.8.3
History
Date User Action Args
2022-04-10 16:06:04adminsetgithub: 37661
2002-12-30 01:22:02mlhcreate