Pydantic v2.11 deprecation warnings spam every request #25
Labels
No labels
blocked:needs-attention
blocked:needs-decision
bug
feature-request
in-progress
needs-decompose
quickfix
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/easystitch-service#25
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Pydantic v2.11 deprecation warnings spam every request
Repo: Mark/easystitch-service
Severity: Trivial — cosmetic log spam, not blocking
Found: 2026-09-08 full shakedown
Symptom
Every HTTP request produces one or more:
Same warning fires for
format,config,colors, and other camelCase/snake_case aliasedfields across models.py. Pydantic v2.11 deprecation notices — no effect in v2.11 but will be
removed in v3.
Why it matters
Fix
Replace
field: str = Field(alias='camelCase')withAnnotated[str, Field(alias='camelCase')]or use
model_config = ConfigDict(populate_by_name=True)and pass snake_case keys.Acceptance
UnsupportedFieldAttributeWarninglines in uvicorn output for a normal request cycleClosed via watcher recovery (kilo-gsd.py exit 2 / PARTIAL — push failed because origin/main had advanced).
The fix is landed on
origin/main:7dbe0fa— containsmodels.py(everyField()rewritten toAnnotated[T, Field(...)], 37 lines changed) andtests/unit/test_models.py(addedtest_no_pydantic_deprecation_warnings_on_validateregression test, 175 lines).073e69b— companion#22test (test_pipeline_runner.py).e9c29ac— lint cleanup (remove unusedStitchObjectimport, ruff F401).Verified locally on pydantic 2.13.4: zero
UnsupportedFieldAttributeWarningemitted through bothmodel_validatepaths (camelCase + snake_case) and JSON roundtrip. All 10test_models.pytests pass, including the new regression test.⚠️ Note for the operator: commit
7dbe0fais mislabeled — its message reads "Apply changes from kilo-gsd.py run for Mark/easystitch-service#23" but its CONTENT is the#25fix work (the kilo-gsd run that produced it was actually the#25run; the prior#23close had previously landed commit1414e07). The fix code is correct; only the commit message needs cleaning. The localmainbranch has been rebased with a properly-labeled commit (fff8a57 fix(#25): convert Field() declarations to Annotated[T, Field()] form) but the force-push was blocked in single-query mode. The local-vs-remote divergence is content-identical; runninggit push --force-with-lease origin mainfrom the worktree (when interactive shell approval is available) will replace the mislabeled7dbe0fawith fff8a57 on origin.