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 pydantic from v1 to v2 #948

Merged
merged 9 commits into from Nov 15, 2023
Merged

Update pydantic from v1 to v2 #948

merged 9 commits into from Nov 15, 2023

Conversation

rabstejnek
Copy link
Collaborator

@rabstejnek rabstejnek commented Nov 7, 2023

Updated pydantic from v1 to v2: https://docs.pydantic.dev/2.3/migration/

@rabstejnek rabstejnek changed the title WIP: Update pydantic from v1 to v2 Update pydantic from v1 to v2 Nov 9, 2023
@rabstejnek
Copy link
Collaborator Author

@shapiromatron This PR is ready for review, but we need to publish a new version of bmds with pydantic v2 and include it in the requirements file here before we merge.

@rabstejnek rabstejnek marked this pull request as ready for review November 9, 2023 14:55
@shapiromatron shapiromatron self-requested a review November 9, 2023 21:01
@shapiromatron shapiromatron self-assigned this Nov 9, 2023
hawc/main/settings/base.py:284
    ~/dev/hawc/hawc/main/settings/base.py:284: PydanticDeprecatedSince20:

  The `parse_file` method is deprecated; load the data from file, then if your data is JSON use `model_validate_json`, otherwise `model_validate` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.4/migration/
# Conflicts:
#	hawc/apps/vocab/views.py
@shapiromatron
Copy link
Owner

shapiromatron commented Nov 13, 2023

fyi @scott-8

Copy link
Owner

@shapiromatron shapiromatron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - one minor comment about Literal choices

hawc/apps/common/dynamic_forms/fields.py Outdated Show resolved Hide resolved
hawc/apps/summary/constants.py Show resolved Hide resolved
@rabstejnek rabstejnek merged commit 77cf794 into main Nov 15, 2023
3 checks passed
@rabstejnek rabstejnek deleted the pydantic-v2 branch November 15, 2023 15:35
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.

None yet

3 participants