From 320b2ef8edf64264f98b72b155932306046ee580 Mon Sep 17 00:00:00 2001 From: Carl Meyer Date: Tue, 21 Jul 2026 18:34:08 -0700 Subject: [PATCH] Make BaseException.__new__ cls positional-only --- stdlib/builtins.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index 096d440ac38c..fbecb8454ae0 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -2306,7 +2306,7 @@ class BaseException: __suppress_context__: bool __traceback__: TracebackType | None def __init__(self, *args: object) -> None: ... - def __new__(cls, *args: Any, **kwds: Any) -> Self: ... + def __new__(cls, /, *args: Any, **kwds: Any) -> Self: ... def __setstate__(self, state: dict[str, Any] | None, /) -> None: ... def with_traceback(self, tb: TracebackType | None, /) -> Self: ... # Necessary for security-focused static analyzers (e.g, pysa)