
A renderer wants to cache previews by a group of named layout settings. A tuple of sorted pairs is easy to get wrong when new options are added and callers disagree about ordering. Python 3.15 introduced frozendict as an immutable mapping. The project published the referenced release material on 9 October 2026.
Build a controlled reproduction
For an upgrade rehearsal, make the old and new environments explicit. Capture the full Python version, platform, installed package versions and the command used to run the check. A virtual environment isolates packages but still relies on the interpreter that created it.
The three cases below separate a control, an observation and an independent comparison. Use the same application data unless a row explicitly changes it. This is a proposed test procedure; the outcomes are things to inspect on your build, rather than measurements claimed for a product or device.
| Case | Action | Evidence to look for |
|---|---|---|
| Scalar values | Construct equivalent mappings with different insertion orders | Check equality and reuse of the intended key. |
| Nested mutable value | Place a list inside a candidate mapping | Check hashability before passing it to a cache. |
| Changed setting | Build a new mapping with a different column count | Confirm the cache requests another preview. |
Which observation supports the change?
Immutability of the mapping and hashability of all its contents are separate properties. Test the value types the configuration actually allows.
Start with the scalar values case and save its output before examining the candidate. Then complete the nested mutable value case without changing unrelated settings. If the two observations disagree, attach the smallest reproduction and the exact versions involved to the engineering note. Another person should be able to reach the same point without inheriting the first workstation’s cached state.
The limit of the claim
The frozen outer mapping does not make a mutable object stored inside it immutable. Keep nested ownership explicit for reusable configurations.
The last row, changed setting, is the handoff test. Record the action (“Build a new mapping with a different column count”) together with its acceptance condition (“Confirm the cache requests another preview.”). Add the smallest input that reproduces the behaviour to the project’s test or release checklist. A captured result without the conditions that produced it will be difficult to interpret at the next upgrade.
Python 3.15 release notes · Technical reference for the rehearsal
Sources and further reading
Cover photograph: Cherry MX Switches and Razer Switch by Ox1997cow. CC BY-SA 3.0. Cropped and typeset for this cover. The photograph illustrates the topic. This image adaptation uses the same share-alike license.
