gretelai / gretel-python-client

The Gretel Python Client allows you to interact with the Gretel REST API.
https://gretel.ai
Apache License 2.0
53 stars 19 forks source link

Suggestion: un-pin the highly-specific requirements #86

Closed carlkibler closed 2 weeks ago

carlkibler commented 1 month ago

The tightly-pinned requirements file make this not play nice in projects. In my case, pydantic is the problem, because other libraries are using other versions.

Is there a specific reason pydantic is pinned to 1.10.17 rather than <2? And with click, tabulate, kubernetes, and opentelemetry pinned to very specific versions any project with a minute difference has a conflict.

For Pydantic, version 2.x was released a full year ago, so any library that has moved to 2.x is not compatible with gretel-python-client. Pydantic 2 ships with a copy of v1, just needs an import change to use. So you could switch the pin to pydantic<3, update some imports, and it would work and be more compatible.

I think this library will be better served by ranges. Otherwise it has to be partitioned off from all other work and, ultimately, will be used less. It's just not installable in larger projects.

mckornfield commented 1 month ago

@carlkibler Totally reasonable ask. We have a pydantic 2 upgrade in the works that uses the v1 copy, and I can look at relaxing the pins for the libraries you listed

mckornfield commented 1 month ago

I pushed https://github.com/gretelai/gretel-python-client/commit/3158848a7282a1958a72fd387c68677ac25eecf7 through, I can leave this issue open until the pydantic upgrade lands though, up to you

mckornfield commented 2 weeks ago

We merged a change to bump to pydantic v2 a bit ago, so I'm going to close this