Use latest Python for stubtest in CI (#10641)

This commit is contained in:
Alex Waygood
2023-08-30 17:50:11 +01:00
committed by GitHub
parent a785041250
commit 4ae6d38f96
13 changed files with 35 additions and 12 deletions

View File

@@ -33,7 +33,7 @@ if sys.version_info >= (3, 11):
"verify",
]
if sys.version_info >= (3, 12):
if sys.version_info >= (3, 11):
__all__ += ["pickle_by_enum_name", "pickle_by_global_name"]
_EnumMemberT = TypeVar("_EnumMemberT")
@@ -188,7 +188,7 @@ class Enum(metaclass=EnumMeta):
def __hash__(self) -> int: ...
def __format__(self, format_spec: str) -> str: ...
def __reduce_ex__(self, proto: Unused) -> tuple[Any, ...]: ...
if sys.version_info >= (3, 12):
if sys.version_info >= (3, 11):
def __copy__(self) -> Self: ...
def __deepcopy__(self, memo: Any) -> Self: ...
@@ -294,6 +294,6 @@ class auto(IntFlag):
def value(self) -> Any: ...
def __new__(cls) -> Self: ...
if sys.version_info >= (3, 12):
if sys.version_info >= (3, 11):
def pickle_by_global_name(self: Enum, proto: int) -> str: ...
def pickle_by_enum_name(self: _EnumMemberT, proto: int) -> tuple[Callable[..., Any], tuple[type[_EnumMemberT], str]]: ...

View File

@@ -602,7 +602,12 @@ def isatty(__fd: int) -> bool: ...
if sys.platform != "win32" and sys.version_info >= (3, 11):
def login_tty(__fd: int) -> None: ...
def lseek(__fd: int, __position: int, __how: int) -> int: ...
if sys.version_info >= (3, 11):
def lseek(__fd: int, __position: int, __whence: int) -> int: ...
else:
def lseek(__fd: int, __position: int, __how: int) -> int: ...
def open(path: StrOrBytesPath, flags: int, mode: int = 0o777, *, dir_fd: int | None = None) -> int: ...
def pipe() -> tuple[int, int]: ...
def read(__fd: int, __length: int) -> bytes: ...

View File

@@ -198,7 +198,7 @@ def render_doc(
thing: str | object, title: str = "Python Library Documentation: %s", forceload: bool = ..., renderer: Doc | None = None
) -> str: ...
if sys.version_info >= (3, 12):
if sys.version_info >= (3, 11):
def doc(
thing: str | object,
title: str = "Python Library Documentation: %s",
@@ -230,7 +230,7 @@ class Helper:
def __call__(self, request: str | Helper | object = ...) -> None: ...
def interact(self) -> None: ...
def getline(self, prompt: str) -> str: ...
if sys.version_info >= (3, 12):
if sys.version_info >= (3, 11):
def help(self, request: Any, is_cli: bool = False) -> None: ...
else:
def help(self, request: Any) -> None: ...

View File

@@ -201,12 +201,13 @@ class Options(enum.IntFlag):
OP_NO_RENEGOTIATION: int
if sys.version_info >= (3, 8):
OP_ENABLE_MIDDLEBOX_COMPAT: int
if sys.platform == "linux":
OP_IGNORE_UNEXPECTED_EOF: int
if sys.version_info >= (3, 12):
OP_LEGACY_SERVER_CONNECT: int
if sys.version_info >= (3, 12) and sys.platform != "linux":
OP_ENABLE_KTLS: int
if sys.version_info >= (3, 11):
OP_IGNORE_UNEXPECTED_EOF: int
elif sys.version_info >= (3, 8) and sys.platform == "linux":
OP_IGNORE_UNEXPECTED_EOF: int
OP_ALL: Options
@@ -224,12 +225,13 @@ OP_NO_TICKET: Options
OP_NO_RENEGOTIATION: Options
if sys.version_info >= (3, 8):
OP_ENABLE_MIDDLEBOX_COMPAT: Options
if sys.platform == "linux":
OP_IGNORE_UNEXPECTED_EOF: Options
if sys.version_info >= (3, 12):
OP_LEGACY_SERVER_CONNECT: Options
if sys.version_info >= (3, 12) and sys.platform != "linux":
OP_ENABLE_KTLS: Options
if sys.version_info >= (3, 11):
OP_IGNORE_UNEXPECTED_EOF: Options
elif sys.version_info >= (3, 8) and sys.platform == "linux":
OP_IGNORE_UNEXPECTED_EOF: Options
HAS_NEVER_CHECK_COMMON_NAME: bool