From a7c907fdb905bb3798a0225dd0d695acdc71d8d5 Mon Sep 17 00:00:00 2001 From: donbarbos Date: Thu, 15 May 2025 18:45:27 +0400 Subject: [PATCH] gh-77065: Use `putwch` instead of `putch` in `win_getpass` --- Lib/getpass.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/getpass.py b/Lib/getpass.py index a4dbd2ea6502d4..1dd40e25e09068 100644 --- a/Lib/getpass.py +++ b/Lib/getpass.py @@ -119,9 +119,9 @@ def win_getpass(prompt='Password: ', stream=None, *, echo_char=None): raise KeyboardInterrupt if c == '\b': if echo_char and pw: - msvcrt.putch('\b') - msvcrt.putch(' ') - msvcrt.putch('\b') + msvcrt.putwch('\b') + msvcrt.putwch(' ') + msvcrt.putwch('\b') pw = pw[:-1] else: pw = pw + c