]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-88574: Do not swallow the line after a terminating literal in imaplib ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 8 Jul 2026 12:12:22 +0000 (14:12 +0200)
committerGitHub <noreply@github.com>
Wed, 8 Jul 2026 12:12:22 +0000 (12:12 +0000)
commit0dbb00e06078a4efe178bea4fc8c3feb80e3ee15
treee9adc6b1fa60a96fe66465847128e9f5ac67e379
parent9967465da9c5ad426c57fd7c0f17fcdcc188ed11
[3.14] gh-88574: Do not swallow the line after a terminating literal in imaplib (GH-153317) (GH-153325)

GH-152751 skipped a spurious blank line after a literal unconditionally,
corrupting a response that ends with a literal (such as a mailbox name
returned by LIST): its empty trailer was mistaken for the blank and the
following line was swallowed.

The blank is now skipped only inside an unclosed parenthesis.  After a
literal that ends the response it instead arrives before the next
response and is skipped there.
(cherry picked from commit 6b81784f57c6e7ddef61c8db26bb896b3633dcae)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Lib/imaplib.py
Lib/test/test_imaplib.py
Misc/NEWS.d/next/Library/2026-07-01-10-00-00.gh-issue-88574.Kz3wQm.rst