Python Weekly #9: Euclidean Affine Algorithm Speeds Up datetime, Free-Threaded Runtime Reworks QSBR, and mod_wsgi Creator Launches Muru

Python · Weekly #9

Python Weekly #9: Euclidean Affine Algorithm Speeds Up datetime, Free-Threaded Runtime Reworks QSBR, and mod_wsgi Creator Launches Muru

pythonPythonlanguage weeklyperformance engineeringruntime evolution

Sources:GitHub Releases + 官方博客 + HN

Welcome to issue 9 of the Python column on Tuanzi Tech Daily. During this cycle (November 16–23, 2026), official stable branches operated smoothly while release managers adjusted future release schedules; CPython main merged the Neri-Schneider Euclidean affine algorithm to overhaul Gregorian calendar conversions, restructured QSBR deallocation timings in the free-threaded runtime to eradicate deadlock hazards, and wired core standard library types into vectorcall; on the community front, the author of mod_wsgi unveiled Muru, an experimental application server in Rust, and the Ruff-based dead-code analysis tool Unref triggered real-world compatibility testing against dynamic frameworks. Here is our roundup of the week’s verified technical facts.

📦 Releases

Stable Branch Maintenance Status

The current latest stable mainline version is Python 3.15.2, with the release date on the official download page verified verbatim as Oct. 25, 2026, signed by release manager Hugo van Kemenade. The previous stable maintenance release is Python 3.14.10 (also released on Oct. 25, 2026).

For an in-depth breakdown of features in the 3.15 series, see: Python 3.15 New Features: Explicit Lazy Imports and Native frozendict Drive Performance Gains.

This week, release manager Hugo van Kemenade submitted updates to PEP 745 and PEP 790 (PR #5238), adjusting the delivery timetable for upcoming maintenance releases: the target release dates for Python 3.15.3 and Python 3.14.11 have been postponed by one week from December 1, 2026, to December 8, 2026.

Current branch maintenance schedules are summarized below:

BranchCurrent versionOfficial release dateMaintenance statusNext maintenance release target
Python 3.163.16.0a22026-11-10Alpha preview phase3.16.0a3 (2026-12-15)
Python 3.153.15.2Oct. 25, 2026Active stable support (Bugfix)3.15.3 (2026-12-08)
Python 3.143.14.10Oct. 25, 2026Stable support (Bugfix)3.14.11 (2026-12-08)
Python 3.133.13.18Oct. 25, 2026Security maintenance phase (Security-only)Security patches as needed
Python 3.123.12.16Oct. 25, 2026Security maintenance phase (Security-only)Security patches as needed

On November 16, 2026, the official Python blog announced that translation platform XTM Transifex is sponsoring a complimentary 12-month Growth subscription for the Python documentation translation team, supporting multi-language collaborative review workflows.


📝 Deep Dives

datetime Adopts the Neri-Schneider Euclidean Affine Algorithm (PR #161747)

  • What happened: Contributor Aleksandr Mazalov submitted code replacing the Gregorian ordinal-to-date conversion logic in Modules/_datetimemodule.c and Lib/_pydatetime.py with the Neri-Schneider Euclidean affine algorithm. The pull request exhaustively compared all 3,652,059 valid dates from year 1 to 9999 AD, confirming identical output between the new and legacy implementations.
  • Why it matters: The previous 2002 algorithm relied on four divisions and speculative branch adjustments, triggering a correction loop for 24% of all dates historically. The new algorithm leverages the mathematical properties of affine transformations to eliminate speculative adjustments entirely, allowing compilers like MSVC and GCC to generate branch-free cmovbe assembly instructions. The algorithm was previously adopted by the Linux kernel, libstdc++, and the Go runtime.
  • Who it affects: Quantitative backtesting and log analysis systems that execute date.fromordinal(), ISO 8601 parsing, and time-series labeling at high throughput.

Free-Threaded Runtime Reworks QSBR Deferred Reclamation Timing (PR #160698)

  • What happened: While testing the memory model of free-threaded Python, the formal verification team reproduced a crash caused by object deallocation during dictionary rehashing (gh-160697). Kirill Podoprigora moved the QSBR deferred queue processing out of the low-level allocator _PyMem_FreeDelayed() and relocated it to interpreter evaluation loop interrupt checkpoints (eval breaker).
  • Why it matters: In a free-threaded environment without the GIL, if an object slated for deferred collection executes a custom __del__ method, re-entering Python bytecode while holding lower-level allocator locks triggers lock contention and state corruption. Moving reclamation to the eval breaker ensures finalizers run only when the executing thread sits at a safe evaluation boundary and has completely exited lower-level critical sections, eliminating deadlock risks.
  • Who it affects: Developers building concurrent services under free-threaded Python whose business objects implement custom __del__ finalizers or weak-reference callbacks.

Core Standard Library Constructors Adopt Argument Clinic Vectorcall Protocol (PR #162430)

  • What happened: In gh-162350, Tan Long wired the __new__ constructors of types.MappingProxyType, types.CellType, types.FrameLocalsProxyType, and contextvars.ContextVar into Argument Clinic’s @vectorcall protocol.
  • Why it matters: Microbenchmarks show that adopting vectorcall slashes instantiation overhead for MappingProxyType(d) from 134 ns down to 90.8 ns (a 1.46x speedup); instantiation costs for types.CellType and ContextVar drop by roughly 20% to 30%, removing the standard C-extension overhead of parameter tuple unpacking and dictionary lookups.
  • Who it affects: Low-level framework components heavily reliant on read-only mapping proxies and context-isolated variables, including ASGI asynchronous dispatchers and OpenTelemetry trace interceptors.

PEP 838 Proposes Standardizing python-version in pyvenv.cfg

  • What happened: Astral engineer Konstantin Schütze and core developer Alex Waygood submitted PEP 838, proposing a standardized python-version key in the virtual environment configuration file pyvenv.cfg, recording strictly major.minor (e.g., python-version = 3.16).
  • Why it matters: Tooling currently exhibits fragmented behavior: the built-in venv writes a three-part patch version (version = 3.15.2), while virtualenv records a full tuple. When system Python receives a patch security update (such as 3.15.3), symlinks update but the config file’s patch version becomes invalid and misleading. PEP 838 decouples patch upgrades from environment metadata by pinning only major and minor versions.
  • Who it affects: Maintainers of virtual environment management tools like uv, pipenv, and poetry, as well as CI/CD teams reusing virtual environment templates across multi-container pipelines.

🔥 Community Buzz

mod_wsgi Creator Launches Muru, an Experimental Python Web Container in Rust

  • Where to follow: Simon Willison’s technical review; Hacker News discussion with 67 points and 10 comments (HN #50597959).

  • Points of contention: Apache mod_wsgi author Graham Dumpleton released Muru (GitHub: muruhq/muru), an experimental web server supporting WSGI and ASGI built in Rust. Muru employs an “import once, fork many” architecture: the master process pre-imports application modules, invokes gc.freeze() to halt garbage-collection tracking, and uses fork() to spawn worker processes, preventing copy-on-write (CoW) page invalidation during worker GC sweeps.

    Community discussions centered on two main debates:

    1. Applicability of Zygote architectures in the async era: Supporters praised automatic HTTPS during local development and reduced memory footprints in production; critics countered that modern cloud-native topologies rely on single-process-per-container horizontal scaling, where preloading and forking on the host increases state-leak debugging difficulty and introduces potential conflicts with async event loops.
    2. Acceptance of AI-assisted development and technical writing: The author noted that code and extensive design memos were produced with AI assistance. While some engineers welcomed the transparent experiment, others criticized the verbose design documentation as increasing the cost of extracting useful information.

Unref: Ruff-Based Rust Dead Code Hunter Sparks Practical Framework Benchmarking

  • Where to follow: GitHub release; Hacker News discussion with 63 points and 18 comments (HN #50517410).

  • Points of contention: Developer Apakottur released Unref (GitHub: Apakottur/unref), a dead-code analysis tool implemented in Rust using Ruff’s parser. In benchmarks scanning the entire CPython repository (~2,300 files), Unref detected unused symbols across the codebase in hundreds of milliseconds, dramatically outperforming pure-Python tools like Vulture.

    Community feedback highlighted the tension between static speed and dynamic runtime semantics:

    1. False-positive dilemma in dynamic frameworks: Developers running tests on Flask and Django projects found Unref reporting dozens to hundreds of false positives, including global settings in Django settings.py, dynamically registered signal receivers, and route handlers implicitly invoked via decorators.
    2. Engineering utility of pure static analysis: One camp argued that rapid static filtering is invaluable for refactoring legacy codebases where manual triage is manageable; another maintained that without framework-aware plugins, excessive false positives disqualify the tool from automated CI pipelines.

Inside PyPy: Exploring RPython’s Constrained Design and the Costs of Self-Hosting

  • Where to follow: Technical essay by Max Bernstein; Hacker News discussion with 45 points and 4 comments (HN #50562207).

  • Points of contention: The post dissects the static type inference system and meta-tracing JIT compiler pipeline behind PyPy’s core, RPython. RPython enables developers to implement an interpreter in a restricted subset of Python syntax while automatically generating C code and a high-performance JIT compiler.

    Discussions centered on the long-term engineering cost of maintaining a self-hosted dynamic dialect:

    1. High abstraction of meta-tracing JITs: Proponents highlighted that RPython frees interpreter authors from writing manual assembly backends while reaping JIT performance benefits, representing a pioneering software engineering paradigm.
    2. Modern systems programming alternatives: Detractors cited empirical data showing RPython’s strict type constraints and multi-minute compilation cycles. With mature systems languages like Rust, Zig, and Nim offering modern type systems and memory safety, maintaining an isolated, restricted dynamic dialect toolchain yields diminishing returns compared to writing interpreters directly in native systems languages.

🔭 Coming Next Week

  1. Python 3.15.3 and 3.14.11 post-delay release freeze milestones: Following the PEP 745 and PEP 790 reschedule to December 8, 2026, the release team will run pre-integration tests covering free-threaded dictionary rehashing fixes and Windows ARM64 builds next week.
  2. Steering Council 2027 nomination phase progress: In accordance with PEP 8108, candidate nominations will transition into verification and public campaigning next week.
  3. PEP 838 review within the PyPA community: Packaging tool maintainers will evaluate default behaviors for the proposed python-version field in pyvenv.cfg, analyzing backwards compatibility impacts on pip, virtualenv, and CI caching mechanisms.