mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-19 14:40:30 +08:00
[stdlib] Updates for Python 3.13.12 and 3.14.3 (#15371)
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user