flexiblepower / s2-python

Apache License 2.0
15 stars 1 forks source link

Update to use pydantic v2 #10

Closed lfse-slafleur closed 1 week ago

lfse-slafleur commented 1 year ago

When fixed, also fix Transition unit test to use keyword arguments in init instead of the dict approach.

lfse-slafleur commented 1 year ago

datamodel-code-generator already supports pydantic v2 as a seperate output type: https://github.com/koxudaxi/datamodel-code-generator#supported-output-types

lfse-slafleur commented 2 weeks ago

@Flix6x Regarding the discussion on why and when to move to pydantic v2:

I would consider moving to pydantic 2 soon due to:

Should we perhaps keep a hotfix branch with pydantic v1 support for your use case for now? (E.g. s2-python 0.1.x)

Flix6x commented 6 days ago

Thank you for creating the hotfix branch. I agree this is the best solution.