[issue25660] tabs don't work correctly in python repl

2016-10-29 Thread Clément
Clément added the comment: Thanks Martin for the clarification! I'll leave it to you to decide whether there is something to fix here (I'll admit to not understanding much of that code). -- ___ Python tracker __

[issue25660] tabs don't work correctly in python repl

2016-10-28 Thread Martin Panter
Martin Panter added the comment: Clément: Yes, that sounds like the intended behaviour, at least when using Readline. Originally discussed in Issue 23441 and Issue 22086. (Though I think the change in behaviour when completion is called outside of Readline is a bug.) -- __

[issue25660] tabs don't work correctly in python repl

2016-10-26 Thread Clément
Clément added the comment: Could this commit be the reason why the attached code behaves differently in 2.7 and 3.5.2? This is the code used by Emacs' default Python mode to do completion; with it (python -i completion.py), pressing "tab" on a plain prompt offers candidates in Python 2.7, but

[issue25660] tabs don't work correctly in python repl

2016-03-02 Thread Berker Peksag
Changes by Berker Peksag : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue25660] tabs don't work correctly in python repl

2016-02-04 Thread Yury Selivanov
Yury Selivanov added the comment: Everything should be OK now (both broken tests and using rlcompleter on Windows). Please confirm. -- ___ Python tracker ___ __

[issue25660] tabs don't work correctly in python repl

2016-02-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 980ea968444c by Yury Selivanov in branch '3.5': Issue #25660: Fix a unittest and rlcompleter when readline isn't available https://hg.python.org/cpython/rev/980ea968444c -- ___ Python tracker

[issue25660] tabs don't work correctly in python repl

2016-02-04 Thread Yury Selivanov
Yury Selivanov added the comment: Berker, I'll fix the windows issue in a few hours. Sorry for breaking things. -- nosy: +Yury.Selivanov ___ Python tracker ___ __

[issue25660] tabs don't work correctly in python repl

2016-02-04 Thread Berker Peksag
Berker Peksag added the comment: Windows issue is a blocker so I suggest reverting 64417e7a1760. We could apply the same fix in readline.c for 3.5.x but it would probably be a bit hackish. -- ___ Python tracker __

[issue25660] tabs don't work correctly in python repl

2016-02-03 Thread Martin Panter
Martin Panter added the comment: See also the Windows buildbots, where the Readline module is not available, but “rlcompleter” still (used to) work. -- status: closed -> open ___ Python tracker ___

[issue25660] tabs don't work correctly in python repl

2016-02-03 Thread Berker Peksag
Berker Peksag added the comment: Thanks, Yury! Look like we forgot to update test_rcompleter: == FAIL: test_complete (test.test_rlcompleter.TestRlcompleter) --

[issue25660] tabs don't work correctly in python repl

2016-02-03 Thread Yury Selivanov
Yury Selivanov added the comment: > Let's apply this. Merged. Martin, Berker, and Ned, thanks for testing this patch out. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue25660] tabs don't work correctly in python repl

2016-02-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 64417e7a1760 by Yury Selivanov in branch '3.5': Issue #25660: Fix TAB key behaviour in REPL. https://hg.python.org/cpython/rev/64417e7a1760 New changeset 87dfadd61e0d by Yury Selivanov in branch 'default': Merge 3.5 (issue #25660) https://hg.python.

[issue25660] tabs don't work correctly in python repl

2016-02-03 Thread Ned Deily
Ned Deily added the comment: LGTM on OS X with both the system libedit and a MacPorts GNU readline. Let's apply this. -- ___ Python tracker ___

[issue25660] tabs don't work correctly in python repl

2016-02-03 Thread Berker Peksag
Berker Peksag added the comment: With rlcompleter.patch applied, I see the same behavior on my OS X (with libedit) and Ubuntu (with readline) systems. Thanks! -- nosy: +berker.peksag stage: patch review -> commit review ___ Python tracker

[issue25660] tabs don't work correctly in python repl

2015-11-26 Thread Martin Panter
Martin Panter added the comment: Yury or anyone else: can you confirm if the patch works properly with a proper OS X or BSD libedit (rather than my questionable Linux version?). If so, I think it is okay to ignore my Linux problems, and I could look at fixing the compatibility when the readlin

[issue25660] tabs don't work correctly in python repl

2015-11-24 Thread R. David Murray
R. David Murray added the comment: We try our best to support libedit, but support for it did come after readline, so there are issues with the support. However, if we are (as we are) enabling completion by default, I think that has to work with libedit, since that's what is used on OSX which

[issue25660] tabs don't work correctly in python repl

2015-11-23 Thread Martin Panter
Martin Panter added the comment: It seems to be the readline.redisplay() line that triggers the search mode. If I comment out that line, I am back to the 3.5 behaviour that adds extra lines. -- ___ Python tracker

[issue25660] tabs don't work correctly in python repl

2015-11-23 Thread Martin Panter
Martin Panter added the comment: Regarding the purpose of the “Readline completer” module, I agree it is inconvenient. But the documentation does say “without readline, the Completer class . . . can still be used”. I ran into this problem

[issue25660] tabs don't work correctly in python repl

2015-11-23 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue25660] tabs don't work correctly in python repl

2015-11-23 Thread Yury Selivanov
Yury Selivanov added the comment: > At least it is better in 3.5 and only affects one platform now, instead of > all of them. No, it affects any platform where CPython is compiled with libedit instead of readline. And even if it was one platform - OS X is big, bigger than Windows probably in

[issue25660] tabs don't work correctly in python repl

2015-11-23 Thread R. David Murray
R. David Murray added the comment: The thing is, when it is a regression it should be fixed before the release is issued, even if it is a more "minor" issue. Otherwise, especially in a x.y.1 release, we look pretty bad. However, this one had been broken in the field so long that rule doesn't

[issue25660] tabs don't work correctly in python repl

2015-11-21 Thread Larry Hastings
Changes by Larry Hastings : -- priority: release blocker -> normal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue25660] tabs don't work correctly in python repl

2015-11-21 Thread Larry Hastings
Larry Hastings added the comment: The "release blocker" priority level is inappropriate for nice-to-have features. Quoting PEP 101, the how-to-make-a-Python-release guide: release blocker - Stops the release dead in its tracks. You may not make any release with any o

[issue25660] tabs don't work correctly in python repl

2015-11-20 Thread Yury Selivanov
Yury Selivanov added the comment: > Sorry to throw a potential spanner in the works, but I think this introduces > a dependence on the readline module. Consider what happens when the Completer > class is used but Readline is not, or even if the “readline” could not be > imported (see bottom of

[issue25660] tabs don't work correctly in python repl

2015-11-20 Thread Martin Panter
Martin Panter added the comment: Didn’t mean to adjust priority -- priority: high -> release blocker ___ Python tracker ___ ___ Python

[issue25660] tabs don't work correctly in python repl

2015-11-20 Thread Martin Panter
Martin Panter added the comment: Sorry to throw a potential spanner in the works, but I think this introduces a dependence on the readline module. Consider what happens when the Completer class is used but Readline is not, or even if the “readline” could not be imported (see bottom of rlcomple

[issue25660] tabs don't work correctly in python repl

2015-11-20 Thread Yury Selivanov
Yury Selivanov added the comment: Can someone try the patch? I'm fairly confident it should work, and it'd be great to have it fixed in 3.5.1. -- priority: high -> release blocker ___ Python tracker _

[issue25660] tabs don't work correctly in python repl

2015-11-19 Thread Yury Selivanov
Yury Selivanov added the comment: Attached is a patch that uses different logic for tabulation. Instead of returning '\t' from the completion callback, it instead calls explicit readline API: "readline.insert_text('\t'); readline.redisplay()" Please review. -- keywords: +patch Added

[issue25660] tabs don't work correctly in python repl

2015-11-18 Thread Martin Panter
Martin Panter added the comment: I think this might just be a side effect of the way we abuse the tab completer to insert a literal tab (Issue 23441, revision 82ccdf2df5ac). If I change the code to insert the letter T instead of tabs: if not text.strip('T'): if state == 0: return t

[issue25660] tabs don't work correctly in python repl

2015-11-18 Thread Martin Panter
Martin Panter added the comment: Applying my patch at Issue 13501, then building with “autoreconf && ./configure --with-readline=editline”, I can reproduce the funny tab behaviour on Linux. -- ___ Python tracker _

[issue25660] tabs don't work correctly in python repl

2015-11-18 Thread Martin Panter
Martin Panter added the comment: David Beazley’s description of the bug: “hitting tab inserts spaces and a carriage return at the same time.” -- ___ Python tracker ___ _

[issue25660] tabs don't work correctly in python repl

2015-11-18 Thread Yury Selivanov
Yury Selivanov added the comment: > Is this related to the BSD editline library (libedit), or is the actual Gnu > Readline library being used? Apparently you can check for "libedit" in > readline.__doc__ to tell the difference. Great suggestion. So on my machine, macports version (no bug) is

[issue25660] tabs don't work correctly in python repl

2015-11-18 Thread Martin Panter
Martin Panter added the comment: Is this related to the BSD editline library (libedit), or is the actual Gnu Readline library being used? Apparently you can check for "libedit" in readline.__doc__ to tell the difference. -- nosy: +martin.panter ___

[issue25660] tabs don't work correctly in python repl

2015-11-18 Thread R. David Murray
R. David Murray added the comment: This was reported (on twitter) by David Beazly as well, as applying to the OSX downloaded from python.org. It works fine on linux for me. Is it readline-version dependent, or a bug in the readline shipped with OSX? -- components: +Macintosh nosy: +n

[issue25660] tabs don't work correctly in python repl

2015-11-18 Thread Yury Selivanov
New submission from Yury Selivanov: When Python is compiled with readline, repeatedly pressing key in repl breaks the repl prompt. Below is what I see when I hit 4 times. yury@ysmac ~/dev/py/cpython $ ./python.exe Python 3.5.0+ (3.5:4ae62ddf7bc7+, Nov 18 2015, 14:52:57) [GCC 4.2.