Skip to content

Prepare for Pydantic v2 migration - #4072

Merged
r4victor merged 5 commits into
masterfrom
issue_1844_pydantic_v2_prep
Jul 29, 2026
Merged

Prepare for Pydantic v2 migration#4072
r4victor merged 5 commits into
masterfrom
issue_1844_pydantic_v2_prep

Conversation

@r4victor

Copy link
Copy Markdown
Collaborator

Part of #1844

Pydantic v1 -compatible changes that prepare for Pydantic v2 migration:

  • Set None default for all Optional fields: Missing None default on v2 makes the field required. On v1 there is no difference.
  • Parse data from db/server via response everywhere – this is largely needed to cover all places with pydantic v1-v2 compatibility tests consistently.
  • Use discriminator= for unions everywhere where possible as pydantic v2 now uses smart mode by default for parsing unions vs left-to-right parsing.

@r4victor
r4victor merged commit ab915ee into master Jul 29, 2026
24 checks passed
@r4victor
r4victor deleted the issue_1844_pydantic_v2_prep branch July 29, 2026 09:42
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