From 6308997a132c95811f2291508cd9e647c3090201 Mon Sep 17 00:00:00 2001 From: Semyon Moroz Date: Sat, 10 May 2025 15:17:04 +0000 Subject: [PATCH] Bump `getpass` to 3.14 (#13967) --- stdlib/@tests/stubtest_allowlists/py314.txt | 1 - stdlib/getpass.pyi | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-) 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): ...