]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] 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:42:15 +0000 (09:42 +0200)
committerGitHub <noreply@github.com>
Thu, 2 Jul 2026 07:42:15 +0000 (07:42 +0000)
commitc8663d3dfa2d9dcf92aae614732f83c6e91c0933
tree8230e8e5fbbbfff67b9ee53d498d9590d6e2432d
parent9f4a9447217e30d350d64a3b808ee44b4a3c7cbd
[3.14] gh-108280: Give a meaningful error for an invalid imaplib greeting (GH-152768) (GH-152857)

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]