[3.14] gh-138577: Mention Unix-specific limitations of getpass.getpass(echo_char=...) (GH-138677) (#138696)

Co-authored-by: yagggi <fakepoet0101@gmail.com>
This commit is contained in:
Miss Islington (bot) 2025-09-09 12:00:36 +02:00 committed by GitHub
parent 6f665902d1
commit 2162fcc51a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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.