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

@@ -48,6 +48,7 @@ jobs:
cache: pip
cache-dependency-path: requirements-tests.txt
allow-prereleases: true
check-latest: true
- name: Install dependencies
run: pip install -r requirements-tests.txt
- name: Run stubtest

View File

@@ -44,6 +44,7 @@ jobs:
cache: pip
cache-dependency-path: requirements-tests.txt
allow-prereleases: true
check-latest: true
- name: Install dependencies
run: pip install -r requirements-tests.txt
- name: Run stubtest

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

View File

@@ -28,3 +28,6 @@ xxlimited.Xxo.x_exports
(locale.dgettext)?
(locale.gettext)?
(locale.textdomain)?
# should be removable once 3.12.0rc2 is released:
posix.lseek

View File

@@ -44,3 +44,6 @@ tty.__all__
tty.cfmakecbreak
tty.cfmakeraw
xxlimited.Xxo.x_exports
# should be removable once 3.12.0rc2 is released:
posix.lseek

View File

@@ -160,3 +160,5 @@ asynchat.async_chat.use_encoding
asynchat.find_prefix_at_end
pkgutil.ImpImporter\..*
pkgutil.ImpLoader\..*
types.CodeType.replace # stubtest thinks default values are None but None doesn't work at runtime

View File

@@ -173,3 +173,7 @@ typing\._SpecialForm.*
typing\.NamedTuple
typing\.LiteralString
typing\.Annotated
# These two should be removable after 3.12rc2 is released:
types.CodeType.replace # stubtest thinks default values are None but None doesn't work at runtime
os.lseek # a pos-only parameter name changed in py311/py312

View File

@@ -158,3 +158,5 @@ asynchat.async_chat.use_encoding
asynchat.find_prefix_at_end
pkgutil.ImpImporter\..*
pkgutil.ImpLoader\..*
types.CodeType.replace # stubtest thinks default values are None but None doesn't work at runtime

View File

@@ -149,3 +149,5 @@ asynchat.async_chat.use_encoding
asynchat.find_prefix_at_end
pkgutil.ImpImporter\..*
pkgutil.ImpLoader\..*
types.CodeType.replace # stubtest thinks default values are None but None doesn't work at runtime

View File

@@ -659,5 +659,3 @@ typing(_extensions)?\.IO\.__iter__ # See https://github.com/python/typeshed/com
# Omit internal _KEEP argument
tarfile.TarInfo.replace
types.CodeType.replace # stubtest thinks default values are None but None doesn't work at runtime