What’s New in Python 3.15 – Early 2026 Highlights Including frozendict
Python 3.15 (expected final release October 2026) brings several exciting built-in improvements. The standout feature is the new frozendict type — an immutable, hashable dictionary. Other highlights include lazy imports (PEP 810), a new statistical sampling profiler, unpacking in comprehensions, and continued JIT/free-threading progress.
TL;DR — Key Features in Python 3.15 (Early 2026)
frozendict— built-in immutable dictionary (PEP 814)- Lazy imports for faster startup (PEP 810)
- New low-overhead sampling profiler (PEP 799)
- Unpacking with * and ** in comprehensions (PEP 798)
- UTF-8 as default encoding everywhere
- Ongoing JIT performance gains
1. frozendict – Immutable Dictionary
from collections.abc import Mapping
fd = frozendict({"a": 1, "b": 2})
print(hash(fd)) # Works!
# fd["a"] = 99 # Raises TypeError - immutable
# Can be used as dict key
d = {fd: "value"}
2. Lazy Imports
import lazy # New syntax or __future__ import
# Module only loads when first used → faster startup
Best Practices for Python 3.15 in 2026
- Use
frozendictfor configuration, cache keys, or any place you need hashable dicts - Enable lazy imports for large applications or CLI tools
- Switch to the new sampling profiler for production performance analysis
- Test your code with the improved JIT for speed gains
Conclusion
Python 3.15 continues the trend of making the language faster, safer, and more ergonomic. The addition of frozendict and lazy imports are particularly welcome for real-world applications in 2026.
Next steps:
- Try
frozendictin your next project that needs immutable mappings