diff --git a/stdlib/_remote_debugging.pyi b/stdlib/_remote_debugging.pyi index 5c150442c5e3..1e9f411dd130 100644 --- a/stdlib/_remote_debugging.pyi +++ b/stdlib/_remote_debugging.pyi @@ -156,6 +156,9 @@ class BinaryWriter: ) -> None: ... @property def total_samples(self) -> int: ... + # Added in Python 3.15.1. + @property + def limit_reached(self) -> bool: ... def write_sample(self, stack_frames: list[InterpreterInfo], timestamp_us: int) -> None: ... def set_stats( self, /, duration_sec: float, sample_rate: float, error_rate: float | None = None, missed_samples: float | None = None diff --git a/stdlib/email/_header_value_parser.pyi b/stdlib/email/_header_value_parser.pyi index 019503cf8538..02aff94c7bd3 100644 --- a/stdlib/email/_header_value_parser.pyi +++ b/stdlib/email/_header_value_parser.pyi @@ -47,6 +47,10 @@ class TokenList(list[TokenList | Terminal]): def as_ew_allowed(self) -> bool: ... @property def comments(self) -> list[str]: ... + if sys.version_info >= (3, 14): + # Added in Python 3.14.9 and 3.15.1. + def contains_token_type(self, *token_types: str | None) -> bool: ... + def fold(self, *, policy: Policy) -> str: ... def pprint(self, indent: str = "") -> None: ... def ppstr(self, indent: str = "") -> str: ... @@ -339,6 +343,10 @@ class Terminal(str): def pop_trailing_ws(self) -> None: ... @property def comments(self) -> list[str]: ... + if sys.version_info >= (3, 14): + # Added in Python 3.14.9 and 3.15.1. + def contains_token_type(self, *token_types: str | None) -> bool: ... + def __getnewargs__(self) -> tuple[str, str]: ... # type: ignore[override] class WhiteSpaceTerminal(Terminal): diff --git a/stdlib/multiprocessing/context.pyi b/stdlib/multiprocessing/context.pyi index 13fd967515d0..925f364f1826 100644 --- a/stdlib/multiprocessing/context.pyi +++ b/stdlib/multiprocessing/context.pyi @@ -169,7 +169,12 @@ class Process(BaseProcess): class DefaultContext(BaseContext): Process: ClassVar[type[Process]] - def __init__(self, context: BaseContext) -> None: ... + if sys.version_info >= (3, 14): + # The context parameter became optional in Python 3.14.9 and 3.15.1. + def __init__(self, context: BaseContext | None = None) -> None: ... + else: + def __init__(self, context: BaseContext) -> None: ... + def get_start_method(self, allow_none: bool = False) -> str: ... def get_all_start_methods(self) -> list[str]: ...