mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 12:35:49 +08:00
[stdlib] Updates for Python 3.13.12 and 3.14.3 (#15371)
This commit is contained in:
@@ -253,6 +253,7 @@ py_compile: 3.0-
|
||||
pyclbr: 3.0-
|
||||
pydoc: 3.0-
|
||||
pydoc_data: 3.0-
|
||||
pydoc_data.module_docs: 3.13-
|
||||
pyexpat: 3.0-
|
||||
queue: 3.0-
|
||||
quopri: 3.0-
|
||||
|
||||
+4
-1
@@ -334,7 +334,10 @@ class HelpFormatter:
|
||||
def _format_usage(
|
||||
self, usage: str | None, actions: Iterable[Action], groups: Iterable[_MutuallyExclusiveGroup], prefix: str | None
|
||||
) -> str: ...
|
||||
def _format_actions_usage(self, actions: Iterable[Action], groups: Iterable[_MutuallyExclusiveGroup]) -> str: ...
|
||||
if sys.version_info < (3, 14):
|
||||
# Removed in Python 3.14.3
|
||||
def _format_actions_usage(self, actions: Iterable[Action], groups: Iterable[_MutuallyExclusiveGroup]) -> str: ...
|
||||
|
||||
def _format_text(self, text: str) -> str: ...
|
||||
def _format_action(self, action: Action) -> str: ...
|
||||
def _format_action_invocation(self, action: Action) -> str: ...
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import sys
|
||||
from collections.abc import Iterable, Iterator
|
||||
from email.errors import HeaderParseError, MessageDefect
|
||||
from email.policy import Policy
|
||||
@@ -25,6 +26,10 @@ SPECIALSNL: Final[set[str]]
|
||||
def make_quoted_pairs(value: Any) -> str: ...
|
||||
def quote_string(value: Any) -> str: ...
|
||||
|
||||
if sys.version_info >= (3, 13):
|
||||
# Added in Python 3.13.12, 3.14.3
|
||||
def make_parenthesis_pairs(value: Any) -> str: ...
|
||||
|
||||
rfc2047_matcher: Final[Pattern[str]]
|
||||
|
||||
class TokenList(list[TokenList | Terminal]):
|
||||
@@ -311,6 +316,13 @@ class MessageID(MsgID):
|
||||
class InvalidMessageID(MessageID):
|
||||
token_type: str
|
||||
|
||||
if sys.version_info >= (3, 13):
|
||||
# Added in Python 3.13.12, 3.14.3
|
||||
class MessageIDList(TokenList):
|
||||
token_type: str
|
||||
@property
|
||||
def message_ids(self) -> list[MsgID | Terminal]: ...
|
||||
|
||||
class Header(TokenList):
|
||||
token_type: str
|
||||
|
||||
@@ -381,6 +393,11 @@ def get_address_list(value: str) -> tuple[AddressList, str]: ...
|
||||
def get_no_fold_literal(value: str) -> tuple[NoFoldLiteral, str]: ...
|
||||
def get_msg_id(value: str) -> tuple[MsgID, str]: ...
|
||||
def parse_message_id(value: str) -> MessageID: ...
|
||||
|
||||
if sys.version_info >= (3, 13):
|
||||
# Added in Python 3.13.12, 3.14.3
|
||||
def parse_message_ids(value: str) -> MessageIDList: ...
|
||||
|
||||
def parse_mime_version(value: str) -> MIMEVersion: ...
|
||||
def get_invalid_parameter(value: str) -> tuple[InvalidParameter, str]: ...
|
||||
def get_ttext(value: str) -> tuple[ValueTerminal, str]: ...
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import sys
|
||||
import types
|
||||
from collections.abc import Iterable, Mapping
|
||||
from datetime import datetime as _datetime
|
||||
@@ -137,6 +138,17 @@ class MessageIDHeader:
|
||||
@staticmethod
|
||||
def value_parser(value: str) -> MessageID: ...
|
||||
|
||||
if sys.version_info >= (3, 13):
|
||||
from email._header_value_parser import MessageIDList
|
||||
|
||||
# Added in Python 3.13.12, 3.14.3
|
||||
class ReferencesHeader:
|
||||
max_count: ClassVar[Literal[1]]
|
||||
@classmethod
|
||||
def parse(cls, value: str, kwds: dict[str, Any]) -> None: ...
|
||||
@staticmethod
|
||||
def value_parser(value: str) -> MessageIDList: ...
|
||||
|
||||
@type_check_only
|
||||
class _HeaderParser(Protocol):
|
||||
max_count: ClassVar[Literal[1] | None]
|
||||
|
||||
@@ -16,6 +16,7 @@ class ForkServer:
|
||||
def ensure_running(self) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
# `sys_argv` parameter added in Python 3.14.3
|
||||
def main(
|
||||
listener_fd: int | None,
|
||||
alive_r: FileDescriptorLike,
|
||||
@@ -23,9 +24,22 @@ if sys.version_info >= (3, 14):
|
||||
main_path: str | None = None,
|
||||
sys_path: list[str] | None = None,
|
||||
*,
|
||||
sys_argv: list[str] | None = None,
|
||||
authkey_r: int | None = None,
|
||||
) -> None: ...
|
||||
|
||||
elif sys.version_info >= (3, 13):
|
||||
# `sys_argv` parameter added in Python 3.13.12
|
||||
def main(
|
||||
listener_fd: int | None,
|
||||
alive_r: FileDescriptorLike,
|
||||
preload: Sequence[str],
|
||||
main_path: str | None = None,
|
||||
sys_path: list[str] | None = None,
|
||||
*,
|
||||
sys_argv: list[str] | None = None,
|
||||
) -> None: ...
|
||||
|
||||
else:
|
||||
def main(
|
||||
listener_fd: int | None,
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
from typing import Final
|
||||
|
||||
module_docs: Final[dict[str, str]]
|
||||
Reference in New Issue
Block a user