Python: Import Lock and Socket Leak Fixes

CPython landed reliability fixes for a permanent import-lock hang on stack exhaustion and a descriptor leak in socket.fromfd, plus better asyncio introspection. The rest of the day was test stability, docs, and build hygiene across main and backports.

Duration: PT2M14S

Episode overview

This episode is a short developer briefing from Python.

It explains recent repository work in plain language.

  • Show: Python
  • Published: 2026-10-28T13:08:41Z
  • Audio duration: PT2M14S

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 Wednesday, October 28th, 2026, and this is your Python briefing.

The throughline today is preventing rare permanent failures, plus better visibility into async code.

First, resource cleanup on error paths. When an import failed with a stack overflow recursion error, releasing import locks could itself fail for lack of stack, leaving the global import lock or a per-module lock held forever and blocking later imports in other threads. Pull request 159660 changes the acquire lock…

Second, asyncio introspection. Pull request 160805 adds support for generator-based awaitables in asyncio introspection tooling, and pull request 158470 exposes the inner future on the future iterator as an F I future attribute, with matching Python and C implementations. For developers debugging stuck tasks, that…

Finally, a hygiene wave. Multiprocessing tests in pull request 158977 swap fixed sleeps for bounded waits and guarantee pool cleanup on assertion failure, which should cut flakes on slow machines. There's also a compiler change shrinking padding in the flow-graph basic block structure with no behavior change, a…

What's next: if you maintain threaded importers, socket servers, or…

Nearby episodes from Python

  1. Compression Speed and Codec Reliability Push
  2. Speedups, Threading Fixes, and Encoder Corrections
  3. Core Speedups and Boundary Hardening
  4. Asyncio Hardening and OSError Safety Fix
  5. ZoneInfo Security Fix and Thread-Safety Hardening
  6. Security Backports and Faster AST Parsing
  7. Weekly Recap - Certificate Distrust and Concurrency Hardening
  8. Threading Reliability and Security Hardening