This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author valhallasw
Recipients belopolsky, benjamin.peterson, eric.araujo, gregory.p.smith, orsenthil, pajs@fodder.org.uk, pitrou, valhallasw
Date 2011-02-26.15:59:07
SpamBayes Score 3.5538755e-10
Marked as misclassified No
Message-id <1298735948.14.0.953054748186.issue11236@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2011-02-26 15:59:08valhallaswsetrecipients: + valhallasw, gregory.p.smith, belopolsky, orsenthil, pitrou, benjamin.peterson, pajs@fodder.org.uk, eric.araujo
2011-02-26 15:59:08valhallaswsetmessageid: <1298735948.14.0.953054748186.issue11236@psf.upfronthosting.co.za>
2011-02-26 15:59:07valhallaswlinkissue11236 messages
2011-02-26 15:59:07valhallaswcreate