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

feat: update pydantic to 2.0 #30

Closed
DerekRoberts opened this issue Oct 5, 2023 · 3 comments
Closed

feat: update pydantic to 2.0 #30

DerekRoberts opened this issue Oct 5, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@DerekRoberts
Copy link
Member

Already completed elsewhere by @conbrad.

WPS PR
bcgov/wps#3028

--- copy/paste ---
conbrad commented 27 minutes ago
@franTarkenton or @conbrad do you have some time to help us and move from pydantic from v1 to v2? cc @DerekRoberts

@mishraomp I can try to carve out some time tomorrow. We've updated this here: bcgov/wps#3028
I'll be less familiar with your domain models so that will require some extra testing from your team but as a short summary, what I found was:

Optional fields set to None by default are more strict on type annotations
Datetime format has changed to expect the Zulu "Z" notation
parse_obj -> model_validate if you're using that anywhere

@DerekRoberts DerekRoberts added the enhancement New feature or request label Oct 5, 2023
@DerekRoberts DerekRoberts self-assigned this Oct 5, 2023
@DerekRoberts DerekRoberts moved this from New to Sprint in DevOps (NR) Oct 5, 2023
@DerekRoberts DerekRoberts moved this from Sprint to Backlog in DevOps (NR) Oct 13, 2023
@franTarkenton
Copy link
Member

is this still valid or is it completed by PR: #160

see:

pydantic = {version ="^2.0.0", extras = ["email"]}

@conbrad
Copy link

conbrad commented Jun 18, 2024

is this still valid or is it completed by PR: #160

see:

pydantic = {version ="^2.0.0", extras = ["email"]}

Looks completed to me

@DerekRoberts DerekRoberts moved this from Backlog to Done in DevOps (NR) Jun 18, 2024
@DerekRoberts
Copy link
Member Author

Completed by @franTarkenton in #160! Thanks to @conbrad for checking too. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

3 participants