Repository navigation
Commit 90d0d66
authored
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 86758d1)
1 parent c6ada40 commit 90d0d66
2 files changed
Lines changed: 10 additions & 4 deletions
File tree
- Misc/NEWS.d/next/Core_and_Builtins
- Parser/lexer
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1293 | 1293 | | |
1294 | 1294 | | |
1295 | 1295 | | |
1296 | | - | |
1297 | | - | |
1298 | | - | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
1299 | 1299 | | |
1300 | 1300 | | |
1301 | 1301 | | |
| |||
1309 | 1309 | | |
1310 | 1310 | | |
1311 | 1311 | | |
1312 | | - | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
1313 | 1316 | | |
1314 | 1317 | | |
1315 | 1318 | | |
| |||
0 commit comments