You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I haven't tested the latest main, but I'm pretty sure the issue is still not fixed.
#386 introduced a regression which breaks what worked under 2.4.0. The problem probably is the new condition lenient_issubclass(field.annotation, BaseModel) and env_name.startswith(field_env_name) that cannot work for Union fields -- just simple BaseModel.
I haven't tested the latest main, but I'm pretty sure the issue is still not fixed.
#386 introduced a regression which breaks what worked under 2.4.0. The problem probably is the new condition
lenient_issubclass(field.annotation, BaseModel) and env_name.startswith(field_env_name)
that cannot work forUnion
fields -- just simpleBaseModel
.It causes the following to result in error:
With the following configuration provided with
.env
file:Under pydantic-settings 2.5.2 it results in the following error:
Under pydantic-settings 2.4.0 I'm getting the correct result:
The text was updated successfully, but these errors were encountered: