]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.15] 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:46:30 +0000 (09:46 +0200)
committerGitHub <noreply@github.com>
Thu, 2 Jul 2026 07:46:30 +0000 (07:46 +0000)
commit6a1a23f2e79617e5d7ef3ce141105f9f9fc50b10
tree5fbd80e98136eac8ab0793202fe0361ad828eab5
parentf4b3dd560012658deac4f74ea778ee8563cbe181
[3.15] gh-108280: Give a meaningful error for an invalid imaplib greeting (GH-152768) (GH-152856)

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]