Closed jongbinjung closed 3 days ago
Thanks @jongbinjung - thats odd. I'll look into this.
Hey @jongbinjung - so this is a consequence of some idiosyncrasies we introduced as part of supporting both pydantic 1 and 2 oin prefect 2. This will be fixed in prefect 3, which you're welcome to use while its in RC, but for the time being I think we're not going to patch this up and you should just use the import order workaround. Thanks for the issue.
First check
Bug summary
If I use a
pydantic
V2 model with one of the fields being apendulum.DateTime
, the flow fails at runtime with abut only if
prefect
is imported before the model definition.Reproduction
Error
Versions (
prefect version
output)Additional context
For example:
fails with
but, if changed to
it works fine; e.g.,