https://github.com/python/cpython/commit/d029a1a1cba515510f31c9e88b7c2a6b7ebee2a7
commit: d029a1a1cba515510f31c9e88b7c2a6b7ebee2a7
branch: main
author: Semyon Moroz <[email protected]>
committer: picnixz <[email protected]>
date: 2025-05-15T15:07:34+02:00
summary:
gh-77065: add missing parameter `echo_char` in `getpass.fallback_getpass`
(#133849)
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 -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]