New submission from João Bernardo <jbv...@gmail.com>: The getpass function is raising an error when first used on idle (Python 3.2 and 2.7.1)
The next time it'll work "as expected" (it echoes the data, but idle is just for testing purposes so no problems here) >>> from getpass import getpass >>> p = getpass() Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> p = getpass() File "/usr/lib/python3.2/getpass.py", line 55, in unix_getpass passwd = fallback_getpass(prompt, stream) File "/usr/lib/python3.2/getpass.py", line 114, in fallback_getpass stacklevel=2) File "/usr/lib/python3.2/idlelib/PyShell.py", line 62, in idle_showwarning lineno, file=file, line=line)) TypeError: idle_formatwarning() got an unexpected keyword argument 'file' >>> p = getpass() Warning: Password input may be echoed. Password: ok >>> p 'ok' >>> Looking at the "/usr/lib/python3.2/idlelib/PyShell.py" file the "idle_formatwarning" function don't have the "file" argument so it should be revomed from the function call at line 61: file.write(warnings.formatwarning(message, category, filename, lineno, file=file, line=line)) ---------- components: IDLE messages: 139385 nosy: JBernardo priority: normal severity: normal status: open title: getpass error on idle type: crash versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12438> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com