diff --git a/stdlib/asyncio/unix_events.pyi b/stdlib/asyncio/unix_events.pyi index 54a2a039749e..368cac38302f 100644 --- a/stdlib/asyncio/unix_events.pyi +++ b/stdlib/asyncio/unix_events.pyi @@ -95,6 +95,7 @@ if sys.platform != "win32": if sys.version_info >= (3, 12): # Doesn't actually have ABCMeta metaclass at runtime, but mypy complains if we don't have it in the stub. # See discussion in #7412 + @deprecated("Deprecated since Python 3.12; removed in Python 3.14.") class BaseChildWatcher(AbstractChildWatcher, metaclass=ABCMeta): def close(self) -> None: ... def is_active(self) -> bool: ... diff --git a/stdlib/multiprocessing/context.pyi b/stdlib/multiprocessing/context.pyi index a802d1e235e5..903acf158e55 100644 --- a/stdlib/multiprocessing/context.pyi +++ b/stdlib/multiprocessing/context.pyi @@ -124,25 +124,18 @@ class BaseContext: def allow_connection_pickling(self) -> None: ... def set_executable(self, executable: str) -> None: ... def set_forkserver_preload(self, module_names: list[str]) -> None: ... + @overload + def get_context(self, method: None = None) -> DefaultContext: ... + @overload + def get_context(self, method: Literal["spawn"]) -> SpawnContext: ... if sys.platform != "win32": - @overload - def get_context(self, method: None = None) -> DefaultContext: ... - @overload - def get_context(self, method: Literal["spawn"]) -> SpawnContext: ... @overload def get_context(self, method: Literal["fork"]) -> ForkContext: ... @overload def get_context(self, method: Literal["forkserver"]) -> ForkServerContext: ... - @overload - def get_context(self, method: str) -> BaseContext: ... - else: - @overload - def get_context(self, method: None = None) -> DefaultContext: ... - @overload - def get_context(self, method: Literal["spawn"]) -> SpawnContext: ... - @overload - def get_context(self, method: str) -> BaseContext: ... + @overload + def get_context(self, method: str) -> BaseContext: ... @overload def get_start_method(self, allow_none: Literal[False] = False) -> str: ... @overload diff --git a/stdlib/tarfile.pyi b/stdlib/tarfile.pyi index 9bc738c9fd7b..a046fa3e4e1f 100644 --- a/stdlib/tarfile.pyi +++ b/stdlib/tarfile.pyi @@ -132,8 +132,9 @@ class TarFile: errorlevel: Literal[0, 1, 2] offset: int # undocumented extraction_filter: _FilterFunction | None - if sys.version_info >= (3, 15): + if sys.version_info >= (3, 13): stream: bool + if sys.version_info >= (3, 15): def __init__( self, name: StrOrBytesPath | None = None, @@ -153,7 +154,6 @@ class TarFile: mtime: float | None = None, ) -> None: ... elif sys.version_info >= (3, 13): - stream: bool def __init__( self, name: StrOrBytesPath | None = None, diff --git a/stubs/pyserial/serial/serialposix.pyi b/stubs/pyserial/serial/serialposix.pyi index 84f84c9e1614..2313419ca368 100644 --- a/stubs/pyserial/serial/serialposix.pyi +++ b/stubs/pyserial/serial/serialposix.pyi @@ -20,12 +20,7 @@ if sys.platform == "linux": SER_RS485_RTS_AFTER_SEND: int SER_RS485_RX_DURING_TX: int - class PlatformSpecific(PlatformSpecificBase): ... - -elif sys.platform == "cygwin": - class PlatformSpecific(PlatformSpecificBase): ... - -elif sys.platform == "darwin": +if sys.platform == "darwin": IOSSIOSPEED: int class PlatformSpecific(PlatformSpecificBase):