One function
validate in dynaconf/dynaconf
The author described this change as “fix: Fixed 'dynaconf validate' edge cases with validation_file.toml (#1411)”. It counts as a record because the check below fails on the code as it stood at b4cd869df and passes on 93e49da9e, with nothing else changed between the two runs.
Projectdynaconf/dynaconf
Fix saved2026-06-28
Sharing licenceMIT · LICENSE
Change size+2 −2
What the code was meant to do, written into the code itself as a docstring
Validates Dynaconf settings based on provided rules. Rules should be defined in dynaconf_validators.toml
The change
| 37 | 37 | ) | |
| 38 | 38 | sys.exit(1) | |
| 39 | 39 | ||
| 40 | - | # guarantee there is an environment | |
| 41 | 40 | validation_data = {k.lower(): v for k, v in validation_data.items()} | |
| 42 | - | if not validation_data.get("default"): | |
| 41 | + | if not settings.ENVIRONMENTS_FOR_DYNACONF: | |
| 42 | + | # flat file: top-level keys are field names, not environments | |
| 43 | 43 | validation_data = {"default": validation_data} | |
| 44 | 44 | ||
| 45 | 45 | success = True |
The check that tells the two apart
fail→pass·tests/test_cli.py::TestValidate::test_issue_1368[environments-enabled]
Check file tests/test_cli.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 itb4cd869df40481dcbadc0590cb77d2ee03fe0087
Broken version dated2026-06-27
Moduledynaconf.cli
Units changedvalidate
Fingerprint85c0d120dd774a21
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