From 2a68dfc5fbbd82add2d633b4704c87cf83492a6c Mon Sep 17 00:00:00 2001 From: Max Muoto Date: Tue, 9 Jul 2024 17:18:18 -0500 Subject: [PATCH] `maildir` 3.13 changes (#12303) --- stdlib/@tests/stubtest_allowlists/py313.txt | 6 ------ stdlib/mailbox.pyi | 8 ++++++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/stdlib/@tests/stubtest_allowlists/py313.txt b/stdlib/@tests/stubtest_allowlists/py313.txt index a113c6c79..2f3db297a 100644 --- a/stdlib/@tests/stubtest_allowlists/py313.txt +++ b/stdlib/@tests/stubtest_allowlists/py313.txt @@ -102,12 +102,6 @@ importlib.resources.open_text importlib.resources.path importlib.resources.read_binary importlib.resources.read_text -mailbox.Maildir.add_flag -mailbox.Maildir.get_flags -mailbox.Maildir.get_info -mailbox.Maildir.remove_flag -mailbox.Maildir.set_flags -mailbox.Maildir.set_info os.path.splitroot # `__replace__` to be special cased in dataclasses pstats.FunctionProfile.__replace__ diff --git a/stdlib/mailbox.pyi b/stdlib/mailbox.pyi index 2f43f9552..a98a00a42 100644 --- a/stdlib/mailbox.pyi +++ b/stdlib/mailbox.pyi @@ -115,6 +115,14 @@ class Maildir(Mailbox[MaildirMessage]): def get_message(self, key: str) -> MaildirMessage: ... def get_bytes(self, key: str) -> bytes: ... def get_file(self, key: str) -> _ProxyFile[bytes]: ... + if sys.version_info >= (3, 13): + def get_info(self, key: str) -> str: ... + def set_info(self, key: str, info: str) -> None: ... + def get_flags(self, key: str) -> str: ... + def set_flags(self, key: str, flags: str) -> None: ... + def add_flag(self, key: str, flag: str) -> None: ... + def remove_flag(self, key: str, flag: str) -> None: ... + def iterkeys(self) -> Iterator[str]: ... def __contains__(self, key: str) -> bool: ... def __len__(self) -> int: ...