mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 12:35:49 +08:00
Updates for Python 3.14rc1 (#14446)
This commit is contained in:
+1
-1
@@ -281,7 +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, color: bool = False
|
||||
self, prog: str, indent_increment: int = 2, max_help_position: int = 24, width: int | None = None, color: bool = True
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
|
||||
@@ -41,14 +41,11 @@ if sys.platform == "win32":
|
||||
"Server", # from base_events
|
||||
"iscoroutinefunction", # from coroutines
|
||||
"iscoroutine", # from coroutines
|
||||
"_AbstractEventLoopPolicy", # from events
|
||||
"AbstractEventLoop", # from events
|
||||
"AbstractServer", # from events
|
||||
"Handle", # from events
|
||||
"TimerHandle", # from events
|
||||
"_get_event_loop_policy", # from events
|
||||
"get_event_loop_policy", # from events
|
||||
"_set_event_loop_policy", # from events
|
||||
"set_event_loop_policy", # from events
|
||||
"get_event_loop", # from events
|
||||
"set_event_loop", # from events
|
||||
@@ -517,14 +514,11 @@ else:
|
||||
"Server", # from base_events
|
||||
"iscoroutinefunction", # from coroutines
|
||||
"iscoroutine", # from coroutines
|
||||
"_AbstractEventLoopPolicy", # from events
|
||||
"AbstractEventLoop", # from events
|
||||
"AbstractServer", # from events
|
||||
"Handle", # from events
|
||||
"TimerHandle", # from events
|
||||
"_get_event_loop_policy", # from events
|
||||
"get_event_loop_policy", # from events
|
||||
"_set_event_loop_policy", # from events
|
||||
"set_event_loop_policy", # from events
|
||||
"get_event_loop", # from events
|
||||
"set_event_loop", # from events
|
||||
@@ -610,7 +604,6 @@ else:
|
||||
"DatagramTransport", # from transports
|
||||
"SubprocessTransport", # from transports
|
||||
"SelectorEventLoop", # from unix_events
|
||||
"_DefaultEventLoopPolicy", # from unix_events
|
||||
"EventLoop", # from unix_events
|
||||
)
|
||||
elif sys.version_info >= (3, 13):
|
||||
|
||||
@@ -28,14 +28,11 @@ if sys.version_info < (3, 14):
|
||||
# Keep asyncio.__all__ updated with any changes to __all__ here
|
||||
if sys.version_info >= (3, 14):
|
||||
__all__ = (
|
||||
"_AbstractEventLoopPolicy",
|
||||
"AbstractEventLoop",
|
||||
"AbstractServer",
|
||||
"Handle",
|
||||
"TimerHandle",
|
||||
"_get_event_loop_policy",
|
||||
"get_event_loop_policy",
|
||||
"_set_event_loop_policy",
|
||||
"set_event_loop_policy",
|
||||
"get_event_loop",
|
||||
"set_event_loop",
|
||||
|
||||
@@ -16,7 +16,7 @@ _Ts = TypeVarTuple("_Ts")
|
||||
# Keep asyncio.__all__ updated with any changes to __all__ here
|
||||
if sys.platform != "win32":
|
||||
if sys.version_info >= (3, 14):
|
||||
__all__ = ("SelectorEventLoop", "_DefaultEventLoopPolicy", "EventLoop")
|
||||
__all__ = ("SelectorEventLoop", "EventLoop")
|
||||
elif sys.version_info >= (3, 13):
|
||||
# Adds EventLoop
|
||||
__all__ = (
|
||||
|
||||
@@ -19,7 +19,7 @@ from .thread import ThreadPoolExecutor as ThreadPoolExecutor
|
||||
if sys.version_info >= (3, 14):
|
||||
from .interpreter import InterpreterPoolExecutor as InterpreterPoolExecutor
|
||||
|
||||
__all__ = (
|
||||
__all__ = [
|
||||
"FIRST_COMPLETED",
|
||||
"FIRST_EXCEPTION",
|
||||
"ALL_COMPLETED",
|
||||
@@ -34,7 +34,7 @@ if sys.version_info >= (3, 14):
|
||||
"ProcessPoolExecutor",
|
||||
"ThreadPoolExecutor",
|
||||
"InterpreterPoolExecutor",
|
||||
)
|
||||
]
|
||||
|
||||
elif sys.version_info >= (3, 13):
|
||||
__all__ = (
|
||||
|
||||
+10
-2
@@ -1,9 +1,15 @@
|
||||
import sys
|
||||
from _markupbase import ParserBase
|
||||
from re import Pattern
|
||||
from typing import Final
|
||||
|
||||
__all__ = ["HTMLParser"]
|
||||
|
||||
class HTMLParser(ParserBase):
|
||||
CDATA_CONTENT_ELEMENTS: Final[tuple[str, ...]]
|
||||
if sys.version_info >= (3, 14):
|
||||
RCDATA_CONTENT_ELEMENTS: Final[tuple[str, ...]]
|
||||
|
||||
def __init__(self, *, convert_charrefs: bool = True) -> None: ...
|
||||
def feed(self, data: str) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
@@ -17,7 +23,6 @@ class HTMLParser(ParserBase):
|
||||
def handle_comment(self, data: str) -> None: ...
|
||||
def handle_decl(self, decl: str) -> None: ...
|
||||
def handle_pi(self, data: str) -> None: ...
|
||||
CDATA_CONTENT_ELEMENTS: tuple[str, ...]
|
||||
def check_for_whole_start_tag(self, i: int) -> int: ... # undocumented
|
||||
def clear_cdata_mode(self) -> None: ... # undocumented
|
||||
def goahead(self, end: bool) -> None: ... # undocumented
|
||||
@@ -26,7 +31,10 @@ class HTMLParser(ParserBase):
|
||||
def parse_html_declaration(self, i: int) -> int: ... # undocumented
|
||||
def parse_pi(self, i: int) -> int: ... # undocumented
|
||||
def parse_starttag(self, i: int) -> int: ... # undocumented
|
||||
def set_cdata_mode(self, elem: str) -> None: ... # undocumented
|
||||
if sys.version_info >= (3, 14):
|
||||
def set_cdata_mode(self, elem: str, *, escapable: bool = False) -> None: ... # undocumented
|
||||
else:
|
||||
def set_cdata_mode(self, elem: str) -> None: ... # undocumented
|
||||
rawdata: str # undocumented
|
||||
cdata_elem: str | None # undocumented
|
||||
convert_charrefs: bool # undocumented
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from collections.abc import Iterator
|
||||
from types import GenericAlias
|
||||
from typing import Any, Literal, final
|
||||
from typing import Any, Literal, TypeVar, final, overload
|
||||
|
||||
__all__ = ["Interpolation", "Template"]
|
||||
_T = TypeVar("_T")
|
||||
|
||||
@final
|
||||
class Template: # TODO: consider making `Template` generic on `TypeVarTuple`
|
||||
@@ -29,3 +29,8 @@ class Interpolation:
|
||||
cls, value: Any, expression: str = "", conversion: Literal["a", "r", "s"] | None = None, format_spec: str = ""
|
||||
) -> Interpolation: ...
|
||||
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
|
||||
|
||||
@overload
|
||||
def convert(obj: _T, /, conversion: None) -> _T: ...
|
||||
@overload
|
||||
def convert(obj: object, /, conversion: Literal["r", "s", "a"]) -> str: ...
|
||||
|
||||
@@ -254,9 +254,6 @@ class ZipFile:
|
||||
) -> None: ...
|
||||
if sys.version_info >= (3, 11):
|
||||
def mkdir(self, zinfo_or_directory_name: str | ZipInfo, mode: int = 0o777) -> None: ...
|
||||
if sys.version_info >= (3, 14):
|
||||
@property
|
||||
def data_offset(self) -> int | None: ...
|
||||
|
||||
def __del__(self) -> None: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user