cpython/Parser
Miss Islington (bot) dfbde8cd5b
[3.14] gh-160491: Fix location of invalid escapes in f-strings and t-strings (GH-160493) (#160531)
Literal parts of f-strings and t-strings are decoded only after the
whole string has been parsed, so a decode error took the location of
the last token. The resulting SyntaxError pointed at the closing quote,
and for multi-line strings it could be on the wrong line.

Raise the error at the literal part being decoded instead.
(cherry picked from commit 2258026edd)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2026-10-23 16:32:56 -07:00
..
lexer [3.14] gh-160268: Fix tokenize on a mismatched closing bracket in an f-string (GH-160272) (#160336) 2026-10-22 14:50:13 -07:00
tokenizer [3.14] gh-155525: Fix quadratic f-string tokenization (GH-156756) (#157829) 2026-09-19 22:34:31 +00:00
action_helpers.c [3.14] gh-160491: Fix location of invalid escapes in f-strings and t-strings (GH-160493) (#160531) 2026-10-23 16:32:56 -07:00
asdl.py gh-131421: Fix ASDL tests (#133408) 2025-05-04 23:46:21 +00:00
asdl_c.py [3.14] gh-156909: Fix AST.__repr__ call getting the _fields attribute (GH-157490) (GH-157596) (GH-159232) 2026-10-13 12:12:05 +02:00
myreadline.c [3.14] gh-72353: Continue reading from the console after ignored Ctrl+C (GH-155434) (GH-156590) 2026-08-29 18:39:43 +00:00
parser.c [3.14] gh-151464: exclude '<>' token from tokenize output (GH-154854) (#158190) 2026-09-25 20:38:45 +00:00
peg_api.c
pegen.c [3.14] gh-159739: Preserve the syntax error if metadata allocation fails (GH-159751) (#159846) 2026-10-20 18:37:34 +00:00
pegen.h [3.14] gh-160491: Fix location of invalid escapes in f-strings and t-strings (GH-160493) (#160531) 2026-10-23 16:32:56 -07:00
pegen_errors.c [3.14] gh-160491: Fix location of invalid escapes in f-strings and t-strings (GH-160493) (#160531) 2026-10-23 16:32:56 -07:00
Python.asdl
string_parser.c
string_parser.h
token.c gh-132661: Implement PEP 750 (#132662) 2025-04-30 11:46:41 +02:00