[New-bugs-announce] [issue10666] OS X installer variants have confusing readline differences

Ned Deily report at bugs.python.org
Thu Dec 9 22:44:26 CET 2010

New submission from Ned Deily <nad at acm.org>:

32-bit-only OS X installers build and link to a copy of the GNU readline library for use by the readline module in the standard library.  But, the newer 64-bit/32-bit installer variants for 2.7 and 3.2 link to the OS X supplied BSD editline (libedit) library using its GNU readline compatibility interface.  This creates a confusing situation for users: depending on which installer variant is used for 2.7 or 3.2, the commands needed to enable things like tab completion.

Here's a snippet of what I have in my startup file:

    import readline
    import rlcompleter
    if 'libedit' in readline.__doc__:
        readline.parse_and_bind("bind ^I rl_complete")
        readline.parse_and_bind("tab: complete")

While obviously this can be handled, it seems like an unnecessary burden on users.  I think the primary reason for adding the editline support was to make it simpler for developers building their own Pythons.  That's not a concern for the installer build.  Another concern may have been to avoid shipping a copy of GNU readline which is GPL-licensed.  (The installer currently, to the best of my knowledge, does not document in a README or elsewhere that GNU readline is included.)  That seems a problem.  This disparity also could cause problems elsewhere (see Issue5845).

I see two solutions:

1. (trivial) Change the installer to always build and include GNU readline regardless of SDK (today, editline is used with builds using SDK 10.5 or higher).  

2. (TBD) Build and link with the open-source version of editline for all installers.

In either case, the installer should include license info on included 3rd-party libraries somewhere in the installer README and/or installed files.

assignee: ronaldoussoren
components: Build, Macintosh
messages: 123701
nosy: ned.deily, ronaldoussoren
priority: high
severity: normal
stage: needs patch
status: open
title: OS X installer variants have confusing readline differences
type: behavior
versions: Python 2.7, Python 3.2

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list