Files
Arnesh 4192eadc82 [3.13] gh-154711: Strip comments after escaped quotes in f-string debug text (#158310)
When a replacement field ended with a string that had an escaped quote and
was followed by a comment, the comment leaked into the debug f-string output.

The comment detection loop in set_fstring_expr skips escaped characters, but
the comment stripping loop did not. So an escaped quote left the scanner
thinking it was still inside a string, and the comment was never removed.

This makes the stripping loop skip escaped characters the same way the
detection loop does. 3.14 and later already have this fix from gh-154719.
2026-09-29 23:45:21 +01:00
..