HumanSignal / label-studio-sdk

Label Studio SDK
https://api.labelstud.io
Apache License 2.0
99 stars 61 forks source link

[fix]: add support for newer pydantic versions #82

Closed xtrementl closed 1 year ago

xtrementl commented 1 year ago

Add compatibility with dependencies that bundle newer pydantic versions.

Issue: https://github.com/heartexlabs/label-studio-sdk/issues/75

makseq commented 1 year ago

Please use ~= instead of >=.

xtrementl commented 1 year ago

Please use ~= instead of >=.

@makseq Would you be comfortable with bumping the minor version to 1.10 (i.e., ~= 1.10)? I'm attempting to use this within a Prefect flow, which calls for at least 1.10.0. It looks like the Label Studio SDK is only reliant on basic pydantic.BaseModel functionality, so upgrading should still be compatible.

This could cause some compatibility problems for other users who may be using the pinned 1.8.2 pydantic version.

makseq commented 1 year ago

We must have a limit for the last known pydantic version for LS in the requirements. Otherwise, they will release a new incompatible version with LS and all installations will be broken.

xtrementl commented 1 year ago

I understand. Would it be possible to set that limit to the 1.10.x version? (e.g., ~=1.10)? That would pin to the same minor version line (but still allow compatible point updates), which is currently compatible with its use in the SDK.

makseq commented 1 year ago

Let's try to use ~=1.10, I will run pytest here.

xtrementl commented 1 year ago

Thanks @makseq!