[issue18116] getpass.getpass() triggers ResourceWarning

Vajrasky Kok report at bugs.python.org
Sun Jun 2 09:55:30 CEST 2013


Vajrasky Kok added the comment:

I have investigated this problem and come up with the patch to fix the problem. This patch does the job. Caution: only for Python 3.4. But translating this patch to Python 3.3 should be straightforward.

I hope this patch could be the foundation for better programmers to create better patch.

Some of the issues with this patch are: I am not sure how to handle encoding and where the best place to close tty is.

Reference:
https://github.com/stefanholek/term/issues/1
http://stackoverflow.com/questions/5471158/typeerror-str-does-not-support-the-buffer-interface

----------
Added file: http://bugs.python.org/file30444/getpass_fix_resourcewarning.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18116>
_______________________________________


More information about the Python-bugs-list mailing list