]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-138577: Mention Unix-specific limitations of `getpass.getpass(echo_char...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 9 Sep 2025 10:00:36 +0000 (12:00 +0200)
committerGitHub <noreply@github.com>
Tue, 9 Sep 2025 10:00:36 +0000 (13:00 +0300)
Co-authored-by: yagggi <fakepoet0101@gmail.com>
Doc/library/getpass.rst

index 0fb0fc88683c032c3a019e41ddb020386915d4f0..af9c9e9f39d9a686764a15ca34a20ef2327a3a8b 100644 (file)
@@ -39,6 +39,14 @@ The :mod:`getpass` module provides two functions:
       If you call getpass from within IDLE, the input may be done in the
       terminal you launched IDLE from rather than the idle window itself.
 
+   .. note::
+      On Unix systems, when *echo_char* is set, the terminal will be
+      configured to operate in
+      :manpage:`noncanonical mode <termios(3)#Canonical_and_noncanonical_mode>`.
+      In particular, this means that line editing shortcuts such as
+      :kbd:`Ctrl+U` will not work and may insert unexpected characters into
+      the input.
+
    .. versionchanged:: 3.14
       Added the *echo_char* parameter for keyboard feedback.