One function
handle_metavalues in dynaconf/dynaconf
The author described this change as “fix: avoid crash merging a dynaconf_merge list into a missing key (#1410)”. It counts as a record because the check below fails on the code as it stood at cea5adf4b and passes on e95480910, with nothing else changed between the two runs.
Projectdynaconf/dynaconf
Fix saved2026-06-27
Sharing licenceMIT · LICENSE
Change size+1 −1
What the code was meant to do, written into the code itself as a docstring
Cleanup of MetaValues on new dict :param old: old values :param new: new values :param list_merge: Methods to use to merge lists - merge: default merge behavior, i.e. (unique) concatenation - shallow: replace the top-most level list of the nested structure - deep: iteratively traverse the nested structure and replace the element in the list at the level specified by the full_path
The change
| 55 | 55 | value.remove("dynaconf_merge_unique") | |
| 56 | 56 | unique = True | |
| 57 | 57 | ||
| 58 | - | for item in old.get(key)[::-1]: | |
| 58 | + | for item in (old.get(key) or [])[::-1]: | |
| 59 | 59 | if unique and item in value: | |
| 60 | 60 | continue | |
| 61 | 61 | value.insert(0, item) |
The check that tells the two apart
fail→pass·tests/test_utils.py::test_merge_list_token_when_key_absent_in_old
Check file tests/test_utils.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 itcea5adf4b52556c216a275a3e1372aa052801329
Broken version dated2026-06-26
Moduledynaconf.utils.__init__
Units changedhandle_metavalues
Fingerprint347f404b7e687576
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