Python: Parser Speed and Memory Safety Sweep
Pablo Galindo Salgado's parser optimization series lands five merged PRs cutting redundant work in the C parser, while a separate cluster of fixes closes use-after-free and crash bugs in curses, csv, and bytes handling.
Duration: PT2M48S
Episode overview
This episode is a short developer briefing from Python.
It explains recent repository work in plain language.
- Show: Python
- Published: 2026-09-15T13:08:22Z
- Audio duration: PT2M48S
Transcript excerpt
This excerpt keeps the crawler page concise. Listen to the episode or use the RSS feed for the full update.
Good morning. It's September 15th, 2026, and this is Python.
The headline today is a coordinated push to make the parser faster without changing behavior, running alongside a cleanup of memory safety bugs across the C internals.
Start with the parser. Under tracking issue 153568, five related pull requests landed back to back. PR 153573 caches thread state so the stack-overflow check becomes a single inline comparison instead of a function call on every rule. PR 153574 stops re-walking memo lists for left-recursive rules. PR 153576 skips…
The second theme is memory safety cleanup, mostly in native extension modules. Two curses bugs — PR 155914 and PR 156947 — both fix use-after-free conditions where a deallocation could reach back into a screen or panel that was already being torn down. Separately, Victor Stinner's PR 157529 adds debug-mode overflow…
Also worth flagging: PR 157381 fixes a free-threading bug where `gc.get_count` could corrupt allocation counters, and PR 157499 aims to guarantee type slot structures are never null in `PyType_Ready`, removing a class of defensive null checks scattered through the C API.
What to remember: if you're touching the parser, expect the…
Nearby episodes from Python
- XML Cleanup, Parser Speedups, and a Docs Split
- Weekly Recap - Memory Safety, Bytes Internals, and Doc Restructuring
- Hardening the Bytes Core and Trimming the Parser
- Hardening the Bytes Writer, Cleaning Up Async Task Tracking
- Free-Threading Bugs Take Center Stage
- Buffer Safety Sweep in Bytes and Strings
- Correctness Cleanup Across the Board
- Buffer Bugs and the Long Tail of Correctness Fixes