Message129564
No, I do not, for several reasons.
First of all, this is not a change *from* previous behaviour, but a change *back to* previous behaviour. And sensible behaviour, too.
Secondly, I have tested what getpass does on windows (Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on
win32). There, I get a KeyboardInterrupt when pressing ctrl-c. So for the simple reason of having consistend cross-platform behaviour, either the linux or the windows implementation should change.
Thirdly, the reason for adding the ISIG flag was that it is 'a possible security hole' - but no-one actually mentions *what* that hole would be. As Guido notes (in that same thread!): "Sorry, but this just doesn't make sense. There are so many differences between C and Python that you can't just compare a C and a Python version of a function and pointing at the differences as possible security holes or bugs.".
Lastly, I see no reason to mimic POSIX behaviour per se. Why not use the POSIX getpass function in the first place, then?
By the way - even with ISIG on, it should be possible to support KeyboardInterrupts - just read per-character instead of per-line (cf. the windows getpass).
[1] http://mail.python.org/pipermail/python-dev/2003-December/040583.html |
|
Date |
User |
Action |
Args |
2011-02-26 15:59:08 | valhallasw | set | recipients:
+ valhallasw, gregory.p.smith, belopolsky, orsenthil, pitrou, benjamin.peterson, pajs@fodder.org.uk, eric.araujo |
2011-02-26 15:59:08 | valhallasw | set | messageid: <1298735948.14.0.953054748186.issue11236@psf.upfronthosting.co.za> |
2011-02-26 15:59:07 | valhallasw | link | issue11236 messages |
2011-02-26 15:59:07 | valhallasw | create | |
|