merge-api / merge-python-client

The Python SDK for accessing various Merge Unified APIs
Other
6 stars 11 forks source link

Support for pydantic v2 #46

Closed entropi closed 1 year ago

entropi commented 1 year ago

As a library it's a bit challenging for the pydantic dependency to be pinned to v1. Would it be possible to support both versions?

Here is one approach I see another library took in order to support both versions since all v1 functionality is still available in v2 (just under a different namespace):

https://github.com/langchain-ai/langchain/blob/2c11302598ae81dc7a7d88388d0ea0fec7ba3b25/libs/langchain/langchain/pydantic_v1/main.py

dsinghvi commented 1 year ago

@entropi thanks for filing this issue and appreciate the link to langchani's approach. Will scope what it would take to support this!

entropi commented 1 year ago

Saw the merge on the fern repo @dsinghvi, thanks for the quick action!

dsinghvi commented 1 year ago

No problem! @rmkonnur should be releasing the SDK from the merge side soon!

rmkonnur commented 1 year ago

Thanks for the patience here! We rolled out merge-python-client v0.2.7 which should support both v1 and v2. Feel free to reopen the issue if any further issues arise!