Python: Locale Encoding Bugs Take Center Stage

A cluster of fixes led by Serhiy Storchaka closes out a family of bugs where non-UTF-8 locales silently corrupted text across sockets, curses, and time functions, while several other PRs harden CPython against crashes from uninitialized memory and out-of-bounds access.

Duration: PT2M37S

Episode overview

This episode is a short developer briefing from Python.

It explains recent repository work in plain language.

  • Show: Python
  • Published: 2026-07-26T13:04:39Z
  • Audio duration: PT2M37S

Transcript excerpt

This excerpt keeps the crawler page concise. Listen to the episode or use the RSS feed for the full update.

Good day. It's July 26th, 2026, and this is your Python developer briefing.

The biggest story today is a coordinated cleanup of locale-encoding bugs that have quietly corrupted text for years on non-UTF-8 systems. The headline fix, PR 154722, addresses FreeBSD, NetBSD, DragonFly BSD, and macOS, where wide-character values don't actually represent Unicode code points in non-UTF-8 locales.…

The second theme is defensive hardening against corrupted or invalid memory states. PR 154721 fixes an out-of-bounds read in dictionary reverse iteration after a dictionary is cleared mid-iteration. PR 154714 fixes a crash in template-string iterators when construction fails partway under memory pressure, leaving…

A smaller but useful theme: asyncio got two real bug fixes this cycle — eager task starts failing without an explicit event loop, fixed in PR 154697 and backported to 3.14 and 3.15, and quadratic-time bytes slicing in the buffered protocol feed path, fixed in PR 150622.

What's next: expect continued backport traffic on the locale and curses fixes, and worth watching whether the t-string and dict-iterator crash fixes get similar backport treatment given their security-adjacent nature.

That's…

Nearby episodes from Python

  1. Thread Safety and the Great Regex Slowdown Cleanup
  2. Curses Crashes and a Careful Revert
  3. Curses, Concurrency, and a Reflog Revert
  4. Weekly Recap - Memory Safety and Backport Discipline
  5. Memory Safety Sweep Across the Interpreter
  6. A Day of Memory Safety Hunting
  7. Concurrency Bugs and Logging Hangs Get Cleaned Up
  8. Data Races, Backports, and BSD Portability