PyAirbyte icon indicating copy to clipboard operation
PyAirbyte copied to clipboard

Support of Pydantic v2

Open timothedelion opened this issue 9 months ago • 1 comments

Hi great team 👋

Is a version of PyAirbyte that supports Pydantic v2 planned ?

Unfortunately, a project I works on is running pydantic>=2.0.0, sadly preventing me from using PyAirbyte.

Can you recommend workarounds ?

Thanks in advance. (you rocks, I'm really in love with Airbyte)

timothedelion avatar May 05 '24 14:05 timothedelion

@timothedelion - Thanks so much for this feedback.

I don't know of a workaround as of yet, but I spoke with the LangChain folks a couple months back and they had a similar request.

If it were just PyAirbyte itself, I would consider replacing Pydantic with dataclasses; however, we have upstream dependencies in airbyte-protocol-models and airbyte-cdk.

I've logged issues an issue for airbyte-protocol-models and there was already one open for the CDK. We would need to tackle them in order:

  1. https://github.com/airbytehq/airbyte-protocol/issues/76
  2. https://github.com/airbytehq/airbyte/issues/36475

aaronsteers avatar May 07 '24 03:05 aaronsteers

@timothedelion et al:

I'm happy to report that upstream dependencies noted above have now all been upgraded to Pydantic 2.x. This clears the way for PyAirbyte to also use Pydantic 2.0. 🎉

Not prioritized as of yet, but wanted to report back that we're unblocked on next steps.

(Adding Accepting Pull Requests label.)

cc @erohmensing

aaronsteers avatar Jun 21 '24 20:06 aaronsteers

[[package]]
name = "airbyte-source-faker"
version = "6.1.2"
...

[package.dependencies]
airbyte-cdk = ">=0.73.0,<2.0"
mimesis = "6.1.1"

Seems that airbyte-source-faker must be upgraded to support airbyte-cdk v2 for this to work with the current poetry.lock fille.

niyasrad avatar Jun 22 '24 18:06 niyasrad

I'm happy to report we just launched PyAirbyte 0.13.0, which now leverages Pydantic 2.0. 🎉

@timothedelion, @niyasrad, et al:

We hope you will give it a try and let us know if you run into any issues! Thanks! The PR is here:

  • https://github.com/airbytehq/PyAirbyte/pull/291

aaronsteers avatar Jul 07 '24 22:07 aaronsteers