diff --git a/stdlib/@tests/stubtest_allowlists/py314.txt b/stdlib/@tests/stubtest_allowlists/py314.txt index 5c6f2fd01..3cf65860e 100644 --- a/stdlib/@tests/stubtest_allowlists/py314.txt +++ b/stdlib/@tests/stubtest_allowlists/py314.txt @@ -394,7 +394,6 @@ functools.reduce functools.reduce functools.update_wrapper functools.wraps -getpass.getpass gzip.GzipFile.readinto gzip.GzipFile.readinto gzip.GzipFile.readinto1 diff --git a/stdlib/getpass.pyi b/stdlib/getpass.pyi index 6104e0ded..bb3013dfb 100644 --- a/stdlib/getpass.pyi +++ b/stdlib/getpass.pyi @@ -1,8 +1,14 @@ +import sys from typing import TextIO __all__ = ["getpass", "getuser", "GetPassWarning"] -def getpass(prompt: str = "Password: ", stream: TextIO | None = None) -> str: ... +if sys.version_info >= (3, 14): + def getpass(prompt: str = "Password: ", stream: TextIO | None = None, *, echo_char: str | None = None) -> str: ... + +else: + def getpass(prompt: str = "Password: ", stream: TextIO | None = None) -> str: ... + def getuser() -> str: ... class GetPassWarning(UserWarning): ...