[issue11466] getpass.getpass doesn't close tty file
Steffen Daode Nurpmeso
report at bugs.python.org
Fri Mar 11 22:47:26 CET 2011
Steffen Daode Nurpmeso <sdaoden at googlemail.com> added the comment:
On Fri, Mar 11, 2011 at 09:20:14PM +0000, Éric Araujo wrote:
> your patch is not uncontroversial.
The code is very ugly, but i think that somewhat reflects
the code flow of the entire function.
At least a bit.
I've forced all mis-uses i could imagine and the patch you see was
the only solution to avoid the ResourceWarning for all of them.
Do you disagree in avoiding that warning, or have i missed an
error??
(But maybe this entire function should be cleaned up a bit to get
rid of these interlocked try: blocks, which would make it easier
to write the newline and also close the stream.)
> -1 on the second patch: there’s another issue for that
Well, ok about that.
However, msg128824 seems to indicate that you are willing to
accept that termios.ISIG shall not be set.
If you want to treat this as two commits then of course one of the
patches (for #11236 and #11466) needs to be adjusted after the
other has been patched in.
So, what is your suggestion?
Shall i write a patch for #11236 which assumes that
getpass_fdclose.patch has been integrated yet?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11466>
_______________________________________
More information about the Python-bugs-list
mailing list