-
Notifications
You must be signed in to change notification settings - Fork 1
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
Migrate to Pydantic v2 #942
Merged
Merged
+669
−584
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bumps [pydantic](https://github.com/pydantic/pydantic) from 1.10.17 to 2.8.2. - [Release notes](https://github.com/pydantic/pydantic/releases) - [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md) - [Commits](pydantic/pydantic@v1.10.17...v2.8.2) --- updated-dependencies: - dependency-name: pydantic dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
The underlying Rust library that handles timestamps apparently uses `Z` to denote UTC time, rather that a 00:00 offset. Though the Z is "more correct (I think), Python's isoformat method uses +00:00. Since that's what most of our timestamps serialized to, we use a custom serializer to ensure datetimes are serialized consistently. I do think we shold eventally use the Z offset, but that would be a breaking change of the API, so deserves to be part of a major release.
Pydantic URLs no longer "act like" strings by themselves. Since we expect URLs to be strings throughout the codebase, we varlidate them using Pydantic, but specify them as strings in models.
grahamalama
commented
Jul 23, 2024
alexcottner
approved these changes
Jul 23, 2024
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.
Good work, this was a big effort for a dependency upgrade.
Don't see anything concerning that stands out.
robhudson
reviewed
Jul 23, 2024
leplatrem
approved these changes
Jul 29, 2024
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.
👌
grahamalama
force-pushed
the
migrate-to-pydantic-v2
branch
from
July 29, 2024 12:32
d114ebf
to
bfae6aa
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'd suggest reviewing this PR by commit. Tried to keep things as atomic as possible. At a high level, this PR:
pydantic-settings
, which is now a separate packageThese commits warrant careful review: