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.

Author orsenthil
Recipients anton.barkovsky, eric.araujo, gregory.p.smith, orsenthil
Date 2021-05-06.22:34:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1620340448.62.0.114452267224.issue11466@roundup.psfhosted.org>
In-reply-to
Content
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_username_falls_back_to_pwd (test_getpass.GetpassGetuserTest) ... ok
test_username_priorities_of_env_values (test_getpass.GetpassGetuserTest) ... ok
test_username_takes_username_from_env (test_getpass.GetpassGetuserTest) ... ok
test_flushes_stream_after_prompt (test_getpass.GetpassRawinputTest) ... ok
test_raises_on_empty_input (test_getpass.GetpassRawinputTest) ... ok
test_trims_trailing_newline (test_getpass.GetpassRawinputTest) ... ok
test_uses_stderr_as_default (test_getpass.GetpassRawinputTest) ... ok
test_uses_stdin_as_default_input (test_getpass.GetpassRawinputTest) ... ok
test_uses_stdin_as_different_locale (test_getpass.GetpassRawinputTest) ... ok
test_falls_back_to_fallback_if_termios_raises (test_getpass.UnixGetpassTest) ... ok
test_falls_back_to_stdin (test_getpass.UnixGetpassTest) ... ok
test_flushes_stream_after_input (test_getpass.UnixGetpassTest) ... ok
test_resets_termios (test_getpass.UnixGetpassTest) ... ok
test_uses_tty_directly (test_getpass.UnixGetpassTest) ... ok

----------------------------------------------------------------------
Ran 14 tests in 0.041s

OK

```
History
Date User Action Args
2021-05-06 22:34:08orsenthilsetrecipients: + orsenthil, gregory.p.smith, eric.araujo, anton.barkovsky
2021-05-06 22:34:08orsenthilsetmessageid: <1620340448.62.0.114452267224.issue11466@roundup.psfhosted.org>
2021-05-06 22:34:08orsenthillinkissue11466 messages
2021-05-06 22:34:08orsenthilcreate