Replies: 2 comments 3 replies
-
The change from creation_date and creation_time to just creation_time was back in schema version ~0.14 so I'm unclear why this wasn't an issue with 0.38.6 The upgrader should be merging the date and time fields into a single field. |
Beta Was this translation helpful? Give feedback.
-
For what is worth here's my previous post describing this behavior along with the corresponding pydantic PR reference: I think the general pattern should be to avoid using Otherwise, inheriting from the |
Beta Was this translation helpful? Give feedback.
-
In upgrading pins to support
aind-data-schema
1.0, it seems the behavior ofmodel_construct
has changed.Changes to pins:
aind-data-schema
:0.38.6
->1.0.0
pydantic
:< 2.7
->>=2.7
Now, constructed models are losing the
DataDescription.creation_date
field, because it no longer exists in the current version of model -- even if it existed in the version of model that was originally created.This behavior is governed by the field
model_config.extra
, which is currently set to'forbid'
inAindModel
. Unsure why the function of this changed with raising the version of pydantic, but now many upgrades are failing due to missing critical old information from models that are being upgraded.How should we solve this?
Beta Was this translation helpful? Give feedback.
All reactions