]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-90890: New methods to access mailbox.Maildir message info and flags (#103905)
authorStephen Gildea <stepheng-bpo@gildea.com>
Sat, 11 Nov 2023 17:41:33 +0000 (09:41 -0800)
committerGitHub <noreply@github.com>
Sat, 11 Nov 2023 17:41:33 +0000 (17:41 +0000)
commit38035fed9ba543d587c1fbba5c463d34edf3aff9
treecfb93161065f04daa9a7c77b41d510d096ab126f
parentfa84e5fe0a3bd8e77c33b20867d71ac6bee270f9
gh-90890: New methods to access mailbox.Maildir message info and flags (#103905)

New methods to access mailbox.Maildir message info and flags:
get_info, set_info, get_flags, set_flags, add_flag, remove_flag.

These methods speed up accessing a message's info and/or flags and are
useful when it is not necessary to access the message's contents,
as when iterating over a Maildir to find messages with specific flags.

---------

* Add more str type checking
* modernize to f-strings instead of %

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Doc/library/mailbox.rst
Lib/mailbox.py
Lib/test/test_mailbox.py
Misc/ACKS
Misc/NEWS.d/next/Library/2023-04-26-16-37-00.gh-issue-90890.fIag4w.rst [new file with mode: 0644]