Conversation
We require pydantic>=2, but server.py still called the v1 accessor ten times, so every request that touched a body logged PydanticDeprecatedSince20 - and the method is gone in v3. All ten are model_dump() now. test_no_pydantic_v1.py is the lock: it reads server.py and fails, naming the line, if a .dict() call comes back (issue ldbumble#67).
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #67.
What changed
taskuary/server.pycalled pydantic v1'sbody.dict()in ten places - every request that touched a body loggedPydanticDeprecatedSince20, and the method is gone in v3. All ten aremodel_dump()now.tests/test_no_pydantic_v1.pyis the lock: it readsserver.pyand fails, naming the line, if a.dict()call comes back.Why
pyproject.tomlrequirespydantic>=2.model_dump()is v2's name for the same call and returns the same shape, so no response changes.How
rg -n "\.dict\(" taskuary/server.py-> ten hits: task create/update, split, calendar prep, ingest push, fixtures, and three settings-style updates. Each is.model_dump().The guard test is verified against a reintroduced call, not just a green run: with
body.dict()planted back atserver.py:566it fails and names the line.Tests
The three failures are
tests/test_browserview.py-RuntimeError: Event loop is closedin thewebsockets.serveteardown. They are not from this change: with the change stashed, the same file fails on master.Windows 11, Python 3.12.10, websockets 17.1.