PrefectHQ / prefect-airbyte

https://PrefectHQ.github.io/prefect-airbyte/
Apache License 2.0
40 stars 5 forks source link

Conditional imports to support operating with `pydantic>2` installed #60

Closed chrisguidry closed 11 months ago

chrisguidry commented 11 months ago

Following the compatibility work we've done in prefect, we also want to apply the same compatibility changes to all Prefect-maintained collections. We're following the convention that Prefect will always use pydantic<2 idioms, leaning on the pydantic.v1 module of pydantic>2 to aid us in this. With these changes, we can operate normally regardless of the installed version.

Until prefect fully deprecates pydantic versions below 2.0, we'll continue to maintain that constraint of using only v1 idioms.

This is part of a series of identical PRs for all of our maintained collections.