update for the new patch releases (#13196)

This commit is contained in:
Stephen Morton
2024-12-05 09:24:07 -08:00
committed by GitHub
parent d0d0496f78
commit 1798badcdd
11 changed files with 42 additions and 30 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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]: ...

View File

@@ -1,3 +1,4 @@
import sys
from types import CodeType
__all__ = ["compile_command", "Compile", "CommandCompiler"]
@@ -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

View File

@@ -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,

View File

@@ -1,3 +1,4 @@
import sys
from collections.abc import Callable, Iterator, MutableMapping
from typing import IO, Any
from typing_extensions import TypeAlias
@@ -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

View File

@@ -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,
@@ -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",
@@ -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

View File

@@ -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

View File

@@ -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"]