Preemo-Inc / gradientai-python-sdk

Interface for interacting with Gradient AI in Python
14 stars 2 forks source link

Pydantic V2 support #23

Open logan-markewich opened 6 months ago

logan-markewich commented 6 months ago

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

linjer commented 5 months ago

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

ofek commented 4 months ago

It would be great to get these conflicts resolved!

masci commented 4 months ago

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 commented 4 months ago

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

linjer commented 4 months ago

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

ml2 commented 4 months ago

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.

linjer commented 4 months ago

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

ml2 commented 4 months ago

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