]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-108280: Give a meaningful error for an invalid imaplib greeting (GH-152768...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 2 Jul 2026 07:39:04 +0000 (09:39 +0200)
committerGitHub <noreply@github.com>
Thu, 2 Jul 2026 07:39:04 +0000 (07:39 +0000)
commit3f0ef65f7a729ddf417977ca0e89c3ae608b76eb
treef18db45db9e9af6d08a6a23584bd629c4abbbea8
parentfba6c1a842f96151e4e216ec042ac695252d160f
[3.13] gh-108280: Give a meaningful error for an invalid imaplib greeting (GH-152768) (GH-152858)

Connecting to a server that does not send a valid IMAP4 greeting, such as
a POP3 server answering on the IMAP port, failed with the unhelpful
"imaplib.IMAP4.error: None".  A meaningful message is now raised instead.
(cherry picked from commit 262b6a0df5a325e788928ab0cd514fa4786571b4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Lib/imaplib.py
Lib/test/test_imaplib.py
Misc/NEWS.d/next/Library/2026-07-01-12-00-00.gh-issue-108280.Nq8vTr.rst [new file with mode: 0644]