Skip to content
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
8 changes: 1 addition & 7 deletions stdlib/argparse.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,7 @@ class HelpFormatter:

if sys.version_info >= (3, 14):
def __init__(
self,
prog: str,
indent_increment: int = 2,
max_help_position: int = 24,
width: int | None = None,
prefix_chars: str = "-",
color: bool = False,
self, prog: str, indent_increment: int = 2, max_help_position: int = 24, width: int | None = None, color: bool = False
) -> None: ...
else:
def __init__(
Expand Down
4 changes: 1 addition & 3 deletions stdlib/concurrent/futures/interpreter.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys
from collections.abc import Callable, Mapping
from concurrent.futures import ThreadPoolExecutor
from typing import Final, Literal, Protocol, overload, type_check_only
from typing import Literal, Protocol, overload, type_check_only
from typing_extensions import ParamSpec, Self, TypeAlias, TypeVar, TypeVarTuple, Unpack

_Task: TypeAlias = tuple[bytes, Literal["function", "script"]]
Expand Down Expand Up @@ -37,8 +37,6 @@ if sys.version_info >= (3, 14):
class ExecutionFailed(InterpreterError):
def __init__(self, excinfo: _ExcInfo) -> None: ... # type: ignore[override]

UNBOUND: Final = 2

class WorkerContext(ThreadWorkerContext):
# Parent class doesn't have `shared` argument,
@overload # type: ignore[override]
Expand Down
20 changes: 15 additions & 5 deletions stdlib/multiprocessing/util.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
import threading
from _typeshed import ConvertibleToInt, Incomplete, Unused
from collections.abc import Callable, Iterable, Mapping, MutableMapping, Sequence
Expand All @@ -22,21 +23,30 @@ __all__ = [
"SUBWARNING",
]

if sys.version_info >= (3, 14):
__all__ += ["warn"]

_T = TypeVar("_T")
_R_co = TypeVar("_R_co", default=Any, covariant=True)

NOTSET: Final[int]
SUBDEBUG: Final[int]
DEBUG: Final[int]
INFO: Final[int]
SUBWARNING: Final[int]
NOTSET: Final = 0
SUBDEBUG: Final = 5
DEBUG: Final = 10
INFO: Final = 20
SUBWARNING: Final = 25
if sys.version_info >= (3, 14):
WARNING: Final = 30

LOGGER_NAME: Final[str]
DEFAULT_LOGGING_FORMAT: Final[str]

def sub_debug(msg: object, *args: object) -> None: ...
def debug(msg: object, *args: object) -> None: ...
def info(msg: object, *args: object) -> None: ...

if sys.version_info >= (3, 14):
def warn(msg: object, *args: object) -> None: ...

def sub_warning(msg: object, *args: object) -> None: ...
def get_logger() -> Logger: ...
def log_to_stderr(level: _LoggingLevel | None = None) -> Logger: ...
Expand Down
3 changes: 3 additions & 0 deletions stdlib/string/templatelib.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from collections.abc import Iterator
from types import GenericAlias
from typing import Any, Literal, final

__all__ = ["Interpolation", "Template"]
Expand All @@ -11,6 +12,7 @@ class Template: # TODO: consider making `Template` generic on `TypeVarTuple`
def __new__(cls, *args: str | Interpolation) -> Template: ...
def __iter__(self) -> Iterator[str | Interpolation]: ...
def __add__(self, other: Template | str) -> Template: ...
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
@property
def values(self) -> tuple[Any, ...]: ... # Tuple of interpolation values, which can have any type

Expand All @@ -26,3 +28,4 @@ class Interpolation:
def __new__(
cls, value: Any, expression: str, conversion: Literal["a", "r", "s"] | None = None, format_spec: str = ""
) -> Interpolation: ...
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
22 changes: 18 additions & 4 deletions stdlib/zipfile/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ __all__ = [
"LargeZipFile",
]

if sys.version_info >= (3, 14):
__all__ += ["ZIP_ZSTANDARD"]

# TODO: use TypeAlias for these two when mypy bugs are fixed
# https://github.com/python/mypy/issues/16581
_DateTuple = tuple[int, int, int, int, int, int] # noqa: Y026
Expand Down Expand Up @@ -364,10 +367,21 @@ else:

def is_zipfile(filename: StrOrBytesPath | _SupportsReadSeekTell) -> bool: ...

ZIP_STORED: Final[int]
ZIP_DEFLATED: Final[int]
ZIP64_LIMIT: Final[int]
ZIP_FILECOUNT_LIMIT: Final[int]
ZIP_MAX_COMMENT: Final[int]
ZIP_BZIP2: Final[int]
ZIP_LZMA: Final[int]

ZIP_STORED: Final = 0
ZIP_DEFLATED: Final = 8
ZIP_BZIP2: Final = 12
ZIP_LZMA: Final = 14
if sys.version_info >= (3, 14):
ZIP_ZSTANDARD: Final = 93

DEFAULT_VERSION: Final[int]
ZIP64_VERSION: Final[int]
BZIP2_VERSION: Final[int]
LZMA_VERSION: Final[int]
if sys.version_info >= (3, 14):
ZSTANDARD_VERSION: Final[int]
MAX_EXTRACT_VERSION: Final[int]