]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.15] 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:17:10 +0000 (14:17 +0200)
committerGitHub <noreply@github.com>
Wed, 8 Jul 2026 12:17:10 +0000 (12:17 +0000)
commit217472d4cec3e5d19e7f3a718df5c429618d6a5f
tree448e5b189db8cd6ad1ffc9236f32d4b4135f0c87
parent10ea39e3582124901c2a9ce3289cfebafce92a33
[3.15] gh-88574: Do not swallow the line after a terminating literal in imaplib (GH-153317) (GH-153324)

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