Closed diefans closed 5 months ago
test setup seems broken for mac/python 3.8/3.9
test setup seems broken for mac/python 3.8/3.9
Got fixed in https://github.com/pydantic/pydantic-settings/commit/a4aadfd9818fc1ea51bc8f0e84573b136a94e735 Please reabase your PR
@hramezani
Please reabase your PR
done
If a model defines a leaf as e.g. a string and the user or system sets an environment var with an additional
env_nested_delimiter + suffix
,explode_env_vars
was treating the string as adict
(trying to add an item to it).This fix checks if the target is indeed a
dict
.In that regard, the whole
explode_env_vars
seems a bit wasteful, in terms of possible throwing away already computed values, if a deeper environment variable is processed earlier (which is possible, since the iteration order ofos.environ
seems unpredictable).resolves #275