Fix stdlib stubtest for latest Python patch releases (#14220)

This commit is contained in:
Brian Schubert
2025-06-05 19:01:31 -07:00
committed by GitHub
parent 5a619a53e4
commit 74be9177e9
17 changed files with 211 additions and 44 deletions
+7 -13
View File
@@ -2,6 +2,8 @@ import sys
from _typeshed import AnyOrLiteralStr, BytesPath, FileDescriptorOrPath, StrOrBytesPath, StrPath
from collections.abc import Iterable
from genericpath import (
ALLOW_MISSING as ALLOW_MISSING,
_AllowMissingType,
commonprefix as commonprefix,
exists as exists,
getatime as getatime,
@@ -61,6 +63,7 @@ __all__ = [
"relpath",
"commonpath",
]
__all__ += ["ALLOW_MISSING"]
if sys.version_info >= (3, 12):
__all__ += ["isjunction", "splitroot"]
if sys.version_info >= (3, 13):
@@ -122,19 +125,10 @@ def join(a: LiteralString, /, *paths: LiteralString) -> LiteralString: ...
def join(a: StrPath, /, *paths: StrPath) -> str: ...
@overload
def join(a: BytesPath, /, *paths: BytesPath) -> bytes: ...
if sys.version_info >= (3, 10):
@overload
def realpath(filename: PathLike[AnyStr], *, strict: bool = False) -> AnyStr: ...
@overload
def realpath(filename: AnyStr, *, strict: bool = False) -> AnyStr: ...
else:
@overload
def realpath(filename: PathLike[AnyStr]) -> AnyStr: ...
@overload
def realpath(filename: AnyStr) -> AnyStr: ...
@overload
def realpath(filename: PathLike[AnyStr], *, strict: bool | _AllowMissingType = False) -> AnyStr: ...
@overload
def realpath(filename: AnyStr, *, strict: bool | _AllowMissingType = False) -> AnyStr: ...
@overload
def relpath(path: LiteralString, start: LiteralString | None = None) -> LiteralString: ...
@overload