Python: Memory Safety Sweep in CPython Internals
CPython landed a cluster of fixes for reentrancy and race-condition bugs across core objects—text I O, byte arrays, type attribute updates, and frame handling—alongside a security fix scoping password manager credentials by U R L scheme. Several changes are already backported across the 3.13 through 3.15 branches.
Duration: PT2M34S
Episode overview
This episode is a short developer briefing from Python.
It explains recent repository work in plain language.
- Show: Python
- Published: 2026-08-18T13:08:23Z
- Audio duration: PT2M34S
Transcript excerpt
This excerpt keeps the crawler page concise. Listen to the episode or use the RSS feed for the full update.
It's August 18th, and here's what mattered in CPython today.
The dominant theme is memory safety under reentrancy and concurrency. Several fixes this cycle addressed cases where code assumed a single-threaded, non-reentrant world—and paid for it. PR 153540, from tonghuaroot, fixed a use-after-free in TextIOWrapper's tell method: a reentrant decoder could free memory that tell…
Second theme: correctness fixes are getting backported aggressively. Serhiy Storchaka's Argument Clinic fix, PR 155778, corrects broken getter and setter generation and is already flowing into the 3.13, 3.14, and 3.15 branches. The same pattern applies to the HTTP password manager fix, PR 155696 from lkk7, which…
One more to flag: PR 155293 fixed Unicode codepoint handling in string prep, ensuring RFC 3454 compliance stays strict to Unicode 3.2, which affects internationalized domain name and password-hardening code paths.
What's next: expect continued backport traffic on these fixes as they settle into 3.13 through 3.15, and keep an eye on free-threaded builds, where reentrancy bugs like these are most likely to resurface.
That's the briefing for August 18th.
Nearby episodes from Python
- Crash Fixes Sweep the Backports
- The Great Attribute Deletion Bug Hunt
- C Attribute Setters Get a Cleanup Pass
- Free-Threading Hardens, Backports Sweep the Board
- Marshal Module's Bad Week
- Weekly Recap - Data Integrity and Backport Discipline
- Curses Cleanup and a Wave of Correctness Fixes
- Free-Threading Race Conditions Take Center Stage