]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-138577: Mention Unix-specific limitations of `getpass.getpass(echo_char=...)`...
authoryagggi <fakepoet0101@gmail.com>
Tue, 9 Sep 2025 09:41:13 +0000 (17:41 +0800)
committerGitHub <noreply@github.com>
Tue, 9 Sep 2025 09:41:13 +0000 (11:41 +0200)
commit074f3b20b3f05e2740f5324f1b0653152a41ca82
tree0d9eb4e0669e577557a5db4d57d58a2dce7feaa3
parentfd2e3d163340a29fc3ad1e9be3289fee64979dbd
gh-138577: Mention Unix-specific limitations of `getpass.getpass(echo_char=...)` (#138677)

In bf8bbe9a813dd9fc2dd14be06df172b7d26ca1af, `getpass.getpass` gained
the ability to provide keyboard feedback through `echo_char`.

On Unix, line editing shortcuts such as Ctrl+U were previously handled
as the terminal operates in canonical mode (see termios(3)). However,
since keyboard feedback requires to switch to noncanonical mode, this
now results in an inconsistency when `getpass.getpass` uses `echo_char`
as those shortcuts are no more supported. This limitation is specific
to Unix and does not affect Windows users where line editing shortcuts
were never supported.
Doc/library/getpass.rst