From: Semyon Moroz Date: Thu, 15 May 2025 15:14:31 +0000 (+0000) Subject: gh-77065: Use `putwch` instead of `putch` in `getpass.win_getpass` (#134058) X-Git-Tag: v3.15.0a1~1711 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52a7a22a6b85a470e993b3399b0ee043e5c3596e;p=thirdparty%2FPython%2Fcpython.git gh-77065: Use `putwch` instead of `putch` in `getpass.win_getpass` (#134058) --- diff --git a/Lib/getpass.py b/Lib/getpass.py index a4dbd2ea6502..1dd40e25e090 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