Python: Argument Clinic Gets a Major Overhaul

Serhiy Storchaka led a cluster of changes that fix long-standing bugs in Argument Clinic's handling of optional argument groups, while separate fixes tightened error handling around lazy imports, macOS system calls, and text I/O thread safety.

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-08-05T13:08:33Z
  • 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 day, and welcome to Python for August 5th, 2026.

The biggest story today is a coordinated push to fix Argument Clinic, the tool that generates C code for parsing Python function arguments. Multiple related bugs converged on the same root cause: how Clinic handles optional argument groups.

PR 155191 fixed a case where parameters with default values outside a group were incorrectly required, even though they looked optional in the function signature. PR 155210 went further, letting Clinic support multiple optional groups at the same nesting level, something only nested groups could do before. That…

Second theme: tightening error semantics. PR 155189 makes lazy imports of submodule attributes, like "math.pi", correctly raise ModuleNotFoundError instead of silently returning the parent module. PR 155177 makes the C datetime parser reject malformed ISO 8601 fractional seconds that lack a decimal mark, closing a…

Third, platform and concurrency fixes: PR 155174 and its backports add runtime guards so Python doesn't crash on older macOS systems lacking dup3 and pipe2, calls introduced in newer macOS releases. Separately, commit 8440a6a fixes a data race in TextIOWrapper's detach…

What's…

Nearby episodes from Python

  1. Security Backports and the Algorithmic Complexity Sweep
  2. CSV Sniffer Gets Untangled From Exponential Time
  3. Weekly Recap - Correctness Fixes and Release Prep
  4. Decimal, Copy Semantics, and a Logging Race Fix
  5. Crash Fixes Across Async and Memory Internals
  6. Curses Cleanup and Correctness Fixes Dominate the Day
  7. Hardening the Corners Before 3.15
  8. Thread Safety and the Great Regex Slowdown Cleanup