Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readline update #50083

Closed
jrevans1 mannequin opened this issue Apr 24, 2009 · 14 comments
Closed

readline update #50083

jrevans1 mannequin opened this issue Apr 24, 2009 · 14 comments
Labels
extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error

Comments

@jrevans1
Copy link
Mannequin

jrevans1 mannequin commented Apr 24, 2009

BPO 5833
Nosy @terryjreedy, @doko42, @pitrou, @sandrotosi
Files
  • Python.patch
  • python-2.6-readline.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2014-08-29.21:16:22.327>
    created_at = <Date 2009-04-24.20:46:32.748>
    labels = ['extension-modules', 'type-bug']
    title = 'readline update'
    updated_at = <Date 2014-08-29.21:16:22.325>
    user = 'https://bugs.python.org/jrevans1'

    bugs.python.org fields:

    activity = <Date 2014-08-29.21:16:22.325>
    actor = 'terry.reedy'
    assignee = 'none'
    closed = True
    closed_date = <Date 2014-08-29.21:16:22.327>
    closer = 'terry.reedy'
    components = ['Extension Modules']
    creation = <Date 2009-04-24.20:46:32.748>
    creator = 'jrevans1'
    dependencies = []
    files = ['13760', '14599']
    hgrepos = []
    issue_num = 5833
    keywords = ['patch']
    message_count = 14.0
    messages = ['86432', '90978', '90981', '90996', '91066', '94248', '94560', '95476', '95479', '128229', '128306', '128319', '224189', '226086']
    nosy_count = 7.0
    nosy_names = ['terry.reedy', 'doko', 'pitrou', 'spatz', 'jrevans1', 'sandro.tosi', 'BreamoreBoy']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue5833'
    versions = ['Python 2.6', 'Python 3.1', 'Python 2.7', 'Python 3.2']

    @jrevans1
    Copy link
    Mannequin Author

    jrevans1 mannequin commented Apr 24, 2009

    Attached is a patch file that will update the readline functionality of
    python in the following ways:
    -- makes the tab-expand module be compatible with readline v6.x (fixes
    the annoying extra-space bug)
    -- removes '~$-/' from the completer chars list to make the next item work
    -- adds filename completion to the completer, this is useful whenever a
    filename/path is used
    -- allows expansion to work properly on ClassType objects

    @jrevans1 jrevans1 mannequin added the extension-modules C modules in the Modules dir label Apr 24, 2009
    @spatz
    Copy link
    Mannequin

    spatz mannequin commented Jul 27, 2009

    This bug was reported in Arch (http://bugs.archlinux.org/task/15548) and
    Gentoo (https://bugs.gentoo.org/show_bug.cgi?id=279234)

    @pitrou
    Copy link
    Member

    pitrou commented Jul 27, 2009

    The patch should be broken into several, one for each bug fix or
    enhancement.

    Remarks and questions:

    • is the readline v6.x fix (which I'm interested in) compatible with
      previous readline versions?
    • what does "removes '~$-/' from the completer chars list to make the
      next item work" mean exactly? is it a bugfix or a new feature?
    • I'm not sure filename completion is uncontroversial, it's the kind of
      advanced features which we usually let third-party tools (e.g. IPython)
      handle if they want to; it may also cause spurious IOs and error messages

    @pitrou pitrou added the type-bug An unexpected behavior, bug, or error label Jul 27, 2009
    @jrevans1
    Copy link
    Mannequin Author

    jrevans1 mannequin commented Jul 27, 2009

    Some clarification about the rest of the patch:

    -- We tested the readline fix with version 5.2 and it seemed to work, we
    did not do a thorough test with it, or with any other version.

    -- When I supplied the patch I supplied the patch that we use when
    building python, which also included some enhancements/bug fixes
    (depending on how you look at it). By removing the '~$-/' characters
    from the completer list it allows the user to perform file name
    completion (with the provided file name completion code). The file name
    completion code has been very rigorously tested. We have been using it
    at our company for the past 10 years with >100 users and have had no
    problems with it.

    -- We put this here since it never really seemed to be an advanced
    feature since readline completion will complete file names on the
    command-line as well. This seemed like a relatively low-level fix that
    makes the python tab-expansion facility fully usable instead of just
    partly usable.

    If you would like me to resubmit the patch as smaller components I can
    do that as well.

    @spatz
    Copy link
    Mannequin

    spatz mannequin commented Jul 29, 2009

    Arch Linux devs have split the patch and applied only the extra-space
    fix, which is what I'm attaching now. I've compiled Python 2.6.2 on
    Gentoo with this patch and can report it works well (I tested with ipython).

    @pitrou
    Copy link
    Member

    pitrou commented Oct 19, 2009

    I've committed the readline 6.0 fix to trunk, py3k and 3.1. I'll commit
    it to 2.6 when the branch is unfrozen.

    @pitrou
    Copy link
    Member

    pitrou commented Oct 27, 2009

    Now backported to py3k in r75747.

    @doko42
    Copy link
    Member

    doko42 commented Nov 19, 2009

    msg94560 should read "backported to the 2.6 branch". can we close the
    report?

    @pitrou
    Copy link
    Member

    pitrou commented Nov 19, 2009

    Can we close the report?

    Well there's something else in the original patch, although I don't care
    about it.

    @sandrotosi
    Copy link
    Contributor

    How should we move forward with this issue?
    J Evens: are you willing to split the patch in smaller ones that can be more easily managed/reviewed/applied?
    Antoine: do you think it's worth the effort?

    I can also try to split the patch, but what branch should I target: py3k?

    @pitrou
    Copy link
    Member

    pitrou commented Feb 10, 2011

    Antoine: do you think it's worth the effort?

    As mentioned above, the readline 6 compatibility code was checked in.
    The ClassType expansion is 2.x-only, so probably can't go in since it's a feature request.
    What remains is the filename expansion. However, the problem is that it seems to rely on removing '~$-/' from the word break characters, which is IMO wrong (at least '-', '/' and '~' are all Python operators which should be considered word break characters).

    @jrevans1
    Copy link
    Mannequin Author

    jrevans1 mannequin commented Feb 10, 2011

    I have no problem splitting the patch into multiple files. When I do so, do I place them here or open separate tickets for each component?

    Or if you guys want to just close out the ticket since the actual bug was fixed, I am okay with that too. We will probably continue to use the patched version of tabexpand for our users since the filename expansion is used quite heavily. And since we will not be transitioning to py3k anytime in the next several years, we have no issue with what is (or is not) implemented there.

    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Jul 28, 2014

    Looking at msg128306 and msg128319 I believe this can be closed.

    @terryjreedy
    Copy link
    Member

    Bug was fixed. Enhancements are out of date for 2.x and OP will not pursue for 3.x, and should be a separate issue anyway.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants