[issue18116] getpass.getpass() triggers ResourceWarning
Nikolaus Rath
report at bugs.python.org
Sun Jun 2 02:24:41 CEST 2013
Nikolaus Rath added the comment:
Yes, I'm pretty sure:
[0] nikratio at vostro:~/tmp$ cp /usr/lib/python3.3/getpass.py .
[0] nikratio at vostro:~/tmp$ patch -p2 < issue18116.diff
patching file getpass.py
Hunk #1 succeeded at 57 (offset -1 lines).
[0] nikratio at vostro:~/tmp$ python3 bugme.py
/usr/lib/python3.3/os.py:1043: ResourceWarning: unclosed file <_io.FileIO name=3 mode='rb+'>
return io.open(fd, *args, **kwargs)
What's up?
# Test if we're using the patched getpass.py...
[0] nikratio at vostro:~/tmp$ vim getpass.py
[0] nikratio at vostro:~/tmp$ python3 bugme.py
Hello
/usr/lib/python3.3/os.py:1043: ResourceWarning: unclosed file <_io.FileIO name=3 mode='rb+'>
return io.open(fd, *args, **kwargs)
What's up?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18116>
_______________________________________
More information about the Python-bugs-list
mailing list