infisical-python icon indicating copy to clipboard operation
infisical-python copied to clipboard

[Infra] Bump to Pydantic v2

Open philipk19238 opened this issue 2 years ago • 6 comments

  • Ran bump-pydantic at repo root

philipk19238 avatar Dec 11 '23 01:12 philipk19238

Hi Philip 👋

What was the reason for this bump? And can you please request a review from me on the PR? :-)

varonix0 avatar Dec 11 '23 17:12 varonix0

Hi Daniel!

Pydantic v2 introduced many breaking changes that result in Infisical being not compatible with the current versions. This PR has to be made in order to use Infisical with any repo that uses Pydantic versions > 2.

philipk19238 avatar Dec 11 '23 18:12 philipk19238

Gotcha! And with this version bump, the SDK will remain back-compatible with projects running older versions of Pydantic?

varonix0 avatar Dec 11 '23 18:12 varonix0

Gotcha! And with this version bump, the SDK will remain back-compatible with projects running older versions of Pydantic?

It should, since its just setting a default None value for Optional fields. Would just have to relax the pydantic version in pyproject.toml

philipk19238 avatar Dec 11 '23 18:12 philipk19238

It should, since its just setting a default None value for Optional fields. Would just have to relax the pydantic version in pyproject.toml

Cool! If you could please test on older versions of Pydanic just to make sure, that would be great. I'll also have a look in a bit myself :-)

Additionally, please remove the log.txt file from your PR 🙌

varonix0 avatar Dec 11 '23 19:12 varonix0

Hey @philipk19238, just following up on this!

varonix0 avatar Dec 19 '23 01:12 varonix0