
Python Bytes #459 Inverted dependency trees
34 snips
Nov 24, 2025 Discover the new frozendict built-in type introduced in PEP 814, enhancing Python's immutability. Dive into the transition from Material for MkDocs to the Rust-based Zensical project. Learn how Tack visualizes internal code dependencies and generates architecture graphs. Exciting speedups are on the way for Python 3.15 and 3.16, with enhancements like 30% faster decompression. Plus, find out how to use pip tools to analyze inverted dependency trees and enjoy some witty banter about cloud outages!
AI Snips
Chapters
Books
Transcript
Episode notes
Builtin Immutable Mapping
- frozendict adds a builtin immutable mapping type to Python to prevent unintended modifications and improve safety.
- Michael Kennedy highlights frozen types help express intent and enable safer concurrent reads without locks.
Prefer Immutable Data For Thread Safety
- Use immutable data like frozendict when multiple threads only need read access to avoid locking overhead.
- Michael Kennedy advises preferring frozen types to achieve thread-safe reads and deterministic behavior.
Existing Frozen Types Matter
- Python already has many immutable types like tuple, frozenset, and frozen dataclasses that inform design and safety choices.
- Michael Kennedy notes frozen dict fills a gap and may encourage more immutable patterns in future Python versions.

