OpenSemanticLab / osw-python

GNU Affero General Public License v3.0
3 stars 2 forks source link

add support for pydantic v2 #28

Open LukasGold opened 1 year ago

LukasGold commented 1 year ago

With the new Pydantic version v2 (released on 30/06/23, see Pydantic V2 Release Note), __root__ models are no longer supported. To define root models, use pydantic.RootModel

Occurrences: osw.model.entity.CommonDefinitions and osw.model.entity.Statement

See Pydantic Migration Guide and Pydantic RootModel

grafik

Suggestion:

LukasGold commented 1 year ago

Tested bump-pydantic (refactoring tool to help with the migration), see Branch. __root__ models were not replaced automatically