]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-153521: Support structured arguments in imaplib commands (GH-153522)
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 17 Jul 2026 08:06:45 +0000 (11:06 +0300)
committerGitHub <noreply@github.com>
Fri, 17 Jul 2026 08:06:45 +0000 (11:06 +0300)
commit456f3a713eb1fa62e1aa470b7ca8e23caa962c7d
tree6e209f8c067c0e29826e55cb4a1bd846a06a24a7
parent190d2ffbb969ad571fd12d4988b37519091194d5
gh-153521: Support structured arguments in imaplib commands (GH-153522)

Command methods now accept a structured *message_set* (an integer, or a
sequence of integers, (start, stop) ranges and range objects) and lists of
flags or other atoms in place of preformatted parenthesized strings.

The search, fetch, sort, thread and uid methods gain a keyword-only *params*
argument that substitutes and quotes '?' placeholders in their value-bearing
arguments, in the manner of sqlite3 parameter substitution.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: R. David Murray <rdmurray@bitdance.com>
Doc/library/imaplib.rst
Doc/whatsnew/3.16.rst
Lib/imaplib.py
Lib/test/test_imaplib.py
Misc/NEWS.d/next/Library/2026-07-06-14-30-00.gh-issue-153521.iMaP47.rst [new file with mode: 0644]