Skip to content
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

Major upgrade to pydantic 2.0 #4481

Open
1 of 3 tasks
pcrespov opened this issue Jul 10, 2023 · 3 comments · Fixed by #6333 · May be fixed by #6371 or #6366
Open
1 of 3 tasks

Major upgrade to pydantic 2.0 #4481

pcrespov opened this issue Jul 10, 2023 · 3 comments · Fixed by #6333 · May be fixed by #6371 or #6366
Assignees
Labels
t:maintenance Some planned maintenance work

Comments

@pcrespov
Copy link
Member

pcrespov commented Jul 10, 2023

Planned changes

Major upgrade not out-of-the box and requires some coordination. This upgrade will bring substantial speedup to the code. It would be desirable to measure the improvement. Should we setup some type of benchmark?

Both libraries have been releases so I added a constraint in requirements/constraints.txt

We should start testing first the upgrade with the packages and then when we understand the migration mechanisms we can do the rest of the repository.

Tasks

This is a sub issue from ITISFoundation/osparc-issues#675

Sundae

@sanderegg
Copy link
Member

@pcrespov explore the migration path

@giancarloromeo
Copy link
Contributor

This article contains useful tips on how to approach the migration: https://medium.com/codex/migrating-to-pydantic-v2-5a4b864621c3

This was linked to pull requests Aug 28, 2024
This was unlinked from pull requests Aug 29, 2024
@giancarloromeo
Copy link
Contributor

FastAPI doesn't support a mix of pydantic version. The installed one determines the models version and so on.

See: fastapi/fastapi#10360

We will proceed updating the libraries/services one by one. 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment