fix: replace deprecated Pydantic .dict() with .model_dump() (#76) #90
No reviewers
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/major-domo-database#90
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "issue/76-replace-deprecated-pydantic-dict-with-model-dump"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #76
Summary
Replaced all 21 occurrences of the deprecated Pydantic v2
.dict()method with.model_dump()across 17 router files.Files Changed
app/routers_v3/awards.pyapp/routers_v3/battingstats.py(2 occurrences)app/routers_v3/current.pyapp/routers_v3/decisions.pyapp/routers_v3/divisions.pyapp/routers_v3/draftlist.pyapp/routers_v3/draftpicks.py(2 occurrences)app/routers_v3/injuries.pyapp/routers_v3/keepers.pyapp/routers_v3/managers.pyapp/routers_v3/pitchingstats.py(2 occurrences)app/routers_v3/results.pyapp/routers_v3/sbaplayers.pyapp/routers_v3/schedules.pyapp/routers_v3/stratgame.pyapp/routers_v3/transactions.pyapp/routers_v3/stratplay/crud.py(2 occurrences)Notes
sbaplayers.pyline 209 was already updated prior to this PR (noted in the issue). All remaining occurrences are now fixed. No logic changes —.model_dump()is a direct drop-in replacement for.dict()in Pydantic v2.AI Code Review
Files Reviewed
app/routers_v3/awards.py(modified)app/routers_v3/battingstats.py(modified)app/routers_v3/current.py(modified)app/routers_v3/decisions.py(modified)app/routers_v3/divisions.py(modified)app/routers_v3/draftlist.py(modified)app/routers_v3/draftpicks.py(modified)app/routers_v3/injuries.py(modified)app/routers_v3/keepers.py(modified)app/routers_v3/managers.py(modified)app/routers_v3/pitchingstats.py(modified)app/routers_v3/results.py(modified)app/routers_v3/sbaplayers.py(modified)app/routers_v3/schedules.py(modified)app/routers_v3/stratgame.py(modified)app/routers_v3/transactions.py(modified)app/routers_v3/stratplay/crud.py(modified)Findings
Correctness
.dict()replaced with.model_dump()— confirmed via grep on the full codebase (not just changed hunks)..dict()matches exactly the 17 files modified in this PR, with zero stragglers in services, tests, or other directories..model_dump()is a direct, behaviorally-identical replacement for.dict()in Pydantic v2. All three usage patterns (unpacking into ORM constructor**model.model_dump(), appending to list for bulk insert, ORM.update(**model.model_dump())) are correct.battingstats.pyandpitchingstats.py(splitting the.update(**...).where(...).execute()chain across lines) are correct and don't affect behavior.Security
Style & Conventions
Suggestions
Verdict: APPROVED
Complete, correct, and fully-scoped Pydantic v2 migration. All 21 deprecated
.dict()calls replaced with.model_dump()across all 17 affected files, with nothing missed. No logic changes, no regressions.Automated review by Claude PR Reviewer (posted as COMMENT — Gitea blocks self-approval)
Checkout
From your project repository, check out a new branch and test the changes.