mirror of
https://github.com/python/cpython
synced 2026-11-19 15:54:59 +03:00
Since gh-105042, `tokenize` tolerates mismatched brackets. That also let
a mismatched closing bracket pop the brace that opened an f-string
replacement field, which the f-string state relies on. In `f'{]a'`, this
triggered an assertion failure in _PyLexer_scan_string.
Check the replacement field brace in both modes.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| buffer.c | ||
| buffer.h | ||
| lexer.c | ||
| lexer.h | ||
| state.c | ||
| state.h | ||