From ed34247cfa65a83a0b49fe02ef17b440c22f73af Mon Sep 17 00:00:00 2001 From: Kirill Podoprigora Date: Fri, 12 Jul 2024 03:15:32 +0300 Subject: [PATCH] [warnings]: Update `_ActionKind` to match Python 3.14 (#12243) --- stdlib/warnings.pyi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stdlib/warnings.pyi b/stdlib/warnings.pyi index 539a8f237..c7ab1cb09 100644 --- a/stdlib/warnings.pyi +++ b/stdlib/warnings.pyi @@ -21,8 +21,10 @@ if sys.version_info >= (3, 13): _T = TypeVar("_T") _W = TypeVar("_W", bound=list[WarningMessage] | None) -_ActionKind: TypeAlias = Literal["default", "error", "ignore", "always", "module", "once"] - +if sys.version_info >= (3, 14): + _ActionKind: TypeAlias = Literal["default", "error", "ignore", "always", "module", "once"] +else: + _ActionKind: TypeAlias = Literal["default", "error", "ignore", "always", "all", "module", "once"] filters: Sequence[tuple[str, str | None, type[Warning], str | None, int]] # undocumented, do not mutate def showwarning(