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.

classification
Title: getpass falls back when sys.stdin is changed
Type: behavior Stage: resolved
Components: Library (Lib), Windows Versions: Python 3.11
process
Status: closed Resolution: later
Dependencies: Superseder:
Assigned To: Nosy List: Drekin, iritkatriel, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2015-12-10 19:01 by Drekin, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (4)
msg256180 - (view) Author: Adam Bartoš (Drekin) * Date: 2015-12-10 19:01
There is a check in Lib/getpass.py:win_getpass that causes a fallback version to be used when `sys.stdin` is changed. I change `sys.stdin` in my `win_unicode_console` package, and in this situation there is no reason to use the fallback version (see https://github.com/Drekin/win-unicode-console/issues/24).

It seems the check was added because of some issue with IDLE (https://hg.python.org/cpython/rev/6d5ac3c43416). Could this check be changed so it satisfies all the needs?
msg408266 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-12-10 23:34
Adam, do you have a suggestion what the check should be?
msg408301 - (view) Author: Adam Bartoš (Drekin) * Date: 2021-12-11 13:29
Sorry, I don't. But my use case is not relevant any more since my package was a workround for problems with entering Unicode interactively on Windows, and these problems were resolved in Python since then.
msg408308 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-12-11 14:39
Thanks, I'll close this and we can revisit if a new use case turns up.
History
Date User Action Args
2022-04-11 14:58:24adminsetgithub: 70021
2021-12-11 14:39:09iritkatrielsetstatus: open -> closed
resolution: later
messages: + msg408308

stage: resolved
2021-12-11 13:29:31Drekinsetmessages: + msg408301
2021-12-10 23:34:36iritkatrielsetnosy: + iritkatriel

messages: + msg408266
versions: + Python 3.11, - Python 3.5, Python 3.6
2015-12-10 19:01:21Drekincreate