[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-15 Thread Martin Panter
Martin Panter added the comment: Looks like I have ironed all the bugs out. These OS bugs/quirks have already been documented in the Python bug tracker: 1. kqueue() incompatible with PTYs on OS X < 10.9 and Open BSD (Issue Issue 20365, Issue 20667 respectively) 2. poll() also incompatible

[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset daaead1dc3e0 by Martin Panter in branch 'default': Issue #26870: Poll() also fails on OS X; try select() https://hg.python.org/cpython/rev/daaead1dc3e0 -- ___ Python tracker

[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 816e1fe72c1e by Martin Panter in branch 'default': Issue #26870: Avoid using kqueue() with pseudo-terminals https://hg.python.org/cpython/rev/816e1fe72c1e -- ___ Python tracker

[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-15 Thread Martin Panter
Martin Panter added the comment: Unfortunately, I think my debugging messages needed a flush() call to be effective when the deadlock happens. So the test is failing on three buildbots: * AMD64 Snow Leop 3.x: stuck at Lib/subprocess.py:1612, os.waitpid() waiting for child to exit * x86

[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset b8b2c5cc7e9d by Martin Panter in branch 'default': Issue #26870: Temporary debugging for OS X Snow Leopard lockup https://hg.python.org/cpython/rev/b8b2c5cc7e9d -- ___ Python tracker

[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-14 Thread Martin Panter
Martin Panter added the comment: Yes 3.5 and 2.7 are open for documentation fixes. As long as there are no major differences, it is usually easier to make one patch against 3.5 or 3.6, and then I can fix any minor differences when applying it to 2.7. -- versions: +Python 2.7, Python

[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-14 Thread Tyler Crompton
Tyler Crompton added the comment: I suppose the only thing that could be left is adding remarks in the documentations for previous versions. If I understand correctly, this would only be added to the documentations for Python 2.7 and 3.5. Is this correct? Since this is the first issue in

[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-14 Thread Martin Panter
Martin Panter added the comment: My test locked up on an OS X buildbot : Timeout (0:15:00)! Thread 0x7fff71296cc0 (most recent call first): File

[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 27a49daf7925 by Martin Panter in branch 'default': Issue #26870: Close pty master in case of exception https://hg.python.org/cpython/rev/27a49daf7925 -- ___ Python tracker

[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4195fa81b188 by Martin Panter in branch 'default': Issue #26870: Add readline.set_auto_history(), originally by Tyler Crompton https://hg.python.org/cpython/rev/4195fa81b188 -- nosy: +python-dev ___

[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-13 Thread Martin Panter
Martin Panter added the comment: Thankyou for testing this Meador, it increases my confidence in my code. I’ll try to commit this soon if there are no objections. -- stage: patch review -> commit review ___ Python tracker

[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-09 Thread Meador Inge
Meador Inge added the comment: Works fine on Darwin (OS X Yosemite 10.10.5): drago:cpython meadori$ uname -a Darwin drago 14.5.0 Darwin Kernel Version 14.5.0: Mon Jan 11 18:48:35 PST 2016; root:xnu-2782.50.2~1/RELEASE_X86_64 x86_64 -- nosy: +meador.inge

[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-08 Thread Martin Panter
Martin Panter added the comment: Here is a patch including a unit test. I have only tested it on Linux. It would be awesome of other people could test it on other Unix platforms, in case the pseudoterminal stuff needs fixing. -- Added file:

[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-08 Thread Martin Panter
Martin Panter added the comment: I left a few minor comments in the code review. I agree automated testing would be awkward for Readline. It should be possible using a pseudoterminal (pty). In fact there is already very basic testing that does this in /Lib/test/test_builtin.py, class

[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-06 Thread Tyler Crompton
Tyler Crompton added the comment: I couldn't think of a way to test input() with the unittest module without bypassing readline or requesting the input from the user. With that said, this informal script verifies proper behavior. -- status: open -> pending Added file:

[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-06 Thread Tyler Crompton
Changes by Tyler Crompton : -- status: pending -> open ___ Python tracker ___ ___

[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-06 Thread Tyler Crompton
Changes by Tyler Crompton : -- keywords: +patch Added file: http://bugs.python.org/file42748/set_auto_history.patch ___ Python tracker

[issue26870] Unexpected call to readline's add_history in call_readline

2016-04-27 Thread Tyler Crompton
Tyler Crompton added the comment: I agree about the documentation. It would only take a few minutes to do. In regard to your inquiry about the second solution, more or less, yes. I left that one a bit ambiguous since there are many ways to skin that cat. But in retrospect, I probably

[issue26870] Unexpected call to readline's add_history in call_readline

2016-04-27 Thread Martin Panter
Martin Panter added the comment: Solution 3 (documentation) can easily be done for existing versions of Python. Any other fix I think would have to be done in the next Python version (3.6). By solution 2 (dynamically swap histories), do you mean add an API to save and load the entire history

[issue26870] Unexpected call to readline's add_history in call_readline

2016-04-27 Thread Tyler Crompton
Changes by Tyler Crompton : -- nosy: +twouters ___ Python tracker ___ ___

[issue26870] Unexpected call to readline's add_history in call_readline

2016-04-27 Thread Tyler Crompton
New submission from Tyler Crompton: I was implementing a REPL using the readline module and noticed that there are extraneous calls to readline's add_history function in call_readline[1]. This was a problem because there were some lines, that, based on their compositions, I might not want in