Skip to content

[3.13] gh-88574: Do not swallow the line after a terminating literal in imaplib (GH-153317)#153326

Open
miss-islington wants to merge 1 commit into
python:3.13from
miss-islington:backport-6b81784-3.13
Open

[3.13] gh-88574: Do not swallow the line after a terminating literal in imaplib (GH-153317)#153326
miss-islington wants to merge 1 commit into
python:3.13from
miss-islington:backport-6b81784-3.13

Conversation

@miss-islington

@miss-islington miss-islington commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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 6b81784)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-authored-by: Claude Opus 4.8 noreply@anthropic.com

…n imaplib (pythonGH-153317)

pythonGH-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 6b81784)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants