Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 29d69e8

Browse files
miss-islingtondonBarbos
andauthoredMay 15, 2025··
[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

Lines changed: 3 additions & 2 deletions
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)
Please sign in to comment.

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant