-
Notifications
You must be signed in to change notification settings - Fork 11
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
Pydantic 2 migration #119
base: master
Are you sure you want to change the base?
Pydantic 2 migration #119
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #119 +/- ##
=========================================
Coverage ? 53.76%
=========================================
Files ? 23
Lines ? 1129
Branches ? 115
=========================================
Hits ? 607
Misses ? 510
Partials ? 12 ☔ View full report in Codecov by Sentry. |
9acd943
to
1e38b70
Compare
Pydantic 2 has breaking API changes, the most important for us is the usage of compute_fields. The accounting system expects datetime fields to be returned as integers (i.e. epoch). We can use computed_fields for that, using properties. This way we can internally store datetime objects, and just conver them to integers when they are accessed. In order to do so, we define _epoch properties.
@alvarolopez any idea when this will be merged? I am waiting on this one since months. |
@thebe14 Pydantic 2 was released only at the end of June (https://docs.pydantic.dev/2.0/blog/pydantic-v2-final/). We need to double check that everything works as expected. |
@aidaph can you check everything is working as expected? LGTM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few changes are added to make the extract of records works. LGTM now.
Description
Move Pydantic models to V2.