https://github.com/python/cpython/commit/29d69e8b661e5d4d270f44c03a2c678cc3ebc58d
commit: 29d69e8b661e5d4d270f44c03a2c678cc3ebc58d
branch: 3.14
author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com>
committer: picnixz <10796600+picn...@users.noreply.github.com>
date: 2025-05-15T13:34:50Z
summary:

[3.14] gh-77065: add missing parameter `echo_char` in 
`getpass.fallback_getpass` (GH-133849) (#134053)

gh-77065: add missing parameter `echo_char` in `getpass.fallback_getpass` 
(GH-133849)
(cherry picked from commit d029a1a1cba515510f31c9e88b7c2a6b7ebee2a7)

Co-authored-by: Semyon Moroz <donbar...@proton.me>

files:
M Lib/getpass.py

diff --git a/Lib/getpass.py b/Lib/getpass.py
index f571425e54178a..a4dbd2ea6502d4 100644
--- a/Lib/getpass.py
+++ b/Lib/getpass.py
@@ -132,14 +132,15 @@ def win_getpass(prompt='Password: ', stream=None, *, 
echo_char=None):
     return pw
 
 
-def fallback_getpass(prompt='Password: ', stream=None):
+def fallback_getpass(prompt='Password: ', stream=None, *, echo_char=None):
+    _check_echo_char(echo_char)
     import warnings
     warnings.warn("Can not control echo on the terminal.", GetPassWarning,
                   stacklevel=2)
     if not stream:
         stream = sys.stderr
     print("Warning: Password input may be echoed.", file=stream)
-    return _raw_input(prompt, stream)
+    return _raw_input(prompt, stream, echo_char=echo_char)
 
 
 def _check_echo_char(echo_char):

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to