|
| 1 | +import sys |
1 | 2 | from collections.abc import Iterable, Iterator |
2 | 3 | from email.errors import HeaderParseError, MessageDefect |
3 | 4 | from email.policy import Policy |
@@ -25,6 +26,10 @@ SPECIALSNL: Final[set[str]] |
25 | 26 | def make_quoted_pairs(value: Any) -> str: ... |
26 | 27 | def quote_string(value: Any) -> str: ... |
27 | 28 |
|
| 29 | +if sys.version_info >= (3, 13): |
| 30 | + # Added in Python 3.13.12, 3.14.3 |
| 31 | + def make_parenthesis_pairs(value: Any) -> str: ... |
| 32 | + |
28 | 33 | rfc2047_matcher: Final[Pattern[str]] |
29 | 34 |
|
30 | 35 | class TokenList(list[TokenList | Terminal]): |
@@ -311,6 +316,13 @@ class MessageID(MsgID): |
311 | 316 | class InvalidMessageID(MessageID): |
312 | 317 | token_type: str |
313 | 318 |
|
| 319 | +if sys.version_info >= (3, 13): |
| 320 | + # Added in Python 3.13.12, 3.14.3 |
| 321 | + class MessageIDList(TokenList): |
| 322 | + token_type: str |
| 323 | + @property |
| 324 | + def message_ids(self) -> list[MsgID | Terminal]: ... |
| 325 | + |
314 | 326 | class Header(TokenList): |
315 | 327 | token_type: str |
316 | 328 |
|
@@ -381,6 +393,11 @@ def get_address_list(value: str) -> tuple[AddressList, str]: ... |
381 | 393 | def get_no_fold_literal(value: str) -> tuple[NoFoldLiteral, str]: ... |
382 | 394 | def get_msg_id(value: str) -> tuple[MsgID, str]: ... |
383 | 395 | def parse_message_id(value: str) -> MessageID: ... |
| 396 | + |
| 397 | +if sys.version_info >= (3, 13): |
| 398 | + # Added in Python 3.13.12, 3.14.3 |
| 399 | + def parse_message_ids(value: str) -> MessageIDList: ... |
| 400 | + |
384 | 401 | def parse_mime_version(value: str) -> MIMEVersion: ... |
385 | 402 | def get_invalid_parameter(value: str) -> tuple[InvalidParameter, str]: ... |
386 | 403 | def get_ttext(value: str) -> tuple[ValueTerminal, str]: ... |
|
0 commit comments