redis / redis-om-python

Object mapping, and more, for Redis and Python
MIT License
1.07k stars 108 forks source link

[Enhancement] Support Pydantic v2 #525

Closed XChikuX closed 2 months ago

XChikuX commented 1 year ago

image

Pydantic v2 comes with several performance and safety benefits due to being compiled in Rust with python bindings.

I'd love to see the models: HashModel, JsonModel, EmbeddedJsonModel all use the new and improved pydantic.

There maybe a small migration workflow, which the pydantic team is building a tool for.

bonastreyair commented 1 year ago

take a look at https://docs.pydantic.dev/latest/migration/ also take a look at this tool that will automatically upgrade some of the changes for you: https://github.com/pydantic/bump-pydantic

XChikuX commented 1 year ago

So far, commit #533 does not successfully support Pydantic v2. Keeping this open.

pr0ton11 commented 1 year ago

Also waiting for this to be supported.