diff --git a/stdlib/3/platform.pyi b/stdlib/3/platform.pyi index debf8d713..c854930cd 100644 --- a/stdlib/3/platform.pyi +++ b/stdlib/3/platform.pyi @@ -1,12 +1,16 @@ # Stubs for platform (Python 3.5) from os import devnull as DEV_NULL -from typing import Tuple, NamedTuple +from typing import Optional, Tuple, NamedTuple import sys -def libc_ver(executable: str = ..., lib: str = ..., version: str = ..., chunksize: int = ...) -> Tuple[str, str]: ... -def linux_distribution(distname: str = ..., version: str = ..., id: str = ..., supported_dists: Tuple[str, ...] = ..., full_distribution_name: bool = ...) -> Tuple[str, str, str]: ... -def dist(distname: str = ..., version: str = ..., id: str = ..., supported_dists: Tuple[str, ...] = ...) -> Tuple[str, str, str]: ... +if sys.version_info >= (3, 8): + def libc_ver(executable: Optional[str] = ..., lib: str = ..., version: str = ..., chunksize: int = ...) -> Tuple[str, str]: ... +else: + def libc_ver(executable: str = ..., lib: str = ..., version: str = ..., chunksize: int = ...) -> Tuple[str, str]: ... +if sys.version_info < (3, 8): + def linux_distribution(distname: str = ..., version: str = ..., id: str = ..., supported_dists: Tuple[str, ...] = ..., full_distribution_name: bool = ...) -> Tuple[str, str, str]: ... + def dist(distname: str = ..., version: str = ..., id: str = ..., supported_dists: Tuple[str, ...] = ...) -> Tuple[str, str, str]: ... def win32_ver(release: str = ..., version: str = ..., csd: str = ..., ptype: str = ...) -> Tuple[str, str, str, str]: ... if sys.version_info >= (3, 8): def win32_edition() -> str: ...