Skip to content

[3.14] gh-63121: Refresh imaplib capabilities on state changes (GH-152752)#152855

Merged
serhiy-storchaka merged 1 commit into
python:3.14from
miss-islington:backport-c89b72a-3.14
Jul 2, 2026
Merged

[3.14] gh-63121: Refresh imaplib capabilities on state changes (GH-152752)#152855
serhiy-storchaka merged 1 commit into
python:3.14from
miss-islington:backport-c89b72a-3.14

Conversation

@miss-islington

@miss-islington miss-islington commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

imaplib fetched the server capabilities only once, at connection time.
They are now also refreshed after a successful LOGIN or AUTHENTICATE,
from the CAPABILITY response the server sent or, if it sent none, by
querying it. This lets methods such as enable() see capabilities added
after login, for example ENABLE on Gmail (gh-103451).

Capabilities advertised in the server greeting are now used too, saving
a redundant CAPABILITY command.
(cherry picked from commit c89b72a)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-authored-by: Claude Opus 4.8 (1M context) noreply@anthropic.com

…GH-152752)

imaplib fetched the server capabilities only once, at connection time.
They are now also refreshed after a successful LOGIN or AUTHENTICATE,
from the CAPABILITY response the server sent or, if it sent none, by
querying it.  This lets methods such as enable() see capabilities added
after login, for example ENABLE on Gmail (pythongh-103451).

Capabilities advertised in the server greeting are now used too, saving
a redundant CAPABILITY command.
(cherry picked from commit c89b72abed7393d9d428f1e336e3aa02e7ef6ce8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@miss-islington miss-islington requested a review from a team as a code owner July 2, 2026 07:10
@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) July 2, 2026 07:13
@serhiy-storchaka serhiy-storchaka merged commit 9f4a944 into python:3.14 Jul 2, 2026
49 checks passed
@miss-islington miss-islington deleted the backport-c89b72a-3.14 branch July 2, 2026 07:38
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.

2 participants