Skip to content

Use Python 3.11.5 for stubtest in CI #10641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/stubtest_stdlib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions stdlib/enum.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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: ...

Expand Down Expand Up @@ -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]]: ...
7 changes: 6 additions & 1 deletion stdlib/os/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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: ...
Expand Down
4 changes: 2 additions & 2 deletions stdlib/pydoc.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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: ...
Expand Down
10 changes: 6 additions & 4 deletions stdlib/ssl.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions tests/stubtest_allowlists/darwin-py312.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions tests/stubtest_allowlists/linux-py312.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions tests/stubtest_allowlists/py310.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions tests/stubtest_allowlists/py312.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions tests/stubtest_allowlists/py38.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions tests/stubtest_allowlists/py39.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions tests/stubtest_allowlists/py3_common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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