[issue11466] getpass.getpass doesn't close tty file

2021-05-06 Thread Senthil Kumaran
Senthil Kumaran added the comment: This was fixed in https://github.com/python/cpython/commit/16dbbae2981c96c7c9b1ae81e1708d54b08c10ac Since Python 3.4 And tests do not raise any ResourceWarning now. ``` $ ../../python -Vs Python 3.11.0a0 $ ../../python -m unittest test_getpass.py -v test_u

[issue11466] getpass.getpass doesn't close tty file

2012-07-24 Thread Anton Barkovsky
Changes by Anton Barkovsky : Added file: http://bugs.python.org/file26499/closewarning.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue11466] getpass.getpass doesn't close tty file

2012-07-24 Thread Anton Barkovsky
Changes by Anton Barkovsky : Removed file: http://bugs.python.org/file26498/closewarning.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue11466] getpass.getpass doesn't close tty file

2012-07-24 Thread Anton Barkovsky
Anton Barkovsky added the comment: I think I've found the root cause. On my system (also tested in 3.2) /dev/tty is opened successfully, but wrapping it in io.BufferedRandom fails. By the time the exception is raised, FileIO object is already created, and then it immediately gets deleted. I'

[issue11466] getpass.getpass doesn't close tty file

2012-07-23 Thread Anton Barkovsky
Anton Barkovsky added the comment: The issue is still there. I hope someone fixes it before the release. -- nosy: +anton.barkovsky ___ Python tracker ___ ___

[issue11466] getpass.getpass doesn't close tty file

2011-09-17 Thread Steffen Daode Nurpmeso
Changes by Steffen Daode Nurpmeso : -- nosy: -sdaoden ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue11466] getpass.getpass doesn't close tty file

2011-04-08 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: Future Buddha to Guru.. Future Buddha to Guru.. My code is like a two-wheeled indian Bullet, royal purple. Wouldn't you agree with that? -- ___ Python tracker

[issue11466] getpass.getpass doesn't close tty file

2011-03-24 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: On Thu, Mar 24, 2011 at 02:34:34PM +, Senthil Kumaran wrote: > assignee: -> orsenthil Here is yet another patch which only passes valid streams into _user_input(), so that this does not need to take care about that at all. Would you please revie

[issue11466] getpass.getpass doesn't close tty file

2011-03-24 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- assignee: -> orsenthil nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue11466] getpass.getpass doesn't close tty file

2011-03-19 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: On Sat, Mar 19, 2011 at 01:29:28PM +, Éric Araujo wrote: > It’s a private function, if that makes the patch smaller let’s change it. The promised 11466.5.patch. It: - Fixes #11466 resource warning. - Fixes bogus newline which would ha

[issue11466] getpass.getpass doesn't close tty file

2011-03-19 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: On Sat, Mar 19, 2011 at 01:29:28PM +, Éric Araujo wrote: > It’s a private function, it that makes the patch smaller let’s change it. You get a new patch from me tomorrow evening at the latest -- ___ Pyth

[issue11466] getpass.getpass doesn't close tty file

2011-03-19 Thread Éric Araujo
Éric Araujo added the comment: > About security: i think that you, Éric, have referred to this > when you've said "your patch is not uncontroversial". No, I was only referring to the fact that one unrelated change was present in a patch while it was still being discussed in another issue (“Thi

[issue11466] getpass.getpass doesn't close tty file

2011-03-14 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: Hello, Éric and Gregory, this patch also addresses the problem that 'one newline too much' may be written in case of errors. The problem is already present in the unpatched code, and i admit that 11466.3.patch doesn't fix it. All of this is written

[issue11466] getpass.getpass doesn't close tty file

2011-03-12 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: This patch makes getpass.getpass() comply with the documented behaviour and fixes #11466. It will require no further adjustments for #11236 (except what valhallasw's patch does, of course). It applies cleanly to: 16:32 ~/src/cpython $ hg identify ee

[issue11466] getpass.getpass doesn't close tty file

2011-03-11 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: On Fri, Mar 11, 2011 at 09:51:32PM +, Éric Araujo wrote: > If you can write a patch that cleans up the code and closes the > files without being too hard to review I'll try to do so tomorrow. -- ___ Pyt

[issue11466] getpass.getpass doesn't close tty file

2011-03-11 Thread Éric Araujo
Éric Araujo added the comment: If you can write a patch that cleans up the code and closes the files without being too hard to review, it could get committed soon. Then you could adapt your patch on the other bug and defend it. -- ___ Python track

[issue11466] getpass.getpass doesn't close tty file

2011-03-11 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: On Fri, Mar 11, 2011 at 09:20:14PM +, É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

[issue11466] getpass.getpass doesn't close tty file

2011-03-11 Thread Éric Araujo
Éric Araujo added the comment: Sorry, accidentally removed the first patch. -1 on the second patch: there’s another issue for that, and your patch is not uncontroversial. -- Added file: http://bugs.python.org/file21089/getpass_fdclose.patch ___ Pyt

[issue11466] getpass.getpass doesn't close tty file

2011-03-11 Thread Éric Araujo
Changes by Éric Araujo : Removed file: http://bugs.python.org/file21079/getpass_fdclose.patch ___ Python tracker ___ ___ Python-bugs-list mail

[issue11466] getpass.getpass doesn't close tty file

2011-03-11 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: This new patch (11466.2.patch) also includes the #11236 patch, because if ^C would work as expected then that would not close the fd either. It's identical to the first patch beside that. -- Added file: http://bugs.python.org/file21081/11466.

[issue11466] getpass.getpass doesn't close tty file

2011-03-11 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue11466] getpass.getpass doesn't close tty file

2011-03-11 Thread Steffen Daode Nurpmeso
New submission from Steffen Daode Nurpmeso : Here is a patch which cures the following ResourceWarning: unclosed file <_io.TextIOWrapper name=3 mode='w+' encoding='UTF-8'> (This only fixes the bug, not the rest of this code...) I did not try it out, but according to some hg cat's this also app