-
Notifications
You must be signed in to change notification settings - Fork 6
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 v2 #247
Comments
I note that running the tests in a fresh environment with Pydantic upgraded to 2.6 doesn't result in any failures. Is there (still) a reason for it to be pinned? @ndevenish @graeme-winter |
There was a reason, which was that v2 broke things and we needed to update the code. Noemi pointed out to me on Friday that they eventually added some backwards-compatibility to newer versions, so if the code doesn't need changing then there is no reason to pin. I'm not sure how much work this would be to verify, but I'd probably like to get things locked in for this run before changing everything round (next week is probably going to be busy!) |
@ndevenish Yes, I also believe that it should be okay because of the retrospective addition of backwards compatibility (they caused a lot of annoyance breaking everything...). Looking at the pydantic classes here they appear very simple so I think the chances are pretty good that few if any changes should be needed. I was wrong about the tests though, there are a few which fail: Here is a branch which is "working" and with some new tests which show the above change: https://github.com/dperl-dls/python-zocalo/tree/247_upgrade_pydantic but I'm not sure if this is correct/how to tell if those empty arguments are required by rabbitMQ. I would really appreciate if you could find time to take a look in the not too distant future but I understand it's Easter and busy startup etc. |
Should be resolved with #255 |
We have been trying to move Hyperion and Dodal to Pydantic v2 for some time. We think that this is the only remaining dependency we have which is stuck on v1.
I'm happy do do any work needed if necessary.
The text was updated successfully, but these errors were encountered: