Skip to content

Prefer model_dump() over deprecated dict() - #35

Open
xyf5432 wants to merge 1 commit into
papuSpartan:masterfrom
xyf5432:fix/pydantic-dict-deprecation
Open

xyf5432 wants to merge 1 commit into
papuSpartan:masterfrom
xyf5432:fix/pydantic-dict-deprecation

Conversation

@xyf5432

@xyf5432 xyf5432 commented Aug 26, 2026

Copy link
Copy Markdown

Fix #34

Replace the three .dict() calls in scripts/spartan/world.py with a small
compatibility helper that uses model_dump() when available (pydantic >= 2.0)
and falls back to .dict() on pydantic v1. Removes the
PydanticDeprecatedSince20 warning on pydantic 2.x without changing behavior
on pydantic v1.

Co-Authored-By: Claude <noreply@anthropic.com>
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.

Prefer model_dump() over deprecated dict()

1 participant