Skip to content

gh-66335: Test uppercase IMAP4 command names#152876

Open
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:imaplib-test-getattr
Open

gh-66335: Test uppercase IMAP4 command names#152876
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:imaplib-test-getattr

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

Follow-up to #152872 (gh-66335).

imaplib.IMAP4.__getattr__ lets a command be called under its uppercase name (client.CAPABILITY() in addition to client.capability()), as documented, and raises AttributeError for an unknown name. This adds a test for that behavior, which the coverage PR left out.

Co-authored with the author of the original bpo-22137 patch, which included this test.

Co-authored-by: Milan Oberkirch <zvyn@oberkirch.org>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@serhiy-storchaka serhiy-storchaka requested a review from a team as a code owner July 2, 2026 11:13
@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label Jul 2, 2026
@serhiy-storchaka serhiy-storchaka added skip news 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 Jul 2, 2026
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 skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant