]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-88574: Do not swallow the line after a terminating literal in imaplib ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 10 Jul 2026 17:37:57 +0000 (19:37 +0200)
committerGitHub <noreply@github.com>
Fri, 10 Jul 2026 17:37:57 +0000 (17:37 +0000)
commit13c5575d45b55d8f42239a8d4e2a5026f06a749d
treeb944198ee5df80901cf1a5a7ad6f092cd99ec2f8
parente7f42be4e970f8313a59e871d0703d03ca8d96c4
[3.13] gh-88574: Do not swallow the line after a terminating literal in imaplib (GH-153317) (GH-153326)

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