mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 12:35:49 +08:00
Update to Python 3.14.0b2 (#14182)
This commit is contained in:
+1
-7
@@ -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__(
|
||||
|
||||
@@ -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"]]
|
||||
@@ -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]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import sys
|
||||
import threading
|
||||
from _typeshed import ConvertibleToInt, Incomplete, Unused
|
||||
from collections.abc import Callable, Iterable, Mapping, MutableMapping, Sequence
|
||||
@@ -22,14 +23,19 @@ __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]
|
||||
@@ -37,6 +43,10 @@ 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: ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from collections.abc import Iterator
|
||||
from types import GenericAlias
|
||||
from typing import Any, Literal, final
|
||||
|
||||
__all__ = ["Interpolation", "Template"]
|
||||
@@ -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
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
@@ -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
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user