Skip to content

gh-66335: Test uppercase IMAP4 command names#152876

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:imaplib-test-getattr
Jul 5, 2026
Merged

gh-66335: Test uppercase IMAP4 command names#152876
serhiy-storchaka merged 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
@serhiy-storchaka serhiy-storchaka merged commit 3cd6b74 into python:main Jul 5, 2026
60 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@serhiy-storchaka serhiy-storchaka deleted the imaplib-test-getattr branch July 5, 2026 08:08
@miss-islington-app

Copy link
Copy Markdown

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 3cd6b7406442ad976c6651b9fba6f078971cdf10 3.14

@bedevere-app

bedevere-app Bot commented Jul 5, 2026

Copy link
Copy Markdown

GH-153080 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 5, 2026
@miss-islington-app

Copy link
Copy Markdown

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 3cd6b7406442ad976c6651b9fba6f078971cdf10 3.13

@bedevere-app

bedevere-app Bot commented Jul 5, 2026

Copy link
Copy Markdown

GH-153081 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 5, 2026
@bedevere-app

bedevere-app Bot commented Jul 5, 2026

Copy link
Copy Markdown

GH-153082 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jul 5, 2026
serhiy-storchaka added a commit that referenced this pull request Jul 5, 2026
…53082)

(cherry picked from commit 3cd6b74)

Co-authored-by: Milan Oberkirch <zvyn@oberkirch.org>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
serhiy-storchaka added a commit that referenced this pull request Jul 5, 2026
…53080)

(cherry picked from commit 3cd6b74)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Milan Oberkirch <zvyn@oberkirch.org>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
serhiy-storchaka added a commit that referenced this pull request Jul 5, 2026
…53081)

(cherry picked from commit 3cd6b74)

Co-authored-by: Milan Oberkirch <zvyn@oberkirch.org>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant