8000 [3.14] gh-77065: add missing parameter `echo_char` in `getpass.fallba… · python/cpython@29d69e8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 29d69e8

Browse files
[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 d029a1a) Co-authored-by: Semyon Moroz <donbarbos@proton.me>
1 parent 620065c commit 29d69e8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/getpass.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,15 @@ def win_getpass(prompt='Password: ', stream=None, *, echo_char=None):
132132
return pw
133133

134134

135-
def fallback_getpass(prompt='Password: ', stream=None):
135+
def fallback_getpass(prompt='Password: ', stream=None, *, echo_char=None):
136+
_check_echo_char(echo_char)
136137
import warnings
137138
warnings.warn("Can not control echo on the terminal.", GetPassWarning,
138139
stacklevel=2)
139140
if not stream:
140141
stream = sys.stderr
141142
print("Warning: Password input may be echoed.", file=stream)
142-
return _raw_input(prompt, stream)
143+
return _raw_input(prompt, stream, echo_char=echo_char)
143144

144145

145146
def _check_echo_char(echo_char):

0 commit comments

Comments
 (0)
0