You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tokenize crashes on a mismatched closing bracket in an f-string replacement field #160268
The ] closes the replacement field's { without an error, because tokenize tolerates mismatched brackets (gh-105042). The f-string state still expects that { on the bracket stack. Release builds don't crash; they read a stale stack entry instead.
The parser rejects the same input with SyntaxError: f-string: unmatched ']', and tokenize mode should do the same.
Activity
pythongh-160268: Fix tokenize on a mismatched closing bracket in an f…
[3.14] gh-160268: Fix tokenize on a mismatched closing bracket in an …
[3.15] gh-160268: Fix tokenize on a mismatched closing bracket in an …