[issue14254] IDLE - shell restart or closing during readline does not exit nested event loop

2013-04-02 Thread Roger Serwy

Roger Serwy added the comment:

Ned, I was reading the dev guide more closely about the meaning of the commit 
review stage. Would it be ok to place this issue into that stage with your 
test result?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14254
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14254] IDLE - shell restart or closing during readline does not exit nested event loop

2013-04-02 Thread Ned Deily

Ned Deily added the comment:

Sure, or just go ahead and commit it. LGTM.

--
stage: patch review - commit review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14254
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14254] IDLE - shell restart or closing during readline does not exit nested event loop

2013-04-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 097554712637 by Roger Serwy in branch '2.7':
#14254: IDLE now handles readline correctly across shell restarts.
http://hg.python.org/cpython/rev/097554712637

New changeset 0be85a7fc839 by Roger Serwy in branch '3.3':
#14254: IDLE now handles readline correctly across shell restarts.
http://hg.python.org/cpython/rev/0be85a7fc839

New changeset 4b4f142befea by Roger Serwy in branch 'default':
#14254: merge with 3.3.
http://hg.python.org/cpython/rev/4b4f142befea

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14254
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14254] IDLE - shell restart or closing during readline does not exit nested event loop

2013-04-02 Thread Roger Serwy

Changes by Roger Serwy roger.se...@gmail.com:


--
resolution:  - fixed
stage: commit review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14254
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14254] IDLE - shell restart or closing during readline does not exit nested event loop

2013-03-31 Thread Roger Serwy

Roger Serwy added the comment:

Closing the shell window while in the nested event loop for readline fails to 
exit the nested event loop. I updated the title to reflect the broader problem 
with readline's handling of the nested event loop.

The rev1 patch causes the nested event loop to exit when restarting or closing 
the shell.

--
assignee:  - roger.serwy
stage:  - patch review
title: IDLE - shell restart during readline does not reset readline - IDLE - 
shell restart or closing during readline does not exit nested event loop
versions: +Python 3.4 -Python 3.2
Added file: http://bugs.python.org/file29642/reading_reset_rev1.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14254
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14254] IDLE - shell restart or closing during readline does not exit nested event loop

2013-03-31 Thread Ned Deily

Ned Deily added the comment:

With the rev1 patch (on OS X), the cursor seems to end up on the wrong line 
after the restart:

 import sys
 sys.stdin.readline()

  RESTART 
 
*Cursor left here at (*), i.e. the left margin of the next line, not on the 
same line as the   prompt.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14254
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14254] IDLE - shell restart or closing during readline does not exit nested event loop

2013-03-31 Thread Ned Deily

Ned Deily added the comment:

However, the patch *does* fix the original problem that the first input after 
restart is skipped.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14254
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14254] IDLE - shell restart or closing during readline does not exit nested event loop

2013-03-31 Thread Roger Serwy

Roger Serwy added the comment:

Ned, I can confirm the behavior you are seeing. I am trying to trace down why 
this spurious '\n' gets inserted.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14254
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14254] IDLE - shell restart or closing during readline does not exit nested event loop

2013-03-31 Thread Roger Serwy

Roger Serwy added the comment:

I reworked the patch to fix the cursor problem. The new code, hopefully, is 
simpler to understand and harder to break. Essentially, all code paths that 
terminate the subprocess must also call stop_readline which exits that nested 
event loop if needed.

--
Added file: http://bugs.python.org/file29643/stop_readline.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14254
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14254] IDLE - shell restart or closing during readline does not exit nested event loop

2013-03-31 Thread Ned Deily

Ned Deily added the comment:

With the stop_readline patch, I'm seeing this exception upon shell restart when 
trying the same test as above:

$ ./python -m idlelib
Exception in Tkinter callback
Traceback (most recent call last):
  File Lib/tkinter/__init__.py, line 1475, in __call__
return self.func(*args)
  File Lib/idlelib/PyShell.py, line 1225, in restart_shell
self.interp.restart_subprocess(with_cwd=True)
  File Lib/idlelib/PyShell.py, line 457, in restart_subprocess
console.stop_readline()
AttributeError: 'PyShell' object has no attribute 'stop_readline'

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14254
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14254] IDLE - shell restart or closing during readline does not exit nested event loop

2013-03-31 Thread Roger Serwy

Roger Serwy added the comment:

I just re-applied the patch to a clean 2.7 and 3.4 branch and didn't see that 
exception raised. Are you sure that the patch applied cleanly?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14254
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14254] IDLE - shell restart or closing during readline does not exit nested event loop

2013-03-31 Thread Ned Deily

Ned Deily added the comment:

Ah, sorry, I mis-edited the patch when check_whitespace.py complained about a 
whitespace problem.  The test does now work correctly, thanks.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14254
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com