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

Skip to content

Commit d029a1a

Browse files
authored
gh-77065: add missing parameter echo_char in getpass.fallback_getpass (#133849)
1 parent 74c4e35 commit d029a1a

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< 8000 /span>='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