Skip to content

update for the new patch releases #13196

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 1 commit into from
Dec 5, 2024
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
5 changes: 0 additions & 5 deletions stdlib/@tests/stubtest_allowlists/darwin-py313.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
# >= 3.13
# =======

# TODO: New in 3.13.1
_socket.SO_BINDTODEVICE
socket.__all__
socket.SO_BINDTODEVICE

# Depends on HAVE_NCURSESW and how we install CPython,
# should be removed when 3.13 will be officially released:
_?curses.unget_wch
Expand Down
7 changes: 0 additions & 7 deletions stdlib/@tests/stubtest_allowlists/py312.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
# New errors in Python 3.12
# =========================

# TODO: New in 3.12.8
argparse.ArgumentParser._parse_known_args
concurrent.futures.process._SafeQueue.__init__
pickletools.read_stringnl
token.__all__
tokenize.__all__


# =======
# >= 3.12
Expand Down
8 changes: 0 additions & 8 deletions stdlib/@tests/stubtest_allowlists/py313.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@
# New errors in Python 3.13
# =========================

# TODO: New in 3.13.1
argparse.ArgumentParser._parse_known_args
codeop.Compile.__call__
concurrent.futures.process._SafeQueue.__init__
pickletools.read_stringnl
token.__all__
tokenize.__all__


# =======
# >= 3.13
Expand Down
4 changes: 3 additions & 1 deletion stdlib/_socket.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ if sys.platform == "win32":
SO_EXCLUSIVEADDRUSE: int
if sys.platform != "win32":
SO_REUSEPORT: int
if sys.platform != "darwin" or sys.version_info >= (3, 13):
SO_BINDTODEVICE: int

if sys.platform != "win32" and sys.platform != "darwin":
SO_BINDTODEVICE: int
SO_DOMAIN: int
SO_MARK: int
SO_PASSCRED: int
Expand Down
8 changes: 7 additions & 1 deletion stdlib/argparse.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,13 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
# undocumented
def _get_optional_actions(self) -> list[Action]: ...
def _get_positional_actions(self) -> list[Action]: ...
def _parse_known_args(self, arg_strings: list[str], namespace: Namespace) -> tuple[Namespace, list[str]]: ...
if sys.version_info >= (3, 12):
def _parse_known_args(
self, arg_strings: list[str], namespace: Namespace, intermixed: bool
) -> tuple[Namespace, list[str]]: ...
else:
def _parse_known_args(self, arg_strings: list[str], namespace: Namespace) -> tuple[Namespace, list[str]]: ...

def _read_args_from_files(self, arg_strings: list[str]) -> list[str]: ...
def _match_argument(self, action: Action, arg_strings_pattern: str) -> int: ...
def _match_arguments_partial(self, actions: Sequence[Action], arg_strings_pattern: str) -> list[int]: ...
Expand Down
6 changes: 5 additions & 1 deletion stdlib/codeop.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
from types import CodeType

__all__ = ["compile_command", "Compile", "CommandCompiler"]
Expand All @@ -6,7 +7,10 @@ def compile_command(source: str, filename: str = "<input>", symbol: str = "singl

class Compile:
flags: int
def __call__(self, source: str, filename: str, symbol: str) -> CodeType: ...
if sys.version_info >= (3, 13):
def __call__(self, source: str, filename: str, symbol: str, flags: int = 0) -> CodeType: ...
else:
def __call__(self, source: str, filename: str, symbol: str) -> CodeType: ...

class CommandCompiler:
compiler: Compile
Expand Down
14 changes: 12 additions & 2 deletions stdlib/concurrent/futures/process.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,19 @@ class _CallItem:

class _SafeQueue(Queue[Future[Any]]):
pending_work_items: dict[int, _WorkItem[Any]]
shutdown_lock: Lock
if sys.version_info < (3, 12):
shutdown_lock: Lock
thread_wakeup: _ThreadWakeup
if sys.version_info >= (3, 9):
if sys.version_info >= (3, 12):
def __init__(
self,
max_size: int | None = 0,
*,
ctx: BaseContext,
pending_work_items: dict[int, _WorkItem[Any]],
thread_wakeup: _ThreadWakeup,
) -> None: ...
elif sys.version_info >= (3, 9):
def __init__(
self,
max_size: int | None = 0,
Expand Down
9 changes: 8 additions & 1 deletion stdlib/pickletools.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
from collections.abc import Callable, Iterator, MutableMapping
from typing import IO, Any
from typing_extensions import TypeAlias
Expand Down Expand Up @@ -40,7 +41,13 @@ def read_uint8(f: IO[bytes]) -> int: ...

uint8: ArgumentDescriptor

def read_stringnl(f: IO[bytes], decode: bool = True, stripquotes: bool = True) -> bytes | str: ...
if sys.version_info >= (3, 12):
def read_stringnl(
f: IO[bytes], decode: bool = True, stripquotes: bool = True, *, encoding: str = "latin-1"
) -> bytes | str: ...

else:
def read_stringnl(f: IO[bytes], decode: bool = True, stripquotes: bool = True) -> bytes | str: ...

stringnl: ArgumentDescriptor

Expand Down
7 changes: 5 additions & 2 deletions stdlib/socket.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,6 @@ if sys.platform != "win32" and sys.platform != "darwin":
IP_TRANSPARENT as IP_TRANSPARENT,
IPX_TYPE as IPX_TYPE,
SCM_CREDENTIALS as SCM_CREDENTIALS,
SO_BINDTODEVICE as SO_BINDTODEVICE,
SO_DOMAIN as SO_DOMAIN,
SO_MARK as SO_MARK,
SO_PASSCRED as SO_PASSCRED,
Expand Down Expand Up @@ -396,7 +395,6 @@ if sys.platform != "win32" and sys.platform != "darwin":
__all__ += [
"IP_TRANSPARENT",
"SCM_CREDENTIALS",
"SO_BINDTODEVICE",
"SO_DOMAIN",
"SO_MARK",
"SO_PASSCRED",
Expand Down Expand Up @@ -517,6 +515,11 @@ if sys.platform != "win32":
"IPV6_RTHDRDSTOPTS",
]

if sys.platform != "darwin" or sys.version_info >= (3, 13):
from _socket import SO_BINDTODEVICE as SO_BINDTODEVICE

__all__ += ["SO_BINDTODEVICE"]

if sys.platform != "darwin" and sys.platform != "linux":
if sys.platform != "win32" or sys.version_info >= (3, 9):
from _socket import BDADDR_ANY as BDADDR_ANY, BDADDR_LOCAL as BDADDR_LOCAL, BTPROTO_RFCOMM as BTPROTO_RFCOMM
Expand Down
2 changes: 1 addition & 1 deletion stdlib/token.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ if sys.version_info >= (3, 10):
__all__ += ["SOFT_KEYWORD"]

if sys.version_info >= (3, 12):
__all__ += ["EXCLAMATION", "FSTRING_END", "FSTRING_MIDDLE", "FSTRING_START"]
__all__ += ["EXCLAMATION", "FSTRING_END", "FSTRING_MIDDLE", "FSTRING_START", "EXACT_TOKEN_TYPES"]

ENDMARKER: int
NAME: int
Expand Down
2 changes: 1 addition & 1 deletion stdlib/tokenize.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ if sys.version_info >= (3, 10):
__all__ += ["SOFT_KEYWORD"]

if sys.version_info >= (3, 12):
__all__ += ["EXCLAMATION", "FSTRING_END", "FSTRING_MIDDLE", "FSTRING_START"]
__all__ += ["EXCLAMATION", "FSTRING_END", "FSTRING_MIDDLE", "FSTRING_START", "EXACT_TOKEN_TYPES"]

if sys.version_info >= (3, 13):
__all__ += ["TokenError", "open"]
Expand Down
Loading