[issue706406] fix bug #685846: raw_input defers signals

2010-08-18 Thread Michael Stone

Michael Stone  added the comment:

Wow, you wait 3/4 of a decade or so and the status of these bugs does tend to 
change on you.  I'm not sure it's fixed, but it is different.  Here's a test 
script for you:

import readline
import signal
def handle(a,b):
   print "received signal"
signal.signal(signal.SIGALRM, handle)
signal.alarm(5)
name = raw_input('Please enter your name within 5 seconds: ')
print name

The behavior of this script as is, since at least python 2.5 or so, is after 5 
seconds to run the signal handler and then keep waiting for input (assuming 
you've got readline on your box of course).  I like this behavior, everything 
seems good to me so far.

Now comment out the "import readline", and suddenly you're getting an EOFError 
after the signal handler runs normally.  Still better than it used to be in 
2003, but I'm not sure if this inconsistency is okay or not.

Now let's throw another wrench in the system.  Raise an exception in the signal 
handler.  Suddenly both are consistent again with and without readline, both 
raising the exception from the signal handler.  Sounds good to me.

So I guess someone has to decide, is this EOFError a new bug?  Or is this 
inconsistency acceptable and/or too hard to fix?  I haven't looked at the code 
in forever, so I can't speak for how hard it would be to fix.

--

___
Python tracker 
<http://bugs.python.org/issue706406>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue684944] extend readline functionality in pdb

2009-02-12 Thread Michael Stone

Michael Stone  added the comment:

ajaksu2, I think you just changed the status of this to "test needed".  
I don't think a unit test for this functionality is possible if that's 
what you mean, as it is an interactive feature involving readline 
completion at the interactive prompt only.

It's been a long time since I posted this patch, and I don't really 
mind if you just close the issue.  There obviously hasn't been a lot of 
interest since 2003.

--
nosy: +ajaksu2

___
Python tracker 
<http://bugs.python.org/issue684944>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue706406] fix bug #685846: raw_input defers signals

2009-05-12 Thread Michael Stone

Michael Stone  added the comment:

ajaksu2 has uploaded a file called "test.py" that seems to have nothing 
to do with this issue, unless I'm misunderstanding something.  I don't 
see any call to readline in the uploaded file at all.  Perhaps the file 
you meant to upload, was the one from issue 1113?
http://bugs.python.org/file8392/test.py

--

___
Python tracker 
<http://bugs.python.org/issue706406>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue706406] fix bug #685846: raw_input defers signals

2009-05-12 Thread Michael Stone

Changes by Michael Stone :


--
nosy: +ajaksu2

___
Python tracker 
<http://bugs.python.org/issue706406>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com