Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pydantic V2 support #23

Open
logan-markewich opened this issue Apr 3, 2024 · 8 comments
Open

Pydantic V2 support #23

logan-markewich opened this issue Apr 3, 2024 · 8 comments

Comments

@logan-markewich
Copy link

Can we add support for pydantic V2? Even by using their v1 compatibility layer? It causes some packaging issues downstream

@linjer
Copy link

linjer commented May 4, 2024

@michaelfeil @atmiguel @mhaligowski Would you be able to help get #27 merged?

@ofek
Copy link

ofek commented May 7, 2024

It would be great to get these conflicts resolved!

@masci
Copy link

masci commented May 11, 2024

Related: latest version 1.12.0 made Haystack tests fail on Python 3.9 with TypeError: dataclass() got an unexpected keyword argument 'kw_only', most likely caused by https://github.com/Preemo-Inc/gradientai-python-sdk/pull/28/files#diff-3733539533707a7044af4c5ead69949bf1e3fff5cc271c605b82287acc11fb8fR22

Link to failing CI: https://github.com/deepset-ai/haystack-core-integrations/actions/runs/9039411463

@mhaligowski
Copy link
Contributor

@masci thanks, I missed that kw_only was added in 3.10... version 1.12.1 is live!

@linjer
Copy link

linjer commented May 17, 2024

It seems maintainers have no interest in addressing this. I will likely resolve this by removing dependency.

@ml2
Copy link

ml2 commented May 21, 2024

Apologies for the delayed reply. Unfortunately, the ".v1" hack only works for pydantic 1.10.15 and above so this would be a breaking change right now.

However, we are working with users who may be affected to upgrade to at least that version. We hope to release a fix on our end once that wraps up. ETA ~ 2 weeks. Sorry for the inconvenience in the meantime.

  • Meir (VP Product @ Gradient)

@linjer
Copy link

linjer commented May 22, 2024

@ml2 Appreciate the update! I'll close out my PR.

@ml2
Copy link

ml2 commented May 26, 2024

We have deployed the change allowing customers above 1.10.15 to use V1 and the rest to use V2. Let us know if you have any issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants