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.
Created on 2011年06月29日 01:06 by JBernardo, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (6) | |||
|---|---|---|---|
| msg139385 - (view) | Author: João Bernardo (JBernardo) * | Date: 2011年06月29日 01:06 | |
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)) |
|||
| msg139413 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2011年06月29日 13:10 | |
The problem isn't with getpass, the problem is that getpass is generating a warning message on first call and idle isn't handling that correctly. Your suggested fix is probably correct. |
|||
| msg139722 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2011年07月04日 00:40 | |
New changeset c9f69b28c4d1 by Senthil Kumaran in branch '2.7': Fix closes issue12438 - idlelib.PyShell's showformatwarning method was passing an incorrect arg. http://hg.python.org/cpython/rev/c9f69b28c4d1 New changeset e9c406a53972 by Senthil Kumaran in branch '3.2': Fix closes issue12438 - idlelib.PyShell's showformatwarning method was passing an incorrect arg. http://hg.python.org/cpython/rev/e9c406a53972 |
|||
| msg139723 - (view) | Author: Senthil Kumaran (orsenthil) * (Python committer) | Date: 2011年07月04日 00:42 | |
Have fixed this. Even looking at the code, your suggestion was correct. But even before the fix, I was not able to reproduce the bug in Ubuntu and perhaps it was getting masked. May I ask, how did you invoke idle that this bug surfaced and what was the platform? |
|||
| msg139727 - (view) | Author: João Bernardo (JBernardo) * | Date: 2011年07月04日 01:06 | |
@orsenthil My system is Ubuntu 11.04 x64. To run idle, i press the Super (windows button) then write idle. If I open the terminal and type "idle", the problem don't appear but I have to type the password on the terminal rather than on idle GUI. |
|||
| msg140053 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2011年07月09日 08:58 | |
New changeset 7dd9313c300b by Senthil Kumaran in branch '3.2': Fix closes issue12438 - idlelib.PyShell's showformatwarning method was passing an incorrect arg. http://hg.python.org/cpython/rev/7dd9313c300b |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:19 | admin | set | github: 56647 |
| 2011年12月23日 07:04:20 | ned.deily | link | issue13654 superseder |
| 2011年07月09日 08:58:08 | python-dev | set | messages: + msg140053 |
| 2011年07月04日 01:06:49 | JBernardo | set | messages: + msg139727 |
| 2011年07月04日 00:42:51 | orsenthil | set | nosy:
+ orsenthil messages: + msg139723 |
| 2011年07月04日 00:40:56 | python-dev | set | status: open -> closed nosy: + python-dev messages: + msg139722 resolution: fixed stage: needs patch -> resolved |
| 2011年06月29日 13:10:45 | r.david.murray | set | nosy:
+ r.david.murray, terry.reedy title: getpass error on idle -> IDLE problem displaying warning message messages: + msg139413 versions: + Python 3.3, - Python 3.1 stage: needs patch |
| 2011年06月29日 01:06:31 | JBernardo | create | |