Whole file
dynaconf/dynaconf
The author described this change as “fix(nodes): convert container subclasses (#1436)”. It counts as a record because the check below fails on the code as it stood at fb8468d80 and passes on b56a831c0, with nothing else changed between the two runs.
Projectdynaconf/dynaconf
Fix saved2026-07-29
Sharing licenceMIT · LICENSE
Change size+2 −2
What the code was meant to do, written into the code itself as a save note
fix(nodes): convert container subclasses (#1436)
The change
| 702 | 702 | ||
| 703 | 703 | def convert_containers(data: dict | list | DataNode, iter, core): | |
| 704 | 704 | for key, value in iter: | |
| 705 | - | if value.__class__ is dict: | |
| 705 | + | if isinstance(value, dict) and not isinstance(value, DataDict): | |
| 706 | 706 | data[key] = DataDict(value, core=core) | |
| 707 | - | if value.__class__ is list: | |
| 707 | + | if isinstance(value, list) and not isinstance(value, DataList): | |
| 708 | 708 | data[key] = DataList(value, core=core) | |
| 709 | 709 | ||
| 710 | 710 |
The check that tells the two apart
fail→pass·tests/test_nodes.py::test_data_containers_init_converts_subclasses_without_rewrapping_nodes
Check file tests/test_nodes.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before itfb8468d805a6f059355a1685c9ff66b003871df4
Broken version dated2026-07-29
Moduledynaconf.nodes
Units changedconvert_containers
Fingerprinte87e3441e3bd79f6
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in dynaconf/dynaconf
- 2026-08-05find_the_correct_casing
- 2026-08-01get_history
- 2026-07-31fix: add __deepcopy__ to DataDict to match DataList (#1440)
- 2026-07-29normalize_kwargs
- 2026-07-29handle_metavalues
- 2026-07-29object_merge