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

fix: Fix compatibility issues between Pydantic V1 and V2 with timedelta #121

Merged
merged 4 commits into from
Jul 29, 2024

Conversation

EXPEbdodla
Copy link
Collaborator

@EXPEbdodla EXPEbdodla commented Jul 26, 2024

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes

  1. timedelta is serialized and deserialized differently in V1. Changes made to make it compatible with V1 using field_serializer and field_validator. In V1 version, time delta is serialized to number of seconds and now its serialized to [±]P[DD]DT[HH]H[MM]M[SS]S (ISO 8601 format for timedelta)
  2. setDaemon() is deprecated so using daemon property as recommended
  3. parse_obj() and json() are deprecated in Pydantic V2. Using the recommended methods.

@EXPEbdodla EXPEbdodla merged commit b3cd2ca into master Jul 29, 2024
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants