-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update pydantic to 2.x and run automatic codemods #384
base: master
Are you sure you want to change the base?
Conversation
8ed5804
to
dc14677
Compare
dc14677
to
f73a9fb
Compare
@DurgNomis-drol @joro75 @CM000n |
Hi @deejay1 thank you for your efforts :)
|
hi, this isn't finished unfortunately, I'll try to do it today |
Have you used the pydantic migration Tool for you changes @deejay1? This will probably solve some of the problems of the changeover itself. |
Yes, this was done using the migration tool, unfortunately the |
Hope to find the time to have a look at it soon by myself. |
The problem seems to be with this change, you can't validate a field directly as it was done in v1: pydantic/pydantic#7367 I don't know much about pydantic (just the basics) but it feels like this usage is not "standard". Probably |
I am also not a pydantic/code specialist, but seems that fields can still be used (field_validator) but now need to be combined with model_validator which replaces root_validator. example I could find was: `from pydantic import BaseModel, Field, field_validator, model_validator class MyModel(BaseModel):
apologies that the comments are in Dutch as the source is. If my understanding is wrong, just forget my comment 😉 |
Thank you so much for the hard work 🙇♂️ |
Ok, I created another pull request using the v1 compatibility layer while we try to figure out how to upgrade properly. This should probably get us over the bridge with dependency issues. |
Hi, any news? As far as I can see, @deejay1 ‘s solution works. Installed it and running “simple_client_example.py“ returns the desired values from my RAV4. BTW: I get errors on python3.13, Python 3.9 works fine.
|
Probably an incomplete install of python3.13. I have to figure out why, seems to be module six. Under 3.9 no problems. |
No description provided.