Skip to content

gh-155775: Do not consume the CAPABILITY response in imaplib - #155789

Open
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:gh-155775-capability-response
Open

gh-155775: Do not consume the CAPABILITY response in imaplib#155789
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:gh-155775-capability-response

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Aug 14, 2026

Copy link
Copy Markdown
Member

Refreshing the capabilities after a successful LOGIN or AUTHENTICATE (gh-63121) removed the CAPABILITY response from untagged_responses, so response('CAPABILITY') returned [None].

It is now left in place and can be read again. The capabilities advertised in the greeting are still consumed, as the greeting is not a response to a command.

The capabilities attribute, which is the better way to get them, is now documented.

It can again be read with response('CAPABILITY') after LOGIN and
AUTHENTICATE.  The capabilities in the greeting are still consumed.

Also document the capabilities attribute.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34066907 | 📁 Comparing 069bf7e against main (0d87a0b)

  🔍 Preview build  

2 files changed
± library/imaplib.html
± whatsnew/changelog.html

@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Aug 14, 2026
@serhiy-storchaka

Copy link
Copy Markdown
Member Author

Note for the backports: the 3.13 one should change the .. versionchanged:: for the capabilities attribute to 3.13.15, where gh-63121 landed in that branch. 3.14 and 3.15 keep 3.14.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant