Skip to content

Commit 38ec953

Browse files
authored
Update to Python 3.14.0b2 (#14182)
1 parent 033c85d commit 38ec953

File tree

5 files changed

+38
-19
lines changed

5 files changed

+38
-19
lines changed

stdlib/argparse.pyi

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -281,13 +281,7 @@ class HelpFormatter:
281281

282282
if sys.version_info >= (3, 14):
283283
def __init__(
284-
self,
285-
prog: str,
286-
indent_increment: int = 2,
287-
max_help_position: int = 24,
288-
width: int | None = None,
289-
prefix_chars: str = "-",
290-
color: bool = False,
284+
self, prog: str, indent_increment: int = 2, max_help_position: int = 24, width: int | None = None, color: bool = False
291285
) -> None: ...
292286
else:
293287
def __init__(

stdlib/concurrent/futures/interpreter.pyi

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import sys
22
from collections.abc import Callable, Mapping
33
from concurrent.futures import ThreadPoolExecutor
4-
from typing import Final, Literal, Protocol, overload, type_check_only
4+
from typing import Literal, Protocol, overload, type_check_only
55
from typing_extensions import ParamSpec, Self, TypeAlias, TypeVar, TypeVarTuple, Unpack
66

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

40-
UNBOUND: Final = 2
41-
4240
class WorkerContext(ThreadWorkerContext):
4341
# Parent class doesn't have `shared` argument,
4442
@overload # type: ignore[override]

stdlib/multiprocessing/util.pyi

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
import threading
23
from _typeshed import ConvertibleToInt, Incomplete, Unused
34
from collections.abc import Callable, Iterable, Mapping, MutableMapping, Sequence
@@ -22,21 +23,30 @@ __all__ = [
2223
"SUBWARNING",
2324
]
2425

26+
if sys.version_info >= (3, 14):
27+
__all__ += ["warn"]
28+
2529
_T = TypeVar("_T")
2630
_R_co = TypeVar("_R_co", default=Any, covariant=True)
2731

28-
NOTSET: Final[int]
29-
SUBDEBUG: Final[int]
30-
DEBUG: Final[int]
31-
INFO: Final[int]
32-
SUBWARNING: Final[int]
32+
NOTSET: Final = 0
33+
SUBDEBUG: Final = 5
34+
DEBUG: Final = 10
35+
INFO: Final = 20
36+
SUBWARNING: Final = 25
37+
if sys.version_info >= (3, 14):
38+
WARNING: Final = 30
3339

3440
LOGGER_NAME: Final[str]
3541
DEFAULT_LOGGING_FORMAT: Final[str]
3642

3743
def sub_debug(msg: object, *args: object) -> None: ...
3844
def debug(msg: object, *args: object) -> None: ...
3945
def info(msg: object, *args: object) -> None: ...
46+
47+
if sys.version_info >= (3, 14):
48+
def warn(msg: object, *args: object) -> None: ...
49+
4050
def sub_warning(msg: object, *args: object) -> None: ...
4151
def get_logger() -> Logger: ...
4252
def log_to_stderr(level: _LoggingLevel | None = None) -> Logger: ...

stdlib/string/templatelib.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from collections.abc import Iterator
2+
from types import GenericAlias
23
from typing import Any, Literal, final
34

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

@@ -26,3 +28,4 @@ class Interpolation:
2628
def __new__(
2729
cls, value: Any, expression: str, conversion: Literal["a", "r", "s"] | None = None, format_spec: str = ""
2830
) -> Interpolation: ...
31+
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...

stdlib/zipfile/__init__.pyi

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ __all__ = [
2424
"LargeZipFile",
2525
]
2626

27+
if sys.version_info >= (3, 14):
28+
__all__ += ["ZIP_ZSTANDARD"]
29+
2730
# TODO: use TypeAlias for these two when mypy bugs are fixed
2831
# https://github.com/python/mypy/issues/16581
2932
_DateTuple = tuple[int, int, int, int, int, int] # noqa: Y026
@@ -364,10 +367,21 @@ else:
364367

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

367-
ZIP_STORED: Final[int]
368-
ZIP_DEFLATED: Final[int]
369370
ZIP64_LIMIT: Final[int]
370371
ZIP_FILECOUNT_LIMIT: Final[int]
371372
ZIP_MAX_COMMENT: Final[int]
372-
ZIP_BZIP2: Final[int]
373-
ZIP_LZMA: Final[int]
373+
374+
ZIP_STORED: Final = 0
375+
ZIP_DEFLATED: Final = 8
376+
ZIP_BZIP2: Final = 12
377+
ZIP_LZMA: Final = 14
378+
if sys.version_info >= (3, 14):
379+
ZIP_ZSTANDARD: Final = 93
380+
381+
DEFAULT_VERSION: Final[int]
382+
ZIP64_VERSION: Final[int]
383+
BZIP2_VERSION: Final[int]
384+
LZMA_VERSION: Final[int]
385+
if sys.version_info >= (3, 14):
386+
ZSTANDARD_VERSION: Final[int]
387+
MAX_EXTRACT_VERSION: Final[int]

0 commit comments

Comments
 (0)