Skip to content

gh-153502: Add uid parameter to imaplib command methods#153508

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:imaplib-uid-param
Jul 10, 2026
Merged

gh-153502: Add uid parameter to imaplib command methods#153508
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:imaplib-uid-param

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jul 10, 2026

Copy link
Copy Markdown
Member

Add a keyword-only uid=False argument to the IMAP4 command methods that
have a UID variant: copy, move, fetch, store, search, sort,
thread and expunge. It selects the corresponding UID command, as a
more convenient alternative to uid().

UID EXPUNGE (RFC 4315) takes a message set, so expunge() also gains an
optional message_set argument, required when uid=True.

Add a keyword-only uid=False argument to IMAP4.copy(), move(), fetch(),
store(), search(), sort(), thread() and expunge(), selecting the UID
variant of the command as a shorthand for uid().  expunge() also gains
an optional message_set argument, required for UID EXPUNGE.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33529597 | 📁 Comparing 2eab1cb against main (fc9fe14)

  🔍 Preview build  

3 files changed
± library/imaplib.html
± whatsnew/3.16.html
± whatsnew/changelog.html

@serhiy-storchaka serhiy-storchaka merged commit c98e984 into python:main Jul 10, 2026
53 checks passed
@serhiy-storchaka serhiy-storchaka deleted the imaplib-uid-param branch July 10, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant