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

Update dependencies. #44

Merged
merged 2 commits into from
Jan 20, 2024
Merged

Update dependencies. #44

merged 2 commits into from
Jan 20, 2024

Conversation

caarmen
Copy link
Owner

@caarmen caarmen commented Jan 20, 2024

The update from pydantic 1 to 2 needs some adjustments:

  • Apply the migration tool bump-pydantic: https://docs.pydantic.dev/latest/migration/
  • Correct some usage of types:
    • Convert pydantic Url types to str before using them.
    • Use int, not float, for types expecting ints.
    • In tests, provide the expected date formatted string (YYYY-MM-DD) instead of a unix timestamp.
    • Use model_dump() instead of dict().

Apply the migration tool `bump-pydantic`: https://docs.pydantic.dev/latest/migration/

Correct some usage of types:

* Convert pydantic `Url` types to `str` before using them.
* In tests, provide the expected date formatted string (YYYY-MM-DD) instead of a unix timestamp.
* Use `model_dump()` instead of `dict()`.
@caarmen caarmen marked this pull request as ready for review January 20, 2024 16:26
@caarmen caarmen merged commit d3bc93d into main Jan 20, 2024
@caarmen caarmen deleted the update-dependencies branch January 20, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant